[wp-trac] [WordPress Trac] #43597: Modify template-loader engine

WordPress Trac noreply at wordpress.org
Sun Mar 25 19:24:55 UTC 2018


#43597: Modify template-loader engine
-------------------------------+------------------------------
 Reporter:  chespir            |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Themes             |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  template
-------------------------------+------------------------------
Changes (by soulseekah):

 * keywords:   => reporter-feedback


Comment:

 Hi, @chespir! Welcome to Trac! Thank you for your report. I'm sorry it
 took so long for someone to respond.

 The `template_include` filter and the `template_redirect` action will not
 be pulled if `WP_USE_THEMES` is not defined. `WP_USE_THEMES` is only
 defined by default if you load `index.php`, i.e. it is a frontend request.
 The absence of `WP_USE_THEMES` allows `wp-load.php` to be included without
 any output produced. If you define `WP_USE_THEMES` inside the `init`
 action, for example, the core will produce theme output. This is in most
 cases undesirable.

 What is your specific use case and proposed solution here?

 Thanks!

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


More information about the wp-trac mailing list