ists( $namespace ) ) { return $namespace; } // If we can't find it in the root dir, check if we can find it in a sub dir. foreach ( $this->graphSubDirectories as $dirName ) { $namespace = "\AIOSEO\Plugin\Common\Schema\Graphs\\{$dirName}\\{$graphName}"; if ( class_exists( $namespace ) ) { return $namespace; } } return ''; } /** * Determines the smart graphs that need to be output by default, as well as the current context for the breadcrumbs. * * @since 4.2.5 * * @return void */ protected function determineSmartGraphsAndContext() { $this->graphs = array_merge( $this->graphs, $this->getDefaultGraphs() ); $contextInstance = new Context(); $this->context = $contextInstance->defaults(); if ( aioseo()->helpers->isDynamicHomePage() ) { $this->graphs[] = 'CollectionPage'; $this->context = $contextInstance->home(); return; } if ( is_home() || aioseo()->helpers->isWooCommerceShopPage() ) { $this->graphs[] = 'CollectionPage'; $this->context = $contextInstance->post(); return; } if ( is_singular() ) { $this->determineContextSingular( $contextInstance ); } if ( is_category() || is_tag() || is_tax() ) { $this->graphs[] = 'CollectionPage'; $this->context = $contextInstance->term(); return; } if ( is_author() ) { $this->graphs[] = 'ProfilePage'; $this->graphs[] = 'PersonAuthor'; $this->context = $contextInstance->author(); } if ( is_post_type_archive() ) { $this->graphs[] = 'CollectionPage'; $this->context = $contextInstance->postArchive(); return; } if ( is_date() ) { $this->graphs[] = 'CollectionPage'; $this->context = $contextInstance->date(); return; } if ( is_search() ) { $this->graphs[] = 'SearchResultsPage'; $this->context = $contextInstance->search(); return; } if ( is_404() ) { $this->context = $contextInstance->notFound(); } } /** * Determines the smart graphs and context for singular pages. * * @since 4.2.6 * * @param Context $contextInstance The Context class instance. * @return void */ protected function determineContextSingular( $contextInstance ) { // Check if we're on a BuddyPress member page. if ( function_exists( 'bp_is_user' ) && bp_is_user() ) { $this->graphs[] = 'ProfilePage'; } // If the current request is for the validator, we can't include the default graph here. // We need to include the default graph that the validator sent. // Don't do this if we're in Pro since we then need to get it from the post meta. if ( ! $this->generatingValidatorOutput ) { $this->graphs[] = $this->getDefaultPostGraph(); } $this->context = $contextInstance->post(); } /** * Returns the default graph for the post type. * * @since 4.2.6 * * @return string The default graph. */ public function getDefaultPostGraph() { return $this->getDefaultPostTypeGraph(); } /** * Returns the default graph for the current post type. * * @since 4.2.5 * * @param \WP_Post $post The post object. * @return string The default graph. */ public function getDefaultPostTypeGraph( $post = null ) { $post = $post ? $post : aioseo()->helpers->getPost(); if ( ! is_a( $post, 'WP_Post' ) ) { return ''; } $dynamicOptions = aioseo()->dynamicOptions->noConflict(); if ( ! $dynamicOptions->searchAppearance->postTypes->has( $post->post_type ) ) { return ''; } $defaultType = $dynamicOptions->searchAppearance->postTypes->{$post->post_type}->schemaType; switch ( $defaultType ) { case 'Article': return $dynamicOptions->searchAppearance->postTypes->{$post->post_type}->articleType; case 'WebPage': return $dynamicOptions->searchAppearance->postTypes->{$post->post_type}->webPageType; default: return $defaultType; } } /** * Returns the default graphs that should be output on every page, regardless of its type. * * @since 4.2.5 * * @return array The default graphs. */ protected function getDefaultGraphs() { $siteRepresents = ucfirst( aioseo()->options->searchAppearance->global->schema->siteRepresents ); return [ 'BreadcrumbList', 'Kg' . $siteRepresents, 'WebSite' ]; } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\Schema\Schema" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php:319 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 319