[wp-trac] [WordPress Trac] #21676: Pass a variable to get_template_part()

WordPress Trac noreply at wordpress.org
Tue Jul 7 11:00:36 UTC 2020


#21676: Pass a variable to get_template_part()
-------------------------------------+-----------------------------
 Reporter:  sc0ttkclark              |       Owner:  SergeyBiryukov
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.5
Component:  Template                 |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"48370" 48370]:
 {{{
 #!CommitTicketReference repository="" revision="48370"
 Themes: Allow template loading functions to pass additional arguments to
 the template via the `$args` parameter.

 This affects:
 * `get_header()`
 * `get_footer()`
 * `get_sidebar()`
 * `get_template_part()`
 * `locate_template()`
 * `load_template()`

 Note: `get_search_form()` already passes additional arguments to the
 template as of [44956].

 Props enrico.sorcinelli, sc0ttkclark, scribu, nacin, wonderboymusic,
 GeertDD, beatpanda, amaschas, mintindeed, ysalame, caiocrcosta, bigdawggi,
 julianm, eddiemoya, shawnz, sayedwp, shamai, mboynes, mihai2u, guidobras,
 Mte90, apedog, stuffradio, overclokk, johnbillion, joyously, afercia,
 audrasjb, justlevine, SergeyBiryukov.
 See #21676.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/21676#comment:110>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list