Query: Introduce an action which gets fired when a 404 is triggered.

Fixes #48061
Built from https://develop.svn.wordpress.org/trunk@47509


git-svn-id: http://core.svn.wordpress.org/trunk@47284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2020-03-26 17:43:07 +00:00
parent b9869da157
commit 33d4f0573c
2 changed files with 10 additions and 1 deletions

View File

@ -1711,6 +1711,15 @@ class WP_Query {
$this->is_404 = true;
$this->is_feed = $is_feed;
/**
* Fires after a 404 is triggered.
*
* @since 5.5.0
*
* @param WP_Query $this The WP_Query instance (passed by reference).
*/
do_action_ref_array( 'set_404', array( $this ) );
}
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-47508';
$wp_version = '5.5-alpha-47509';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.