Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordpres.../admin/tracking
File: class-tracking-settings-data.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin\Tracking
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Collects anonymized settings data.
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Tracking_Settings_Data implements WPSEO_Collection {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* The options that need to be anonymized before they can be sent elsewhere.
[13] Fix | Delete
*
[14] Fix | Delete
* @var array All of the option_names which need to be
[15] Fix | Delete
* anonymized before they can be sent elsewhere.
[16] Fix | Delete
*/
[17] Fix | Delete
private $anonymous_settings = [
[18] Fix | Delete
'baiduverify',
[19] Fix | Delete
'googleverify',
[20] Fix | Delete
'msverify',
[21] Fix | Delete
'yandexverify',
[22] Fix | Delete
'myyoast-oauth',
[23] Fix | Delete
'website_name',
[24] Fix | Delete
'alternate_website_name',
[25] Fix | Delete
'company_logo',
[26] Fix | Delete
'company_name',
[27] Fix | Delete
'company_alternate_name',
[28] Fix | Delete
'person_name',
[29] Fix | Delete
'person_logo',
[30] Fix | Delete
'person_logo_id',
[31] Fix | Delete
'company_logo_id',
[32] Fix | Delete
'facebook_site',
[33] Fix | Delete
'instagram_url',
[34] Fix | Delete
'linkedin_url',
[35] Fix | Delete
'myspace_url',
[36] Fix | Delete
'og_default_image',
[37] Fix | Delete
'og_default_image_id',
[38] Fix | Delete
'og_frontpage_title',
[39] Fix | Delete
'og_frontpage_desc',
[40] Fix | Delete
'og_frontpage_image',
[41] Fix | Delete
'og_frontpage_image_id',
[42] Fix | Delete
'open_graph_frontpage_title',
[43] Fix | Delete
'open_graph_frontpage_desc',
[44] Fix | Delete
'open_graph_frontpage_image',
[45] Fix | Delete
'open_graph_frontpage_image_id',
[46] Fix | Delete
'other_social_urls',
[47] Fix | Delete
'mastodon_url',
[48] Fix | Delete
'pinterest_url',
[49] Fix | Delete
'pinterestverify',
[50] Fix | Delete
'twitter_site',
[51] Fix | Delete
'youtube_url',
[52] Fix | Delete
'wikipedia_url',
[53] Fix | Delete
'semrush_tokens',
[54] Fix | Delete
'zapier_api_key',
[55] Fix | Delete
'wincher_tokens',
[56] Fix | Delete
'wincher_website_id',
[57] Fix | Delete
'least_readability_ignore_list',
[58] Fix | Delete
'least_seo_score_ignore_list',
[59] Fix | Delete
'most_linked_ignore_list',
[60] Fix | Delete
'least_linked_ignore_list',
[61] Fix | Delete
'indexables_page_reading_list',
[62] Fix | Delete
'publishing_principles_id',
[63] Fix | Delete
'ownership_funding_info_id',
[64] Fix | Delete
'actionable_feedback_policy_id',
[65] Fix | Delete
'corrections_policy_id',
[66] Fix | Delete
'ethics_policy_id',
[67] Fix | Delete
'diversity_policy_id',
[68] Fix | Delete
'diversity_staffing_report_id',
[69] Fix | Delete
];
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* The options we want to track.
[73] Fix | Delete
*
[74] Fix | Delete
* @var array The option_names for the options we want to track.
[75] Fix | Delete
*/
[76] Fix | Delete
private $include_list = [
[77] Fix | Delete
'ms_defaults_set',
[78] Fix | Delete
'version',
[79] Fix | Delete
'disableadvanced_meta',
[80] Fix | Delete
'ryte_indexability',
[81] Fix | Delete
'baiduverify',
[82] Fix | Delete
'googleverify',
[83] Fix | Delete
'msverify',
[84] Fix | Delete
'yandexverify',
[85] Fix | Delete
'site_type',
[86] Fix | Delete
'has_multiple_authors',
[87] Fix | Delete
'environment_type',
[88] Fix | Delete
'content_analysis_active',
[89] Fix | Delete
'keyword_analysis_active',
[90] Fix | Delete
'inclusive_language_analysis_active',
[91] Fix | Delete
'enable_admin_bar_menu',
[92] Fix | Delete
'enable_cornerstone_content',
[93] Fix | Delete
'enable_xml_sitemap',
[94] Fix | Delete
'enable_text_link_counter',
[95] Fix | Delete
'show_onboarding_notice',
[96] Fix | Delete
'first_activated_on',
[97] Fix | Delete
'myyoast-oauth',
[98] Fix | Delete
'dynamic_permalinks',
[99] Fix | Delete
'website_name',
[100] Fix | Delete
'alternate_website_name',
[101] Fix | Delete
'company_logo',
[102] Fix | Delete
'company_name',
[103] Fix | Delete
'company_or_person',
[104] Fix | Delete
'person_name',
[105] Fix | Delete
'forcerewritetitle',
[106] Fix | Delete
'separator',
[107] Fix | Delete
'title-home-wpseo',
[108] Fix | Delete
'title-author-wpseo',
[109] Fix | Delete
'title-archive-wpseo',
[110] Fix | Delete
'title-search-wpseo',
[111] Fix | Delete
'title-404-wpseo',
[112] Fix | Delete
'metadesc-home-wpseo',
[113] Fix | Delete
'metadesc-author-wpseo',
[114] Fix | Delete
'metadesc-archive-wpseo',
[115] Fix | Delete
'rssbefore',
[116] Fix | Delete
'rssafter',
[117] Fix | Delete
'noindex-author-wpseo',
[118] Fix | Delete
'noindex-author-noposts-wpseo',
[119] Fix | Delete
'noindex-archive-wpseo',
[120] Fix | Delete
'disable-author',
[121] Fix | Delete
'disable-date',
[122] Fix | Delete
'disable-post_format',
[123] Fix | Delete
'disable-attachment',
[124] Fix | Delete
'breadcrumbs-404crumb',
[125] Fix | Delete
'breadcrumbs-display-blog-page',
[126] Fix | Delete
'breadcrumbs-boldlast',
[127] Fix | Delete
'breadcrumbs-archiveprefix',
[128] Fix | Delete
'breadcrumbs-enable',
[129] Fix | Delete
'breadcrumbs-home',
[130] Fix | Delete
'breadcrumbs-prefix',
[131] Fix | Delete
'breadcrumbs-searchprefix',
[132] Fix | Delete
'breadcrumbs-sep',
[133] Fix | Delete
'person_logo',
[134] Fix | Delete
'person_logo_id',
[135] Fix | Delete
'company_logo_id',
[136] Fix | Delete
'company_or_person_user_id',
[137] Fix | Delete
'stripcategorybase',
[138] Fix | Delete
'noindex-post',
[139] Fix | Delete
'display-metabox-pt-post',
[140] Fix | Delete
'noindex-page',
[141] Fix | Delete
'display-metabox-pt-page',
[142] Fix | Delete
'noindex-attachment',
[143] Fix | Delete
'display-metabox-pt-attachment',
[144] Fix | Delete
'display-metabox-tax-category',
[145] Fix | Delete
'noindex-tax-category',
[146] Fix | Delete
'display-metabox-tax-post_tag',
[147] Fix | Delete
'noindex-tax-post_tag',
[148] Fix | Delete
'display-metabox-tax-post_format',
[149] Fix | Delete
'noindex-tax-post_format',
[150] Fix | Delete
'taxonomy-category-ptparent',
[151] Fix | Delete
'taxonomy-post_tag-ptparent',
[152] Fix | Delete
'taxonomy-post_format-ptparent',
[153] Fix | Delete
'breadcrumbs-blog-remove',
[154] Fix | Delete
'hideeditbox-post',
[155] Fix | Delete
'hideeditbox-page',
[156] Fix | Delete
'hideeditbox-attachment',
[157] Fix | Delete
'hideeditbox-tax-category',
[158] Fix | Delete
'hideeditbox-tax-post_tag',
[159] Fix | Delete
'hideeditbox-tax-post_format',
[160] Fix | Delete
'facebook_site',
[161] Fix | Delete
'instagram_url',
[162] Fix | Delete
'linkedin_url',
[163] Fix | Delete
'myspace_url',
[164] Fix | Delete
'og_default_image',
[165] Fix | Delete
'og_default_image_id',
[166] Fix | Delete
'og_frontpage_title',
[167] Fix | Delete
'og_frontpage_desc',
[168] Fix | Delete
'og_frontpage_image',
[169] Fix | Delete
'og_frontpage_image_id',
[170] Fix | Delete
'open_graph_frontpage_title',
[171] Fix | Delete
'open_graph_frontpage_desc',
[172] Fix | Delete
'open_graph_frontpage_image',
[173] Fix | Delete
'open_graph_frontpage_image_id',
[174] Fix | Delete
'opengraph',
[175] Fix | Delete
'pinterest_url',
[176] Fix | Delete
'pinterestverify',
[177] Fix | Delete
'twitter',
[178] Fix | Delete
'twitter_site',
[179] Fix | Delete
'twitter_card_type',
[180] Fix | Delete
'youtube_url',
[181] Fix | Delete
'wikipedia_url',
[182] Fix | Delete
'mastodon_url',
[183] Fix | Delete
'indexables_indexing_completed',
[184] Fix | Delete
'semrush_integration_active',
[185] Fix | Delete
'semrush_tokens',
[186] Fix | Delete
'semrush_country_code',
[187] Fix | Delete
'enable_enhanced_slack_sharing',
[188] Fix | Delete
'zapier_integration_active',
[189] Fix | Delete
'zapier_api_key',
[190] Fix | Delete
'enable_metabox_insights',
[191] Fix | Delete
'enable_link_suggestions',
[192] Fix | Delete
'enable_index_now',
[193] Fix | Delete
'enable_ai_generator',
[194] Fix | Delete
'workouts',
[195] Fix | Delete
'wincher_integration_active',
[196] Fix | Delete
'wincher_tokens',
[197] Fix | Delete
'wincher_website_id',
[198] Fix | Delete
'wincher_automatically_add_keyphrases',
[199] Fix | Delete
'first_time_install',
[200] Fix | Delete
'other_social_urls',
[201] Fix | Delete
'remove_feed_global',
[202] Fix | Delete
'remove_feed_global_comments',
[203] Fix | Delete
'remove_feed_post_comments',
[204] Fix | Delete
'remove_feed_authors',
[205] Fix | Delete
'remove_feed_categories',
[206] Fix | Delete
'remove_feed_tags',
[207] Fix | Delete
'remove_feed_custom_taxonomies',
[208] Fix | Delete
'remove_feed_post_types',
[209] Fix | Delete
'remove_feed_search',
[210] Fix | Delete
'remove_atom_rdf_feeds',
[211] Fix | Delete
'remove_shortlinks',
[212] Fix | Delete
'remove_rest_api_links',
[213] Fix | Delete
'remove_rsd_wlw_links',
[214] Fix | Delete
'remove_oembed_links',
[215] Fix | Delete
'remove_generator',
[216] Fix | Delete
'remove_emoji_scripts',
[217] Fix | Delete
'remove_powered_by_header',
[218] Fix | Delete
'remove_pingback_header',
[219] Fix | Delete
'clean_campaign_tracking_urls',
[220] Fix | Delete
'clean_permalinks',
[221] Fix | Delete
'clean_permalinks_extra_variables',
[222] Fix | Delete
'search_cleanup',
[223] Fix | Delete
'search_cleanup_emoji',
[224] Fix | Delete
'search_cleanup_patterns',
[225] Fix | Delete
'search_character_limit',
[226] Fix | Delete
'redirect_search_pretty_urls',
[227] Fix | Delete
'indexables_overview_state',
[228] Fix | Delete
'deny_search_crawling',
[229] Fix | Delete
'deny_wp_json_crawling',
[230] Fix | Delete
'deny_adsbot_crawling',
[231] Fix | Delete
'deny_ccbot_crawling',
[232] Fix | Delete
'deny_google_extended_crawling',
[233] Fix | Delete
'deny_gptbot_crawling',
[234] Fix | Delete
'last_known_no_unindexed',
[235] Fix | Delete
];
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* Returns the collection data.
[239] Fix | Delete
*
[240] Fix | Delete
* @return array The collection data.
[241] Fix | Delete
*/
[242] Fix | Delete
public function get() {
[243] Fix | Delete
/**
[244] Fix | Delete
* Filter: 'wpseo_tracking_settings_include_list' - Allow filtering the settings included in tracking.
[245] Fix | Delete
*
[246] Fix | Delete
* @param string $include_list The list with included setting names.
[247] Fix | Delete
*/
[248] Fix | Delete
$this->include_list = apply_filters( 'wpseo_tracking_settings_include_list', $this->include_list );
[249] Fix | Delete
[250] Fix | Delete
$options = WPSEO_Options::get_all();
[251] Fix | Delete
// Returns the settings of which the keys intersect with the values of the include list.
[252] Fix | Delete
$options = array_intersect_key( $options, array_flip( $this->include_list ) );
[253] Fix | Delete
[254] Fix | Delete
return [
[255] Fix | Delete
'settings' => $this->anonymize_settings( $options ),
[256] Fix | Delete
];
[257] Fix | Delete
}
[258] Fix | Delete
[259] Fix | Delete
/**
[260] Fix | Delete
* Anonimizes the WPSEO_Options array by replacing all $anonymous_settings values to 'used'.
[261] Fix | Delete
*
[262] Fix | Delete
* @param array $settings The settings.
[263] Fix | Delete
*
[264] Fix | Delete
* @return array The anonymized settings.
[265] Fix | Delete
*/
[266] Fix | Delete
private function anonymize_settings( $settings ) {
[267] Fix | Delete
foreach ( $this->anonymous_settings as $setting ) {
[268] Fix | Delete
if ( ! empty( $settings[ $setting ] ) ) {
[269] Fix | Delete
$settings[ $setting ] = 'used';
[270] Fix | Delete
}
[271] Fix | Delete
}
[272] Fix | Delete
[273] Fix | Delete
return $settings;
[274] Fix | Delete
}
[275] Fix | Delete
}
[276] Fix | Delete
[277] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function