public static function InstapageCmsPluginWPConnector::return404 in Instapage plugin 7.3
Same name and namespace in other branches
- 8.3 core/connectors/InstapageCmsPluginWPConnector.php \InstapageCmsPluginWPConnector::return404()
Return 404 page using native wordpress method.
Return 404 page using native wordpress method and prevent from any 301 redirection like removing duplicated slashes guessing url etc. Those 301 redirects are native wordpress functionality.
1 call to InstapageCmsPluginWPConnector::return404()
- InstapageCmsPluginWPConnector::checkPage in core/
connectors/ InstapageCmsPluginWPConnector.php - Checks (and displays) if a landing page should be displayed instead of normal content served by CMS.
File
- core/
connectors/ InstapageCmsPluginWPConnector.php, line 608
Class
- InstapageCmsPluginWPConnector
- Class that utilizes native WordPress functions to perform actions like remote requests and DB operations.
Code
public static function return404() {
global $wp_query;
// remove redirections
remove_filter('template_redirect', 'redirect_canonical');
// Guess it's time to 404.
$wp_query
->set_404();
}