diff --git a/wp-includes/template.php b/wp-includes/template.php index 891e77748d..60752349c0 100644 --- a/wp-includes/template.php +++ b/wp-includes/template.php @@ -713,7 +713,31 @@ function locate_template( $template_names, $load = false, $require_once = true, } if ( $load && '' !== $located ) { + /** + * Fires before a located template is loaded. + * + * @since 6.1.0 + * + * @param string $located The template filename. + * @param string|array $template_names Template file(s) to search for, in order. + * @param bool $require_once Whether to require_once or require. + * @param array $args Additional arguments passed to the template. + */ + do_action( 'wp_before_load_template', $located, $template_names, $require_once, $args ); + load_template( $located, $require_once, $args ); + + /** + * Fires after a located template is loaded. + * + * @since 6.1.0 + * + * @param string $located The template filename. + * @param string|array $template_names Template file(s) to search for, in order. + * @param bool $require_once Whether to require_once or require. + * @param array $args Additional arguments passed to the template. + */ + do_action( 'wp_after_load_template', $located, $template_names, $require_once, $args ); } return $located; diff --git a/wp-includes/version.php b/wp-includes/version.php index 026339c48a..37afa48085 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53559'; +$wp_version = '6.1-alpha-53560'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.