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

WordPress Trac noreply at wordpress.org
Thu Jan 24 19:27:42 UTC 2013


#21676: Pass a variable to get_template_part()
-------------------------------------------------+-------------------------
 Reporter:  sc0ttkclark                          |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Template                             |  Release
 Severity:  normal                               |     Version:  3.4.1
 Keywords:  has-patch needs-testing dev-         |  Resolution:
  feedback 2nd-opinion                           |
-------------------------------------------------+-------------------------

Comment (by sc0ttkclark):

 Also, in my refreshed patch, $args[ 'data' ] is now extracted above
 $wp_query->query_vars so you can easily override any of those.

 For overriding globals as set in load_template, the best way there is to
 interact with the globals themselves like $GLOBALS[ 'posts' ] etc

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21676#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list