[wp-trac] [WordPress Trac] #33859: Custom variables in get_template_part

WordPress Trac noreply at wordpress.org
Mon Sep 14 10:52:07 UTC 2015


#33859: Custom variables in get_template_part
------------------------------+-----------------------------
 Reporter:  sebastian.pisula  |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Themes            |    Version:  4.3
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 For example:


 {{{
 get_template_part('page', 'part', array('username'=>'Sebastian'));
 }}}

 And in page-part.php


 {{{
 Hello, <?php echo $username;?>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33859>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list