[wp-trac] [WordPress Trac] #54541: Add actions to template loading to assist with collecting debug info

WordPress Trac noreply at wordpress.org
Tue Sep 20 19:04:37 UTC 2022


#54541: Add actions to template loading to assist with collecting debug info
----------------------------------------+--------------------------
 Reporter:  rmccue                      |       Owner:  johnbillion
     Type:  enhancement                 |      Status:  accepted
 Priority:  normal                      |   Milestone:  6.1
Component:  Themes                      |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-dev-note needs-patch  |     Focuses:  performance
----------------------------------------+--------------------------
Changes (by johnbillion):

 * keywords:  has-patch needs-unit-tests needs-dev-note dev-feedback =>
     needs-dev-note needs-patch
 * status:  reopened => accepted


Comment:

 @johnjamesjacoby I agree that moving these actions into `load_template()`
 makes sense. We do lose the `$template_names` context but the existing
 `get_template_part` action includes this and I'm planning on proposing a
 new action that fires after `locate_template()` is called inside
 `get_template_part()` which provides an extra debugging opportunity that's
 specific to template parts.

 I'll open a PR with your suggestion.

 @JeffPaul This should remain in the 6.1 milestone as it already has a
 commit.

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


More information about the wp-trac mailing list