unt = 1; $wp_query->max_num_pages = 1; unset( $wp_query->query['error'] ); $wp_query->query_vars['error'] = ''; // We need to add the post object to the cache so that get_post() calls don't trigger database calls. wp_cache_add( $postId, $postObject, 'posts' ); $GLOBALS['wp_query'] = $wp_query; $wp->register_globals(); // Setting is_404 is not sufficient, so we still need to change the status code. status_header( 200 ); } /** * Get the canonical URL for the dedicated HTML sitemap page. * * @since 4.5.7 * * @param string $originalUrl The canonical URL. * @return string The canonical URL. */ public function getCanonicalUrl( $originalUrl ) { $sitemapOptions = aioseo()->options->sitemap->html; if ( ! $sitemapOptions->enable || ! $this->isDedicatedPage ) { return $originalUrl; } // If the user has set a custom URL for the sitemap page, use that. if ( $sitemapOptions->pageUrl ) { return $sitemapOptions->pageUrl; } // Return the current URL of WP. global $wp; return home_url( $wp->request ); } } } namespace { // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! function_exists( 'aioseo_html_sitemap' ) ) { /** * Global function that can be used to print the HTML sitemap. * * @since 4.1.3 * * @param array $attributes User-defined attributes that override the default settings. * @param boolean $echo Whether to echo the output or return it. * @return string The HTML sitemap code. */ function aioseo_html_sitemap( $attributes = [], $echo = true ) { $attributes = aioseo()->htmlSitemap->frontend->getAttributes( $attributes ); return aioseo()->htmlSitemap->frontend->output( $echo, $attributes ); } } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Sitemap\Html\Sitemap" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php:312 Stack trace: #0 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #2 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #3 /htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(96): aioseo() #4 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #5 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php on line 312