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

Fixes #48061

git-svn-id: https://develop.svn.wordpress.org/trunk@47509 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2020-03-26 17:41:14 +00:00
parent d8c8058309
commit f5550907e1

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 ) );
}
/**