template_redirect action-hook . WP 1.5.0
Fires before determining which template to load.
Usage
add_action( 'template_redirect', 'action_function_name_44' ); function action_function_name_44(){ // action... }
Changelog
Since 1.5.0 | Introduced. |
Where the hook is called
In file: /wp-includes/template-loader.php
wp-includes/template-loader.php 13
do_action( 'template_redirect' );
Where in WP core the hook is used WordPress
wp-includes/template-loader.php 146
add_action( 'template_redirect', array( $this, 'handle_render_partials_request' ) );
wp-includes/template-loader.php 273
add_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
wp-includes/template-loader.php 304
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
wp-includes/template-loader.php 400
add_action( 'template_redirect', 'wp_old_slug_redirect' );
wp-includes/template-loader.php 538
add_action( 'template_redirect', 'redirect_canonical' );
wp-includes/template-loader.php 539
add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
wp-includes/template-loader.php 558
add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
wp-includes/template-loader.php 74
add_action( 'template_redirect', 'maybe_redirect_404' );
wp-includes/template-loader.php 68
add_action( 'template_redirect', array( $this, 'render_sitemaps' ) );