WP_Query::set_404() – Sets the 404 property and saves whether query is feed.
You appear to be a bot. Output may be restricted
Description
Sets the 404 property and saves whether query is feed.
Usage
WP_Query::set_404();
Parameters
Returns
void
Source
File name: wordpress/wp-includes/class-wp-query.php
Lines:
1 to 17 of 17
public function set_404() { $is_feed = $this->WP_Query::is_feed; $this->WP_Query::init_query_flags(); $this->WP_Query::is_404 = true; $this->WP_Query::is_feed = $is_feed; /** * Fires after a 404 is triggered. * * @since 5.5.0 * * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'set_404', array( $this ) ); }