Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37167 closed enhancement (wontfix)

Create filter for WP_USE_THEMES constant

Reported by: mrez0 Owned by:
Priority: normal Milestone:
Component: Themes Version: 4.6
Severity: normal Keywords:
Cc: Focuses: template

Description

Why not create filter for WP_USE_THEMES constant which is defined in index.php in order for plugins to disable loading template instead of editing index.php directly.

Change History (2)

#1 @michalzuber
10 years ago

  • Resolutionwontfix
  • Status newclosed

No need, because you can

add_action( 'template_redirect', '__return_true' );

and skip template loading if I'm not misunderstanding line https://github.com/WordPress/WordPress/blob/master/wp-includes/template-loader.php#L12

#2 @SergeyBiryukov
10 years ago

  • Component PluginsThemes
  • Focuses template added
  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.