Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#18331 closed enhancement

get_sidebar(), get_header(), etc. should be refreshed — at Version 2

Reported by: Viper007Bond Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Template Keywords: has-patch commit
Focuses: Cc:

Description (last modified by SergeyBiryukov)

We should consolidate code and make get_sidebar() and it's compatriots use get_template_part().

While we're at it, these functions should support a subfolder argument so that sidebars can be stored in a "sidebar" folder for example.

AaronCampbell came up with this elegantly simple code on IRC: http://pastebin.com/xYjASLYe

Change History (2)

#1 @Viper007Bond
7 years ago

  • Summary changed from get_sidebar(), get_header(), etc. should make use of get_template_part() to get_sidebar(), get_header(), etc. should be refreshed

#2 @SergeyBiryukov
7 years ago

  • Description modified (diff)

Corrected the link.

Note: See TracTickets for help on using tickets.