[wp-trac] [WordPress Trac] #41575: Add global action to get_template_part

WordPress Trac noreply at wordpress.org
Mon Aug 7 15:41:26 UTC 2017


#41575: Add global action to get_template_part
-------------------------+------------------------------
 Reporter:  pcfreak30    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  template
-------------------------+------------------------------

Comment (by joyously):

 That is very similar to what is there now:
 `do_action( "get_template_part_{$slug}", $slug, $name );`
 but I can see that it would be difficult to do a generic action since the
 slug is part of the action name.
 Reviewing themes, I have seen quite a variety of slugs used, mostly with a
 folder structure. This really does not lend itself to reuse.

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


More information about the wp-trac mailing list