WPSEO_Option_Wpseo::verify_features_against_network()
Verifies that the feature variables are turned off if the network is configured so.
Метод класса: WPSEO_Option_Wpseo{}
Хуков нет.
Возвращает
Разное
. Filtered $options value.
Использование
$WPSEO_Option_Wpseo = new WPSEO_Option_Wpseo(); $WPSEO_Option_Wpseo->verify_features_against_network( $options );
- $options(разное)
- Value of the option to be returned. Typically an array.
По умолчанию: []
Код WPSEO_Option_Wpseo::verify_features_against_network() WPSEO Option Wpseo::verify features against network Yoast 24.9
public function verify_features_against_network( $options = [] ) { if ( ! is_array( $options ) || empty( $options ) ) { return $options; } // For the feature variables, set their values to off in case they are disabled. $feature_vars = [ 'disableadvanced_meta' => false, 'ryte_indexability' => false, 'content_analysis_active' => false, 'keyword_analysis_active' => false, 'inclusive_language_analysis_active' => false, 'enable_admin_bar_menu' => false, 'enable_cornerstone_content' => false, 'enable_xml_sitemap' => false, 'enable_text_link_counter' => false, 'enable_metabox_insights' => false, 'enable_link_suggestions' => false, 'enable_headless_rest_endpoints' => false, 'tracking' => false, 'enable_enhanced_slack_sharing' => false, 'semrush_integration_active' => false, 'wincher_integration_active' => false, 'remove_feed_global' => false, 'remove_feed_global_comments' => false, 'remove_feed_post_comments' => false, 'enable_index_now' => false, 'enable_ai_generator' => false, 'remove_feed_authors' => false, 'remove_feed_categories' => false, 'remove_feed_tags' => false, 'remove_feed_custom_taxonomies' => false, 'remove_feed_post_types' => false, 'remove_feed_search' => false, 'remove_atom_rdf_feeds' => false, 'remove_shortlinks' => false, 'remove_rest_api_links' => false, 'remove_rsd_wlw_links' => false, 'remove_oembed_links' => false, 'remove_generator' => false, 'remove_emoji_scripts' => false, 'remove_powered_by_header' => false, 'remove_pingback_header' => false, 'clean_campaign_tracking_urls' => false, 'clean_permalinks' => false, 'search_cleanup' => false, 'search_cleanup_emoji' => false, 'search_cleanup_patterns' => false, 'redirect_search_pretty_urls' => false, 'algolia_integration_active' => false, ]; // We can reuse this logic from the base class with the above defaults to parse with the correct feature values. $options = $this->prevent_disabled_options_update( $options, $feature_vars ); return $options; }