Themes: Use `add_action` for `pre_get_posts` hook in `_add_template_loader_filters()`.

Although `add_action` and `add_filter` are internally the same, `pre_get_posts` is an action hook.  This change updates the hook type to match what developers would expect when evaluating the code.

Follow-up to [52316].

Props swissspidy, riccardodicurti.
Fixes #57097.
Built from https://develop.svn.wordpress.org/trunk@55335


git-svn-id: http://core.svn.wordpress.org/trunk@54868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald 2023-02-14 15:57:21 +00:00
parent 6e59ccc47e
commit f1e01d188c
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ function _add_template_loader_filters() {
// Request to resolve a template.
if ( isset( $_GET['_wp-find-template'] ) ) {
add_filter( 'pre_get_posts', '_resolve_template_for_new_post' );
add_action( 'pre_get_posts', '_resolve_template_for_new_post' );
}
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta1-55334';
$wp_version = '6.2-beta1-55335';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.