Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack
File: class.jetpack.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
[0] Fix | Delete
/**
[1] Fix | Delete
* The mega-class.
[2] Fix | Delete
*
[3] Fix | Delete
* This contains too much, so please think twice before adding more.
[4] Fix | Delete
*
[5] Fix | Delete
* @package automattic/jetpack
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
use Automattic\Jetpack\Assets;
[9] Fix | Delete
use Automattic\Jetpack\Boost_Speed_Score\Speed_Score;
[10] Fix | Delete
use Automattic\Jetpack\Config;
[11] Fix | Delete
use Automattic\Jetpack\Connection\Authorize_Json_Api;
[12] Fix | Delete
use Automattic\Jetpack\Connection\Client;
[13] Fix | Delete
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
[14] Fix | Delete
use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication;
[15] Fix | Delete
use Automattic\Jetpack\Connection\Secrets;
[16] Fix | Delete
use Automattic\Jetpack\Connection\Tokens;
[17] Fix | Delete
use Automattic\Jetpack\Connection\Webhooks\Authorize_Redirect;
[18] Fix | Delete
use Automattic\Jetpack\Constants;
[19] Fix | Delete
use Automattic\Jetpack\CookieState;
[20] Fix | Delete
use Automattic\Jetpack\Current_Plan as Jetpack_Plan;
[21] Fix | Delete
use Automattic\Jetpack\Device_Detection\User_Agent_Info;
[22] Fix | Delete
use Automattic\Jetpack\Errors;
[23] Fix | Delete
use Automattic\Jetpack\Files;
[24] Fix | Delete
use Automattic\Jetpack\Identity_Crisis;
[25] Fix | Delete
use Automattic\Jetpack\Licensing;
[26] Fix | Delete
use Automattic\Jetpack\Modules;
[27] Fix | Delete
use Automattic\Jetpack\My_Jetpack\Initializer as My_Jetpack_Initializer;
[28] Fix | Delete
use Automattic\Jetpack\Paths;
[29] Fix | Delete
use Automattic\Jetpack\Plugin\Deprecate;
[30] Fix | Delete
use Automattic\Jetpack\Plugin\Tracking as Plugin_Tracking;
[31] Fix | Delete
use Automattic\Jetpack\Redirect;
[32] Fix | Delete
use Automattic\Jetpack\Status;
[33] Fix | Delete
use Automattic\Jetpack\Status\Host;
[34] Fix | Delete
use Automattic\Jetpack\Status\Visitor;
[35] Fix | Delete
use Automattic\Jetpack\Sync\Actions as Sync_Actions;
[36] Fix | Delete
use Automattic\Jetpack\Sync\Health;
[37] Fix | Delete
use Automattic\Jetpack\Sync\Sender;
[38] Fix | Delete
use Automattic\Jetpack\Terms_Of_Service;
[39] Fix | Delete
use Automattic\Jetpack\Tracking;
[40] Fix | Delete
[41] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[42] Fix | Delete
exit( 0 );
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
/*
[46] Fix | Delete
Options:
[47] Fix | Delete
jetpack_options (array)
[48] Fix | Delete
An array of options.
[49] Fix | Delete
@see Jetpack_Options::get_option_names()
[50] Fix | Delete
[51] Fix | Delete
jetpack_register (string)
[52] Fix | Delete
Temporary verification secrets.
[53] Fix | Delete
[54] Fix | Delete
jetpack_activated (int)
[55] Fix | Delete
1: the plugin was activated normally
[56] Fix | Delete
2: the plugin was activated on this site because of a network-wide activation
[57] Fix | Delete
3: the plugin was auto-installed
[58] Fix | Delete
4: the plugin was manually disconnected (but is still installed)
[59] Fix | Delete
[60] Fix | Delete
jetpack_active_modules (array)
[61] Fix | Delete
Array of active module slugs.
[62] Fix | Delete
[63] Fix | Delete
jetpack_do_activate (bool)
[64] Fix | Delete
Flag for "activating" the plugin on sites where the activation hook never fired (auto-installs)
[65] Fix | Delete
*/
[66] Fix | Delete
[67] Fix | Delete
require_once JETPACK__PLUGIN_DIR . '_inc/lib/class.media.php';
[68] Fix | Delete
[69] Fix | Delete
/**
[70] Fix | Delete
* The Jetpack class.
[71] Fix | Delete
*/
[72] Fix | Delete
class Jetpack {
[73] Fix | Delete
/**
[74] Fix | Delete
* XMLRPC server instance.
[75] Fix | Delete
*
[76] Fix | Delete
* @var null|Jetpack_XMLRPC_Server XMLRPC server used by Jetpack.
[77] Fix | Delete
*/
[78] Fix | Delete
public $xmlrpc_server = null;
[79] Fix | Delete
[80] Fix | Delete
/**
[81] Fix | Delete
* Contains all assets that have had their URL rewritten to minified versions.
[82] Fix | Delete
*
[83] Fix | Delete
* @var array
[84] Fix | Delete
*/
[85] Fix | Delete
public static $min_assets = array();
[86] Fix | Delete
[87] Fix | Delete
/**
[88] Fix | Delete
* Plugins to deactivate.
[89] Fix | Delete
*
[90] Fix | Delete
* @var array Plugins to deactivate by module.
[91] Fix | Delete
*/
[92] Fix | Delete
public $plugins_to_deactivate = array(
[93] Fix | Delete
'contact-form' => array(
[94] Fix | Delete
array( 'grunion-contact-form/grunion-contact-form.php', 'Grunion Contact Form' ),
[95] Fix | Delete
array( 'mullet/mullet-contact-form.php', 'Mullet Contact Form' ),
[96] Fix | Delete
),
[97] Fix | Delete
'gravatar-hovercards' => array(
[98] Fix | Delete
array( 'jetpack-gravatar-hovercards/gravatar-hovercards.php', 'Jetpack Gravatar Hovercards' ),
[99] Fix | Delete
),
[100] Fix | Delete
'latex' => array(
[101] Fix | Delete
array( 'wp-latex/wp-latex.php', 'WP LaTeX' ),
[102] Fix | Delete
),
[103] Fix | Delete
'sharedaddy' => array(
[104] Fix | Delete
array( 'sharedaddy/sharedaddy.php', 'Sharedaddy' ),
[105] Fix | Delete
array( 'jetpack-sharing/sharedaddy.php', 'Jetpack Sharing' ),
[106] Fix | Delete
),
[107] Fix | Delete
'shortlinks' => array(
[108] Fix | Delete
array( 'stats/stats.php', 'WordPress.com Stats' ),
[109] Fix | Delete
),
[110] Fix | Delete
'stats' => array(
[111] Fix | Delete
array( 'stats/stats.php', 'WordPress.com Stats' ),
[112] Fix | Delete
),
[113] Fix | Delete
'twitter-widget' => array(
[114] Fix | Delete
array( 'wickett-twitter-widget/wickett-twitter-widget.php', 'Wickett Twitter Widget' ),
[115] Fix | Delete
),
[116] Fix | Delete
'videopress' => array(
[117] Fix | Delete
array( 'video/video.php', 'VideoPress' ),
[118] Fix | Delete
),
[119] Fix | Delete
'widget-visibility' => array(
[120] Fix | Delete
array( 'jetpack-widget-visibility/widget-visibility.php', 'Jetpack Widget Visibility' ),
[121] Fix | Delete
array( 'widget-visibility-without-jetpack/widget-visibility-without-jetpack.php', 'Widget Visibility Without Jetpack' ),
[122] Fix | Delete
),
[123] Fix | Delete
);
[124] Fix | Delete
[125] Fix | Delete
/**
[126] Fix | Delete
* Map of roles we care about, and their corresponding minimum capabilities.
[127] Fix | Delete
*
[128] Fix | Delete
* @deprecated 7.6 Use Automattic\Jetpack\Roles::$capability_translations instead.
[129] Fix | Delete
*
[130] Fix | Delete
* @access public
[131] Fix | Delete
* @static
[132] Fix | Delete
*
[133] Fix | Delete
* @var array
[134] Fix | Delete
*/
[135] Fix | Delete
public static $capability_translations = array(
[136] Fix | Delete
'administrator' => 'manage_options',
[137] Fix | Delete
'editor' => 'edit_others_posts',
[138] Fix | Delete
'author' => 'publish_posts',
[139] Fix | Delete
'contributor' => 'edit_posts',
[140] Fix | Delete
'subscriber' => 'read',
[141] Fix | Delete
);
[142] Fix | Delete
[143] Fix | Delete
/**
[144] Fix | Delete
* Map of modules that have conflicts with plugins and should not be auto-activated
[145] Fix | Delete
* if the plugins are active. Used by filter_default_modules
[146] Fix | Delete
*
[147] Fix | Delete
* Plugin Authors: If you'd like to prevent a single module from auto-activating,
[148] Fix | Delete
* change `module-slug` and add this to your plugin:
[149] Fix | Delete
*
[150] Fix | Delete
* add_filter( 'jetpack_get_default_modules', 'my_jetpack_get_default_modules' );
[151] Fix | Delete
* function my_jetpack_get_default_modules( $modules ) {
[152] Fix | Delete
* return array_diff( $modules, array( 'module-slug' ) );
[153] Fix | Delete
* }
[154] Fix | Delete
*
[155] Fix | Delete
* @var array
[156] Fix | Delete
*/
[157] Fix | Delete
private $conflicting_plugins = array(
[158] Fix | Delete
'comments' => array(
[159] Fix | Delete
'Intense Debate' => 'intensedebate/intensedebate.php',
[160] Fix | Delete
'Disqus' => 'disqus-comment-system/disqus.php',
[161] Fix | Delete
'Livefyre' => 'livefyre-comments/livefyre.php',
[162] Fix | Delete
'Comments Evolved for WordPress' => 'gplus-comments/comments-evolved.php',
[163] Fix | Delete
'Google+ Comments' => 'google-plus-comments/google-plus-comments.php',
[164] Fix | Delete
'WP-SpamShield Anti-Spam' => 'wp-spamshield/wp-spamshield.php',
[165] Fix | Delete
),
[166] Fix | Delete
'comment-likes' => array(
[167] Fix | Delete
'Epoch' => 'epoch/plugincore.php',
[168] Fix | Delete
),
[169] Fix | Delete
'latex' => array(
[170] Fix | Delete
'LaTeX for WordPress' => 'latex/latex.php',
[171] Fix | Delete
'Youngwhans Simple Latex' => 'youngwhans-simple-latex/yw-latex.php',
[172] Fix | Delete
'Easy WP LaTeX' => 'easy-wp-latex-lite/easy-wp-latex-lite.php',
[173] Fix | Delete
'MathJax-LaTeX' => 'mathjax-latex/mathjax-latex.php',
[174] Fix | Delete
'Enable Latex' => 'enable-latex/enable-latex.php',
[175] Fix | Delete
'WP QuickLaTeX' => 'wp-quicklatex/wp-quicklatex.php',
[176] Fix | Delete
),
[177] Fix | Delete
'protect' => array(
[178] Fix | Delete
'Limit Login Attempts' => 'limit-login-attempts/limit-login-attempts.php',
[179] Fix | Delete
'Captcha' => 'captcha/captcha.php',
[180] Fix | Delete
'Brute Force Login Protection' => 'brute-force-login-protection/brute-force-login-protection.php',
[181] Fix | Delete
'Login Security Solution' => 'login-security-solution/login-security-solution.php',
[182] Fix | Delete
'WPSecureOps Brute Force Protect' => 'wpsecureops-bruteforce-protect/wpsecureops-bruteforce-protect.php',
[183] Fix | Delete
'BulletProof Security' => 'bulletproof-security/bulletproof-security.php',
[184] Fix | Delete
'SiteGuard WP Plugin' => 'siteguard/siteguard.php',
[185] Fix | Delete
'Security-protection' => 'security-protection/security-protection.php',
[186] Fix | Delete
'Login Security' => 'login-security/login-security.php',
[187] Fix | Delete
'Botnet Attack Blocker' => 'botnet-attack-blocker/botnet-attack-blocker.php',
[188] Fix | Delete
'Wordfence Security' => 'wordfence/wordfence.php',
[189] Fix | Delete
'All In One WP Security & Firewall' => 'all-in-one-wp-security-and-firewall/wp-security.php',
[190] Fix | Delete
'iThemes Security' => 'better-wp-security/better-wp-security.php',
[191] Fix | Delete
),
[192] Fix | Delete
'related-posts' => array(
[193] Fix | Delete
'YARPP' => 'yet-another-related-posts-plugin/yarpp.php',
[194] Fix | Delete
'WordPress Related Posts' => 'wordpress-23-related-posts-plugin/wp_related_posts.php',
[195] Fix | Delete
'nrelate Related Content' => 'nrelate-related-content/nrelate-related.php',
[196] Fix | Delete
'Contextual Related Posts' => 'contextual-related-posts/contextual-related-posts.php',
[197] Fix | Delete
'Related Posts for WordPress' => 'microkids-related-posts/microkids-related-posts.php',
[198] Fix | Delete
'outbrain' => 'outbrain/outbrain.php',
[199] Fix | Delete
'Shareaholic' => 'shareaholic/shareaholic.php',
[200] Fix | Delete
'Sexybookmarks' => 'sexybookmarks/shareaholic.php',
[201] Fix | Delete
),
[202] Fix | Delete
'sharedaddy' => array(
[203] Fix | Delete
'AddThis' => 'addthis/addthis_social_widget.php',
[204] Fix | Delete
'Add To Any' => 'add-to-any/add-to-any.php',
[205] Fix | Delete
'ShareThis' => 'share-this/sharethis.php',
[206] Fix | Delete
'Shareaholic' => 'shareaholic/shareaholic.php',
[207] Fix | Delete
),
[208] Fix | Delete
'seo-tools' => array(
[209] Fix | Delete
'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
[210] Fix | Delete
'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
[211] Fix | Delete
'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
[212] Fix | Delete
'All in One SEO Pack Pro' => 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php',
[213] Fix | Delete
'The SEO Framework' => 'autodescription/autodescription.php',
[214] Fix | Delete
'Rank Math' => 'seo-by-rank-math/rank-math.php',
[215] Fix | Delete
'Slim SEO' => 'slim-seo/slim-seo.php',
[216] Fix | Delete
'SEOKEY' => 'seo-key/seo-key.php',
[217] Fix | Delete
'SEOKEY Pro' => 'seo-key-pro/seo-key.php',
[218] Fix | Delete
'SEOPress' => 'wp-seopress/seopress.php',
[219] Fix | Delete
'SEOPress Pro' => 'wp-seopress-pro/seopress-pro.php',
[220] Fix | Delete
),
[221] Fix | Delete
'verification-tools' => array(
[222] Fix | Delete
'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
[223] Fix | Delete
'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
[224] Fix | Delete
'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
[225] Fix | Delete
'All in One SEO Pack Pro' => 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php',
[226] Fix | Delete
'The SEO Framework' => 'autodescription/autodescription.php',
[227] Fix | Delete
'Rank Math' => 'seo-by-rank-math/rank-math.php',
[228] Fix | Delete
'Slim SEO' => 'slim-seo/slim-seo.php',
[229] Fix | Delete
),
[230] Fix | Delete
'widget-visibility' => array(
[231] Fix | Delete
'Widget Logic' => 'widget-logic/widget_logic.php',
[232] Fix | Delete
'Dynamic Widgets' => 'dynamic-widgets/dynamic-widgets.php',
[233] Fix | Delete
),
[234] Fix | Delete
'sitemaps' => array(
[235] Fix | Delete
'Google XML Sitemaps' => 'google-sitemap-generator/sitemap.php',
[236] Fix | Delete
'Better WordPress Google XML Sitemaps' => 'bwp-google-xml-sitemaps/bwp-simple-gxs.php',
[237] Fix | Delete
'Google XML Sitemaps for qTranslate' => 'google-xml-sitemaps-v3-for-qtranslate/sitemap.php',
[238] Fix | Delete
'XML Sitemap & Google News feeds' => 'xml-sitemap-feed/xml-sitemap.php',
[239] Fix | Delete
'Google Sitemap by BestWebSoft' => 'google-sitemap-plugin/google-sitemap-plugin.php',
[240] Fix | Delete
'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
[241] Fix | Delete
'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
[242] Fix | Delete
'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
[243] Fix | Delete
'All in One SEO Pack Pro' => 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php',
[244] Fix | Delete
'The SEO Framework' => 'autodescription/autodescription.php',
[245] Fix | Delete
'Sitemap' => 'sitemap/sitemap.php',
[246] Fix | Delete
'Simple Wp Sitemap' => 'simple-wp-sitemap/simple-wp-sitemap.php',
[247] Fix | Delete
'Simple Sitemap' => 'simple-sitemap/simple-sitemap.php',
[248] Fix | Delete
'XML Sitemaps' => 'xml-sitemaps/xml-sitemaps.php',
[249] Fix | Delete
'MSM Sitemaps' => 'msm-sitemap/msm-sitemap.php',
[250] Fix | Delete
'Rank Math' => 'seo-by-rank-math/rank-math.php',
[251] Fix | Delete
'Slim SEO' => 'slim-seo/slim-seo.php',
[252] Fix | Delete
),
[253] Fix | Delete
);
[254] Fix | Delete
[255] Fix | Delete
/**
[256] Fix | Delete
* Plugins for which we turn off our Facebook OG Tags implementation.
[257] Fix | Delete
*
[258] Fix | Delete
* Note: the following plugins automatically deactivate Jetpack's Open
[259] Fix | Delete
* Graph tags via filter when their Social Meta modules are active:
[260] Fix | Delete
*
[261] Fix | Delete
* - All in One SEO Pack, All in one SEO Pack Pro
[262] Fix | Delete
* - WordPress SEO by Yoast, WordPress SEO Premium by Yoast
[263] Fix | Delete
*
[264] Fix | Delete
* Plugin authors: If you'd like to prevent Jetpack's Open Graph tag generation in your plugin, you can do so via this filter:
[265] Fix | Delete
* add_filter( 'jetpack_enable_open_graph', '__return_false' );
[266] Fix | Delete
*
[267] Fix | Delete
* @var array Array of plugin slugs.
[268] Fix | Delete
*/
[269] Fix | Delete
private $open_graph_conflicting_plugins = array(
[270] Fix | Delete
'2-click-socialmedia-buttons/2-click-socialmedia-buttons.php', // 2 Click Social Media Buttons.
[271] Fix | Delete
'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook.
[272] Fix | Delete
'add-meta-tags/add-meta-tags.php', // Add Meta Tags.
[273] Fix | Delete
'complete-open-graph/complete-open-graph.php', // Complete Open Graph.
[274] Fix | Delete
'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail.
[275] Fix | Delete
'heateor-open-graph-meta-tags/heateor-open-graph-meta-tags.php', // Open Graph Meta Tags by Heateor.
[276] Fix | Delete
'facebook/facebook.php', // Facebook (official plugin).
[277] Fix | Delete
'facebook-awd/AWD_facebook.php', // Facebook AWD All in one.
[278] Fix | Delete
'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php', // Facebook Featured Image & OG Meta Tags.
[279] Fix | Delete
'facebook-meta-tags/facebook-metatags.php', // Facebook Meta Tags.
[280] Fix | Delete
'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php', // Facebook Open Graph Meta Tags for WordPress.
[281] Fix | Delete
'facebook-revised-open-graph-meta-tag/index.php', // Facebook Revised Open Graph Meta Tag.
[282] Fix | Delete
'facebook-thumb-fixer/_facebook-thumb-fixer.php', // Facebook Thumb Fixer.
[283] Fix | Delete
'facebook-and-digg-thumbnail-generator/facebook-and-digg-thumbnail-generator.php', // Fedmich's Facebook Open Graph Meta.
[284] Fix | Delete
'network-publisher/networkpub.php', // Network Publisher.
[285] Fix | Delete
'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG.
[286] Fix | Delete
'social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php', // NextScripts SNAP.
[287] Fix | Delete
'og-tags/og-tags.php', // OG Tags.
[288] Fix | Delete
'opengraph/opengraph.php', // Open Graph.
[289] Fix | Delete
'open-graph-protocol-framework/open-graph-protocol-framework.php', // Open Graph Protocol Framework.
[290] Fix | Delete
'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments.
[291] Fix | Delete
'seo-ultimate/seo-ultimate.php', // SEO Ultimate.
[292] Fix | Delete
'sexybookmarks/sexy-bookmarks.php', // Shareaholic.
[293] Fix | Delete
'shareaholic/sexy-bookmarks.php', // Shareaholic.
[294] Fix | Delete
'sharepress/sharepress.php', // SharePress.
[295] Fix | Delete
'simple-facebook-connect/sfc.php', // Simple Facebook Connect.
[296] Fix | Delete
'social-discussions/social-discussions.php', // Social Discussions.
[297] Fix | Delete
'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit.
[298] Fix | Delete
'socialize/socialize.php', // Socialize.
[299] Fix | Delete
'squirrly-seo/squirrly.php', // SEO by SQUIRRLYâ„¢.
[300] Fix | Delete
'only-tweet-like-share-and-google-1/tweet-like-plusone.php', // Tweet, Like, Google +1 and Share.
[301] Fix | Delete
'wordbooker/wordbooker.php', // Wordbooker.
[302] Fix | Delete
'wpsso/wpsso.php', // WordPress Social Sharing Optimization.
[303] Fix | Delete
'wp-caregiver/wp-caregiver.php', // WP Caregiver.
[304] Fix | Delete
'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php', // WP Facebook Like Send & Open Graph Meta.
[305] Fix | Delete
'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol.
[306] Fix | Delete
'wp-ogp/wp-ogp.php', // WP-OGP.
[307] Fix | Delete
'wp-seopress/seopress.php', // SEOPress.
[308] Fix | Delete
'wp-seopress-pro/seopress-pro.php', // SEOPress Pro.
[309] Fix | Delete
'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin.
[310] Fix | Delete
'wp-fb-share-like-button/wp_fb_share-like_widget.php', // WP Facebook Like Button.
[311] Fix | Delete
'open-graph-metabox/open-graph-metabox.php', // Open Graph Metabox.
[312] Fix | Delete
'seo-by-rank-math/rank-math.php', // Rank Math.
[313] Fix | Delete
'slim-seo/slim-seo.php', // Slim SEO.
[314] Fix | Delete
);
[315] Fix | Delete
[316] Fix | Delete
/**
[317] Fix | Delete
* Plugins for which we turn off our Twitter Cards Tags implementation.
[318] Fix | Delete
*
[319] Fix | Delete
* @var array Plugins that conflict with Twitter cards.
[320] Fix | Delete
*/
[321] Fix | Delete
private $twitter_cards_conflicting_plugins = array(
[322] Fix | Delete
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
[323] Fix | Delete
// 'twitter/twitter.php', // The official one handles this on its own.
[324] Fix | Delete
// https://github.com/twitter/wordpress/blob/master/src/Twitter/WordPress/Cards/Compatibility.php
[325] Fix | Delete
'eewee-twitter-card/index.php', // Eewee Twitter Card.
[326] Fix | Delete
'ig-twitter-cards/ig-twitter-cards.php', // IG:Twitter Cards.
[327] Fix | Delete
'jm-twitter-cards/jm-twitter-cards.php', // JM Twitter Cards.
[328] Fix | Delete
'kevinjohn-gallagher-pure-web-brilliants-social-graph-twitter-cards-extention/kevinjohn_gallagher___social_graph_twitter_output.php', // Pure Web Brilliant's Social Graph Twitter Cards Extension.
[329] Fix | Delete
'twitter-cards/twitter-cards.php', // Twitter Cards.
[330] Fix | Delete
'twitter-cards-meta/twitter-cards-meta.php', // Twitter Cards Meta.
[331] Fix | Delete
'wp-to-twitter/wp-to-twitter.php', // WP to Twitter.
[332] Fix | Delete
'wp-twitter-cards/twitter_cards.php', // WP Twitter Cards.
[333] Fix | Delete
'seo-by-rank-math/rank-math.php', // Rank Math.
[334] Fix | Delete
'slim-seo/slim-seo.php', // Slim SEO.
[335] Fix | Delete
);
[336] Fix | Delete
[337] Fix | Delete
/**
[338] Fix | Delete
* Message to display in admin_notice
[339] Fix | Delete
*
[340] Fix | Delete
* @var string
[341] Fix | Delete
*/
[342] Fix | Delete
public $message = '';
[343] Fix | Delete
[344] Fix | Delete
/**
[345] Fix | Delete
* Error to display in admin_notice
[346] Fix | Delete
*
[347] Fix | Delete
* @var string
[348] Fix | Delete
*/
[349] Fix | Delete
public $error = '';
[350] Fix | Delete
[351] Fix | Delete
/**
[352] Fix | Delete
* Modules that need more privacy description.
[353] Fix | Delete
*
[354] Fix | Delete
* @var string
[355] Fix | Delete
*/
[356] Fix | Delete
public $privacy_checks = '';
[357] Fix | Delete
[358] Fix | Delete
/**
[359] Fix | Delete
* Stats to record once the page loads
[360] Fix | Delete
*
[361] Fix | Delete
* @var array
[362] Fix | Delete
*/
[363] Fix | Delete
public $stats = array();
[364] Fix | Delete
[365] Fix | Delete
/**
[366] Fix | Delete
* Jetpack_Sync object
[367] Fix | Delete
*
[368] Fix | Delete
* @todo This is also seemingly unused.
[369] Fix | Delete
*
[370] Fix | Delete
* @var object
[371] Fix | Delete
*/
[372] Fix | Delete
public $sync;
[373] Fix | Delete
[374] Fix | Delete
/**
[375] Fix | Delete
* Verified data for JSON authorization request
[376] Fix | Delete
*
[377] Fix | Delete
* @deprecated 13.4
[378] Fix | Delete
*
[379] Fix | Delete
* @var array
[380] Fix | Delete
*/
[381] Fix | Delete
public $json_api_authorization_request = array();
[382] Fix | Delete
[383] Fix | Delete
/**
[384] Fix | Delete
* Connection manager.
[385] Fix | Delete
*
[386] Fix | Delete
* @var Automattic\Jetpack\Connection\Manager
[387] Fix | Delete
*/
[388] Fix | Delete
protected $connection_manager;
[389] Fix | Delete
[390] Fix | Delete
/**
[391] Fix | Delete
* Plugin lock key.
[392] Fix | Delete
*
[393] Fix | Delete
* @var string Transient key used to prevent multiple simultaneous plugin upgrades
[394] Fix | Delete
*/
[395] Fix | Delete
public static $plugin_upgrade_lock_key = 'jetpack_upgrade_lock';
[396] Fix | Delete
[397] Fix | Delete
/**
[398] Fix | Delete
* Holds an instance of Automattic\Jetpack\A8c_Mc_Stats
[399] Fix | Delete
*
[400] Fix | Delete
* @var Automattic\Jetpack\A8c_Mc_Stats
[401] Fix | Delete
*/
[402] Fix | Delete
public $a8c_mc_stats_instance;
[403] Fix | Delete
[404] Fix | Delete
/**
[405] Fix | Delete
* Constant for login redirect key.
[406] Fix | Delete
*
[407] Fix | Delete
* @var string
[408] Fix | Delete
* @since 8.4.0
[409] Fix | Delete
*/
[410] Fix | Delete
public static $jetpack_redirect_login = 'jetpack_connect_login_redirect';
[411] Fix | Delete
[412] Fix | Delete
/**
[413] Fix | Delete
* Holds the singleton instance of this class
[414] Fix | Delete
*
[415] Fix | Delete
* @since 2.3.3
[416] Fix | Delete
* @var Jetpack
[417] Fix | Delete
*/
[418] Fix | Delete
public static $instance = false;
[419] Fix | Delete
[420] Fix | Delete
/**
[421] Fix | Delete
* Singleton
[422] Fix | Delete
*
[423] Fix | Delete
* @static
[424] Fix | Delete
*/
[425] Fix | Delete
public static function init() {
[426] Fix | Delete
if ( ! self::$instance ) {
[427] Fix | Delete
self::$instance = new Jetpack();
[428] Fix | Delete
add_action( 'plugins_loaded', array( self::$instance, 'plugin_upgrade' ) );
[429] Fix | Delete
add_action( 'jetpack_idc_disconnect', array( __CLASS__, 'on_idc_disconnect' ) );
[430] Fix | Delete
}
[431] Fix | Delete
[432] Fix | Delete
return self::$instance;
[433] Fix | Delete
}
[434] Fix | Delete
[435] Fix | Delete
/**
[436] Fix | Delete
* Must never be called statically
[437] Fix | Delete
*/
[438] Fix | Delete
public function plugin_upgrade() {
[439] Fix | Delete
if ( self::is_connection_ready() ) {
[440] Fix | Delete
list( $version ) = explode( ':', Jetpack_Options::get_option( 'version' ) );
[441] Fix | Delete
if ( JETPACK__VERSION !== $version ) {
[442] Fix | Delete
// Prevent multiple upgrades at once - only a single process should trigger an upgrade to avoid stampedes.
[443] Fix | Delete
if ( wp_using_ext_object_cache() ) {
[444] Fix | Delete
if ( true !== wp_cache_add( self::$plugin_upgrade_lock_key, 1, 'transient', 10 ) ) {
[445] Fix | Delete
return;
[446] Fix | Delete
}
[447] Fix | Delete
} else {
[448] Fix | Delete
if ( false !== get_transient( self::$plugin_upgrade_lock_key ) ) {
[449] Fix | Delete
return;
[450] Fix | Delete
}
[451] Fix | Delete
[452] Fix | Delete
set_transient( self::$plugin_upgrade_lock_key, 1, 10 );
[453] Fix | Delete
}
[454] Fix | Delete
[455] Fix | Delete
// check which active modules actually exist and remove others from active_modules list.
[456] Fix | Delete
$unfiltered_modules = self::get_active_modules();
[457] Fix | Delete
$modules = array_filter( $unfiltered_modules, array( 'Jetpack', 'is_module' ) );
[458] Fix | Delete
if ( array_diff( $unfiltered_modules, $modules ) ) {
[459] Fix | Delete
self::update_active_modules( $modules );
[460] Fix | Delete
}
[461] Fix | Delete
[462] Fix | Delete
add_action( 'init', array( __CLASS__, 'activate_new_modules' ) );
[463] Fix | Delete
[464] Fix | Delete
// Upgrade to 4.3.0.
[465] Fix | Delete
if ( Jetpack_Options::get_option( 'identity_crisis_whitelist' ) ) {
[466] Fix | Delete
Jetpack_Options::delete_option( 'identity_crisis_whitelist' );
[467] Fix | Delete
}
[468] Fix | Delete
[469] Fix | Delete
// Make sure Markdown for posts gets turned back on.
[470] Fix | Delete
if ( ! get_option( 'wpcom_publish_posts_with_markdown' ) ) {
[471] Fix | Delete
update_option( 'wpcom_publish_posts_with_markdown', true );
[472] Fix | Delete
}
[473] Fix | Delete
[474] Fix | Delete
/*
[475] Fix | Delete
* Minileven deprecation. 8.3.0.
[476] Fix | Delete
* Only delete options if not using
[477] Fix | Delete
* the replacement standalone Minileven plugin.
[478] Fix | Delete
*/
[479] Fix | Delete
if (
[480] Fix | Delete
! self::is_plugin_active( 'minileven-master/minileven.php' )
[481] Fix | Delete
&& ! self::is_plugin_active( 'minileven/minileven.php' )
[482] Fix | Delete
) {
[483] Fix | Delete
if ( get_option( 'wp_mobile_custom_css' ) ) {
[484] Fix | Delete
delete_option( 'wp_mobile_custom_css' );
[485] Fix | Delete
}
[486] Fix | Delete
if ( get_option( 'wp_mobile_excerpt' ) ) {
[487] Fix | Delete
delete_option( 'wp_mobile_excerpt' );
[488] Fix | Delete
}
[489] Fix | Delete
if ( get_option( 'wp_mobile_featured_images' ) ) {
[490] Fix | Delete
delete_option( 'wp_mobile_featured_images' );
[491] Fix | Delete
}
[492] Fix | Delete
if ( get_option( 'wp_mobile_app_promos' ) ) {
[493] Fix | Delete
delete_option( 'wp_mobile_app_promos' );
[494] Fix | Delete
}
[495] Fix | Delete
}
[496] Fix | Delete
[497] Fix | Delete
// Upgrade to 8.4.0.
[498] Fix | Delete
if ( Jetpack_Options::get_option( 'ab_connect_banner_green_bar' ) ) {
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function