equency( $pageType, $object = false, $objectType = '' ) { // Store setting values in static properties so that we can cache them. // Otherwise this has a significant impact on the load time of the sitemap. if ( ! self::$advanced ) { self::$advanced = aioseo()->options->sitemap->general->advancedSettings->enable; } if ( ! isset( self::$globalFrequency[ $pageType . $objectType ] ) ) { $options = aioseo()->options->noConflict(); $pageTypeConditional = 'date' === $pageType ? 'archive' : $pageType; self::$globalFrequency[ $pageType . $objectType ] = self::$advanced && $options->sitemap->general->advancedSettings->priority->has( $pageTypeConditional ) ? json_decode( $options->sitemap->general->advancedSettings->priority->$pageTypeConditional->frequency ) : false; } if ( ! isset( self::$grouped[ $pageType . $objectType ] ) ) { $options = aioseo()->options->noConflict(); self::$grouped[ $pageType . $objectType ] = self::$advanced && $options->sitemap->general->advancedSettings->priority->has( $pageType ) && $options->sitemap->general->advancedSettings->priority->$pageType->has( 'grouped' ) ? $options->sitemap->general->advancedSettings->priority->$pageType->grouped : true; } if ( empty( self::$grouped[ $pageType . $objectType ] ) && self::$advanced ) { if ( ! isset( self::$objectTypeFrequency[ $pageType . $objectType ] ) ) { $dynamicOptions = aioseo()->dynamicOptions->noConflict(); self::$objectTypeFrequency[ $pageType . $objectType ] = $dynamicOptions->sitemap->priority->has( $pageType ) && $dynamicOptions->sitemap->priority->$pageType->has( $objectType ) ? json_decode( $dynamicOptions->sitemap->priority->$pageType->$objectType->frequency ) : false; } } $frequency = $this->defaultFrequency( $pageType ); if ( self::$globalFrequency[ $pageType . $objectType ] ) { $defaultValue = ! self::$grouped[ $pageType . $objectType ] && self::$advanced && ! empty( self::$objectTypeFrequency[ $pageType . $objectType ] ) ? self::$objectTypeFrequency[ $pageType . $objectType ] : self::$globalFrequency[ $pageType . $objectType ]; $frequency = 'default' === $defaultValue->value ? $frequency : $defaultValue->value; } return $frequency; } /** * Returns the default priority for the page. * * @since 4.0.0 * * @param string $pageType The type of page. * @return float The default priority. */ private function defaultPriority( $pageType ) { $defaults = [ 'homePage' => 1.0, 'blog' => 0.9, 'sitemap' => 0.8, 'postTypes' => 0.7, 'archive' => 0.5, 'author' => 0.3, 'taxonomies' => 0.3, 'other' => 0.5 ]; if ( array_key_exists( $pageType, $defaults ) ) { return $defaults[ $pageType ]; } return $defaults['other']; } /** * Returns the default frequency for the page. * * @since 4.0.0 * * @param string $pageType The type of page. * @return float The default frequency. */ private function defaultFrequency( $pageType ) { $defaults = [ 'homePage' => 'always', 'sitemap' => 'hourly', 'blog' => 'daily', 'postTypes' => 'weekly', 'author' => 'weekly', 'archive' => 'monthly', 'taxonomies' => 'monthly', 'other' => 'weekly' ]; if ( array_key_exists( $pageType, $defaults ) ) { return $defaults[ $pageType ]; } return $defaults['other']; } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Sitemap\Priority" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Sitemap.php:92 Stack trace: #0 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(311): AIOSEO\Plugin\Common\Sitemap\Sitemap->__construct() #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #2 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #3 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #4 /htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(96): aioseo() #5 /htdocs/wp-settings.php(522): include_once('/htdocs/wp-cont...') #6 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #7 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #8 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #9 /htdocs/index.php(17): require('/htdocs/wp-blog...') #10 {main} thrown in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Sitemap.php on line 92