ly for the current request so that we don't serve a blank page. $this->doesFileExist(); $options = aioseo()->options->noConflict(); if ( ! $options->sitemap->{aioseo()->sitemap->type}->enable ) { $this->notFoundPage(); return; } $entries = aioseo()->sitemap->content->get(); $total = aioseo()->sitemap->content->getTotal(); if ( ! $entries ) { $addonsEntries = aioseo()->addons->doAddonFunction( 'content', 'get' ); $addonTotals = aioseo()->addons->doAddonFunction( 'content', 'getTotal' ); foreach ( $addonsEntries as $addonSlug => $addonEntries ) { if ( ! empty( $addonEntries ) ) { $entries = $addonEntries; $total = ! empty( $addonTotals[ $addonSlug ] ) ? $addonTotals[ $addonSlug ] : count( $entries ); break; } } } if ( 0 === $total && empty( $entries ) ) { status_header( 404 ); } $this->xsl->saveXslData( aioseo()->sitemap->requestParser->slug, $entries, $total ); $this->headers(); aioseo()->sitemap->output->output( $entries ); aioseo()->addons->doAddonFunction( 'output', 'output', [ $entries ] ); exit; } /** * Checks if static file should be served and generates it if it doesn't exist. * * This essentially acts as a safety net in case a file doesn't exist yet or has been deleted. * * @since 4.0.0 * * @return void */ protected function doesFileExist() { aioseo()->addons->doAddonFunction( 'sitemap', 'doesFileExist' ); if ( 'general' !== $this->type || ! aioseo()->options->sitemap->general->advancedSettings->enable || ! in_array( 'staticSitemap', aioseo()->internalOptions->internal->deprecatedOptions, true ) || aioseo()->options->sitemap->general->advancedSettings->dynamic ) { return; } require_once ABSPATH . 'wp-admin/includes/file.php'; if ( ! aioseo()->core->fs->exists( get_home_path() . $_SERVER['REQUEST_URI'] ) ) { $this->scheduleRegeneration(); } } /** * Sets the HTTP headers for the sitemap. * * @since 4.0.0 * * @return void */ public function headers() { $charset = aioseo()->helpers->getCharset(); header( "Content-Type: text/xml; charset=$charset", true ); header( 'X-Robots-Tag: noindex, follow', true ); } /** * Redirects to a 404 Not Found page if the sitemap is disabled. * * @since 4.0.0 * * @return void */ public function notFoundPage() { global $wp_query; $wp_query->set_404(); status_header( 404 ); include get_404_template(); exit; } /** * Registers an active sitemap addon and its classes. * NOTE: This is deprecated and only there for users who already were using the previous sitemap addons version. * * @final 4.2.7 * @since 4.0.0 * * @return void */ public function addAddon() {} }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Sitemap\Sitemap" not found in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Pro/Sitemap/Sitemap.php:17 Stack trace: #0 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/vendor/composer/ClassLoader.php(576): include() #1 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/home/valigeria...') #2 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(311): Composer\Autoload\ClassLoader->loadClass('AIOSEO\\Plugin\\P...') #3 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #4 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #5 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #6 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/all_in_one_seo_pack.php(96): aioseo() #7 /home/valigeria/public_html/wp-settings.php(517): include_once('/home/valigeria...') #8 /home/valigeria/public_html/wp-config.php(111): require_once('/home/valigeria...') #9 /home/valigeria/public_html/wp-load.php(50): require_once('/home/valigeria...') #10 /home/valigeria/public_html/wp-blog-header.php(13): require_once('/home/valigeria...') #11 /home/valigeria/public_html/index.php(17): require('/home/valigeria...') #12 {main} thrown in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Pro/Sitemap/Sitemap.php on line 17