$this->admin_asset_manager->add_inline_script( 'workouts', \sprintf( 'window.wpseoWorkoutsData["configuration"] = { "companyOrPerson": "%s", "companyOrPersonLabel": "%s", "companyName": "%s", "companyLogo": "%s", "companyLogoId": %d, "personId": %d, "personLogo": "%s", "personLogoId": %d, "siteTagline": "%s", "socialProfiles": { "facebookUrl": "%s", "twitterUsername": "%s", "instagramUrl": "%s", "linkedinUrl": "%s", "myspaceUrl": "%s", "pinterestUrl": "%s", "youtubeUrl": "%s", "wikipediaUrl": "%s", }, "tracking": %d, "companyOrPersonOptions": %s, "shouldForceCompany": %d, "knowledgeGraphMessage": "%s", "shortlinks": { "workoutGuide": "%s", "indexData": "%s", "gdpr": "%s", }, };', $this->is_company_or_person(), $selected_option_label, $this->get_company_name(), $this->get_company_logo(), $this->get_company_logo_id(), $this->get_person_id(), $this->get_person_logo(), $this->get_person_logo_id(), $this->get_site_tagline(), $social_profiles['facebook_url'], $social_profiles['twitter_username'], $social_profiles['instagram_url'], $social_profiles['linkedin_url'], $social_profiles['myspace_url'], $social_profiles['pinterest_url'], $social_profiles['youtube_url'], $social_profiles['wikipedia_url'], $this->has_tracking_enabled(), WPSEO_Utils::format_json_encode( $options ), $this->should_force_company(), $knowledge_graph_message, $this->shortlinker->build_shortlink( 'https://yoa.st/config-workout-guide' ), $this->shortlinker->build_shortlink( 'https://yoa.st/config-workout-index-data' ), $this->shortlinker->build_shortlink( 'https://yoa.st/gdpr-config-workout' ) ), 'before' ); } /** * Retrieves a list of the endpoints to use. * * @return array The endpoints. */ protected function get_endpoints() { $endpoints = [ 'prepare' => Indexing_Route::FULL_PREPARE_ROUTE, 'terms' => Indexing_Route::FULL_TERMS_ROUTE, 'posts' => Indexing_Route::FULL_POSTS_ROUTE, 'archives' => Indexing_Route::FULL_POST_TYPE_ARCHIVES_ROUTE, 'general' => Indexing_Route::FULL_GENERAL_ROUTE, 'indexablesComplete' => Indexing_Route::FULL_INDEXABLES_COMPLETE_ROUTE, 'post_link' => Indexing_Route::FULL_POST_LINKS_INDEXING_ROUTE, 'term_link' => Indexing_Route::FULL_TERM_LINKS_INDEXING_ROUTE, ]; $endpoints = \apply_filters( 'wpseo_indexing_endpoints', $endpoints ); $endpoints['complete'] = Indexing_Route::FULL_COMPLETE_ROUTE; return $endpoints; } // ** Private functions ** // /** * Returns the entity represented by the site. * * @return string The entity represented by the site. */ private function is_company_or_person() { return $this->options_helper->get( 'company_or_person', '' ); } /** * Gets the company name from the option in the database. * * @return string The company name. */ private function get_company_name() { return $this->options_helper->get( 'company_name', '' ); } /** * Gets the company logo from the option in the database. * * @return string The company logo. */ private function get_company_logo() { return $this->options_helper->get( 'company_logo', '' ); } /** * Gets the company logo id from the option in the database. * * @return string The company logo id. */ private function get_company_logo_id() { return $this->options_helper->get( 'company_logo_id', '' ); } /** * Gets the person id from the option in the database. * * @return int|null The person id, null if empty. */ private function get_person_id() { return $this->options_helper->get( 'company_or_person_user_id' ); } /** * Gets the person avatar from the option in the database. * * @return string The person logo. */ private function get_person_logo() { return $this->options_helper->get( 'person_logo', '' ); } /** * Gets the person logo id from the option in the database. * * @return string The person logo id. */ private function get_person_logo_id() { return $this->options_helper->get( 'person_logo_id', '' ); } /** * Gets the site tagline. * * @return string The site tagline. */ private function get_site_tagline() { return \get_bloginfo( 'description' ); } /** * Gets the social profiles stored in the database. * * @return string[] The social profiles. */ private function get_social_profiles() { return [ 'facebook_url' => $this->options_helper->get( 'facebook_site', '' ), 'twitter_username' => $this->options_helper->get( 'twitter_site', '' ), 'instagram_url' => $this->options_helper->get( 'instagram_url', '' ), 'linkedin_url' => $this->options_helper->get( 'linkedin_url', '' ), 'myspace_url' => $this->options_helper->get( 'myspace_url', '' ), 'pinterest_url' => $this->options_helper->get( 'pinterest_url', '' ), 'youtube_url' => $this->options_helper->get( 'youtube_url', '' ), 'wikipedia_url' => $this->options_helper->get( 'wikipedia_url', '' ), ]; } /** * Checks whether tracking is enabled. * * @return bool True if tracking is enabled, false otherwise, null if in Free and conf. workout step not finished. */ private function has_tracking_enabled() { $default = false; if ( $this->product_helper->is_premium() ) { $default = true; } return $this->options_helper->get( 'tracking', $default ); } /** * Gets the options for the Company or Person select. * Returns only the company option if it is forced (by Local SEO), otherwise returns company and person option. * * @return array The options for the company-or-person select. */ private function get_company_or_person_options() { $options = [ [ 'name' => \__( 'Organization', 'wordpress-seo' ), 'value' => 'company', ], ]; if ( ! $this->should_force_company() ) { $options[] = [ 'name' => \__( 'Person', 'wordpress-seo' ), 'value' => 'person', ]; } return $options; } /** * Checks whether we should force "Organization". * * @return bool */ private function should_force_company() { return $this->addon_manager->is_installed( WPSEO_Addon_Manager::LOCAL_SLUG ); } }
Fatal error: Uncaught Error: Class "Yoast\WP\SEO\Integrations\Admin\Configuration_Workout_Integration" not found in /htdocs/wp-content/plugins/wordpress-seo/src/loader.php:228 Stack trace: #0 /htdocs/wp-content/plugins/wordpress-seo/src/loader.php(197): Yoast\WP\SEO\Loader->conditionals_are_met('Yoast\\WP\\SEO\\In...') #1 /htdocs/wp-includes/class-wp-hook.php(324): Yoast\WP\SEO\Loader->load_integrations('') #2 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /htdocs/wp-settings.php(700): do_action('init') #5 /htdocs/wp-config.php(98): 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/wordpress-seo/src/loader.php on line 228