| @@ -21,8 +21,9 @@ | ||
| 21 | 21 | use Automattic\Jetpack\CookieState; |
| 22 | 22 | use Automattic\Jetpack\Current_Plan as Jetpack_Plan; |
| 23 | 23 | use Automattic\Jetpack\Device_Detection\User_Agent_Info; |
| 24 | 24 | use Automattic\Jetpack\Errors; |
| 25 | +use Automattic\Jetpack\Feature_Policy; | |
| 25 | 26 | use Automattic\Jetpack\Files; |
| 26 | 27 | use Automattic\Jetpack\Heartbeat; |
| 27 | 28 | use Automattic\Jetpack\Identity_Crisis; |
| 28 | 29 | use Automattic\Jetpack\Import\Main as Import_Main; |
| @@ -79,20 +80,8 @@ | ||
| 79 | 80 | * The Jetpack class. |
| 80 | 81 | */ |
| 81 | 82 | class Jetpack { |
| 82 | 83 | /** |
| 83 | - * Marks that the durable Jetpack SEO module-state options have been reconciled against | |
| 84 | - * the site's module configuration, so the repair runs at most once. | |
| 85 | - * | |
| 86 | - * {@see self::reconcile_seo_module_state_options()} | |
| 87 | - * | |
| 88 | - * @since 16.1 | |
| 89 | - * | |
| 90 | - * @var string | |
| 91 | - */ | |
| 92 | - const SEO_MODULE_STATE_RECONCILED_OPTION = 'jetpack_seo_module_state_reconciled'; | |
| 93 | - | |
| 94 | - /** | |
| 95 | 84 | * XMLRPC server instance. |
| 96 | 85 | * |
| 97 | 86 | * @var null|Jetpack_XMLRPC_Server XMLRPC server used by Jetpack. |
| 98 | 87 | */ |
| @@ -555,8 +544,11 @@ | ||
| 555 | 544 | if ( false === get_option( 'wpcom_newsletter_send_default' ) ) { |
| 556 | 545 | add_option( 'wpcom_newsletter_send_default', 1 ); |
| 557 | 546 | } |
| 558 | 547 | |
| 548 | + // Its handler went with the Recommendations assistant. | |
| 549 | + wp_clear_scheduled_hook( 'jetpack_recommend_videopress' ); | |
| 550 | + | |
| 559 | 551 | if ( did_action( 'wp_loaded' ) ) { |
| 560 | 552 | self::upgrade_on_load(); |
| 561 | 553 | } else { |
| 562 | 554 | add_action( |
| @@ -784,11 +776,8 @@ | ||
| 784 | 776 | |
| 785 | 777 | // Register product descriptions for partner coupon usage. |
| 786 | 778 | add_filter( 'jetpack_partner_coupon_products', array( $this, 'get_partner_coupon_product_descriptions' ) ); |
| 787 | 779 | |
| 788 | - // Actions for conditional recommendations. | |
| 789 | - add_action( 'plugins_loaded', array( 'Jetpack_Recommendations', 'init_conditional_recommendation_actions' ) ); | |
| 790 | - | |
| 791 | 780 | // Add 5-star |
| 792 | 781 | add_filter( 'plugin_row_meta', array( $this, 'add_5_star_review_link' ), 10, 2 ); |
| 793 | 782 | add_action( 'init', array( Deprecate::class, 'instance' ) ); |
| 794 | 783 | |
| @@ -850,8 +839,46 @@ | ||
| 850 | 839 | } |
| 851 | 840 | } |
| 852 | 841 | |
| 853 | 842 | /** |
| 843 | + * Enable the bundled Backup dashboard. | |
| 844 | + * | |
| 845 | + * The standalone plugin initializes the package first, so with both active this is a no-op. | |
| 846 | + * | |
| 847 | + * @return void | |
| 848 | + */ | |
| 849 | + public static function configure_backup_package() { | |
| 850 | + // Not offered on multisite, which the Backup package does not support, or without a | |
| 851 | + // connected owner, since buying and managing backups needs a linked account. | |
| 852 | + if ( is_multisite() || ! self::is_connection_ready() || ! self::connection()->has_connected_owner() ) { | |
| 853 | + return; | |
| 854 | + } | |
| 855 | + | |
| 856 | + /** | |
| 857 | + * Filters whether the Jetpack plugin offers its bundled Backup dashboard. | |
| 858 | + * | |
| 859 | + * Resolved at the earliest `plugins_loaded` priority, so hook it from a mu-plugin. | |
| 860 | + * | |
| 861 | + * @since 16.3 | |
| 862 | + * | |
| 863 | + * @param bool $enabled Whether to initialize the bundled Backup dashboard. Default true. | |
| 864 | + */ | |
| 865 | + if ( ! apply_filters( 'jetpack_backup_dashboard_enabled', true ) ) { | |
| 866 | + return; | |
| 867 | + } | |
| 868 | + | |
| 869 | + $backup = 'Automattic\\Jetpack\\Backup\\V0005\\Jetpack_Backup'; | |
| 870 | + | |
| 871 | + // An older package would take over the connection (see Jetpack_Backup::DEFAULT_INIT_OPTIONS); | |
| 872 | + // only the standalone plugin ships one that old, and it draws its own menu. | |
| 873 | + if ( ! class_exists( $backup ) || ! defined( $backup . '::DEFAULT_INIT_OPTIONS' ) ) { | |
| 874 | + return; | |
| 875 | + } | |
| 876 | + | |
| 877 | + $backup::initialize( array( 'manage_connection' => false ) ); | |
| 878 | + } | |
| 879 | + | |
| 880 | + /** | |
| 854 | 881 | * Whether the bundled Stats v2 dashboard is enabled. |
| 855 | 882 | * |
| 856 | 883 | * Stats v2 (formerly "Premium Analytics") ships with the plugin behind this |
| 857 | 884 | * flag while it rolls out (WOOA7S-1595). When enabled it adds its own admin |
| @@ -945,8 +972,15 @@ | ||
| 945 | 972 | // only renders when the VideoPress module is active (Status::is_active()); when it |
| 946 | 973 | // is not, the menu item links to the My Jetpack interstitial to activate it. |
| 947 | 974 | $config->ensure( 'videopress', array( 'admin_ui' => true ) ); |
| 948 | 975 | |
| 976 | + // The Backup dashboard is only an admin menu and REST routes, so it is deferred like Import below. | |
| 977 | + if ( self::should_eager_load_packages() ) { | |
| 978 | + self::configure_backup_package(); | |
| 979 | + } else { | |
| 980 | + add_action( 'rest_api_init', array( __CLASS__, 'configure_backup_package' ), 0 ); | |
| 981 | + } | |
| 982 | + | |
| 949 | 983 | /* |
| 950 | 984 | * The Import package only registers `jetpack/v4/import` REST routes — it |
| 951 | 985 | * does nothing when rendering a front-end page — so gate its `ensure()` |
| 952 | 986 | * to keep its PHP out of opcache on the front-end GET hot path. It still |
| @@ -1285,8 +1319,9 @@ | ||
| 1285 | 1319 | $jetpack_callables = array( |
| 1286 | 1320 | 'single_user_site' => array( 'Jetpack', 'is_single_user_site' ), |
| 1287 | 1321 | 'updates' => array( 'Jetpack', 'get_updates' ), |
| 1288 | 1322 | 'available_jetpack_blocks' => array( 'Jetpack_Gutenberg', 'get_availability' ), // Includes both Gutenberg blocks *and* plugins. |
| 1323 | + 'theme_styles' => array( 'Automattic\\Jetpack\\Plugin\\Theme_Styles_Sync', 'get_theme_styles' ), | |
| 1289 | 1324 | ); |
| 1290 | 1325 | return array_merge( $callables, $jetpack_callables ); |
| 1291 | 1326 | } |
| 1292 | 1327 | |
| @@ -2341,8 +2376,12 @@ | ||
| 2341 | 2376 | default: |
| 2342 | 2377 | break; |
| 2343 | 2378 | } |
| 2344 | 2379 | } |
| 2380 | + if ( method_exists( Feature_Policy::class, 'ensure_hooks' ) ) { | |
| 2381 | + Feature_Policy::ensure_hooks(); | |
| 2382 | + } | |
| 2383 | + | |
| 2345 | 2384 | /** |
| 2346 | 2385 | * Filters the array of default modules. |
| 2347 | 2386 | * |
| 2348 | 2387 | * @since 2.5.0 |
| @@ -2838,9 +2877,9 @@ | ||
| 2838 | 2877 | * @return string $url module configuration URL. |
| 2839 | 2878 | */ |
| 2840 | 2879 | public static function module_configuration_url( $module ) { |
| 2841 | 2880 | $module = self::get_module_slug( $module ); |
| 2842 | - $default_url = self::admin_url() . "#/settings?term=$module"; | |
| 2881 | + $default_url = self::admin_url( array( 'page' => 'jetpack-settings' ) ) . "#/settings?term=$module"; | |
| 2843 | 2882 | /** |
| 2844 | 2883 | * Allows to modify configure_url of specific module to be able to redirect to some custom location. |
| 2845 | 2884 | * |
| 2846 | 2885 | * @since 6.9.0 |
| @@ -3116,199 +3155,19 @@ | ||
| 3116 | 3155 | update_option( self::AI_MASTER_OPTOUT_MIGRATED_OPTION, true ); |
| 3117 | 3156 | } |
| 3118 | 3157 | |
| 3119 | 3158 | /** |
| 3120 | - * Whether a module should be recorded as active in its durable Jetpack SEO option. | |
| 3159 | + * Deletes obsolete SEO module-state options without changing module activation. | |
| 3121 | 3160 | * |
| 3122 | - * Permanent module overrides are part of the site's configuration, so the normal | |
| 3123 | - * filtered module state is authoritative. The exception is wpcomsh's private-site | |
| 3124 | - * callback, which temporarily suppresses `sitemaps` on Atomic sites without changing | |
| 3125 | - * the site's configured state. Evaluate the module state with only that callback | |
| 3126 | - * disabled. | |
| 3127 | - * | |
| 3128 | - * The hook is cloned before removing the callback so its ordering remains unchanged for | |
| 3129 | - * the rest of the request. `$available_only` is false because these migrations can run | |
| 3130 | - * after the standalone module file has been removed. | |
| 3131 | - * | |
| 3132 | - * WordPress.com Simple keeps module state outside this site's options table, so its | |
| 3133 | - * normal filtered read remains authoritative. | |
| 3134 | - * | |
| 3135 | - * @since 16.1 | |
| 3136 | - * | |
| 3137 | - * @param string $module Module slug. | |
| 3138 | - * @return bool Whether the module should be recorded as active. | |
| 3161 | + * @since 16.3 | |
| 3139 | 3162 | */ |
| 3140 | - private static function is_module_active_for_seo_option( $module ) { | |
| 3141 | - $modules = new Modules(); | |
| 3142 | - | |
| 3143 | - if ( ( new Host() )->is_wpcom_simple() ) { | |
| 3144 | - return $modules->is_active( $module, false ); | |
| 3145 | - } | |
| 3146 | - | |
| 3147 | - global $wp_filter; | |
| 3148 | - | |
| 3149 | - $hook_name = 'jetpack_active_modules'; | |
| 3150 | - $private_site_callback = '\Private_Site\filter_jetpack_active_modules'; | |
| 3151 | - $callback_priority = has_filter( $hook_name, $private_site_callback ); | |
| 3152 | - | |
| 3153 | - if ( false === $callback_priority ) { | |
| 3154 | - return $modules->is_active( $module, false ); | |
| 3155 | - } | |
| 3156 | - | |
| 3157 | - $original_hook = $wp_filter[ $hook_name ]; | |
| 3158 | - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Use an isolated hook copy without changing callback order. | |
| 3159 | - $wp_filter[ $hook_name ] = clone $original_hook; | |
| 3160 | - remove_filter( $hook_name, $private_site_callback, $callback_priority ); | |
| 3161 | - | |
| 3162 | - try { | |
| 3163 | - return $modules->is_active( $module, false ); | |
| 3164 | - } finally { | |
| 3165 | - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Restore the untouched original hook. | |
| 3166 | - $wp_filter[ $hook_name ] = $original_hook; | |
| 3167 | - } | |
| 3163 | + public static function cleanup_seo_module_state_options() { | |
| 3164 | + delete_option( 'jetpack_seo_sitemap_enabled' ); | |
| 3165 | + delete_option( 'jetpack_seo_canonical_urls_enabled' ); | |
| 3166 | + delete_option( 'jetpack_seo_module_state_reconciled' ); | |
| 3168 | 3167 | } |
| 3169 | 3168 | |
| 3170 | 3169 | /** |
| 3171 | - * Records whether the standalone Sitemaps module is active so the setting survives | |
| 3172 | - * the module's removal. | |
| 3173 | - * | |
| 3174 | - * The Jetpack SEO product reads the {@see Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION} | |
| 3175 | - * option instead of the `sitemaps` module's active state. Module-active state is | |
| 3176 | - * filtered against the modules present on disk, so once the standalone module is | |
| 3177 | - * removed it would read as inactive even for sites that had it on. This one-time | |
| 3178 | - * migration captures the configured module state — which persists regardless of | |
| 3179 | - * whether the module file is present — into the durable option. | |
| 3180 | - * | |
| 3181 | - * Deliberately non-destructive: it never touches generated sitemap data | |
| 3182 | - * (`jp_sitemap*` posts), the `jetpack-sitemap-state` option, sitemap settings, or the | |
| 3183 | - * `jp_sitemap_cron_hook` cron, so no regeneration is triggered. `add_option()` only | |
| 3184 | - * seeds when the option is absent, so it is safe to run on every version bump and | |
| 3185 | - * never reverts a value the user has since set. | |
| 3186 | - * | |
| 3187 | - * Hooked on `updating_jetpack_version`; the version arguments are not needed because | |
| 3188 | - * `add_option()` provides the run-once guard. | |
| 3189 | - */ | |
| 3190 | - public static function migrate_sitemaps_module_to_seo_option() { | |
| 3191 | - // Ignore wpcomsh's temporary private-site suppression while preserving permanent | |
| 3192 | - // module overrides. {@see self::is_module_active_for_seo_option()}. | |
| 3193 | - $sitemaps_active = self::is_module_active_for_seo_option( 'sitemaps' ); | |
| 3194 | - | |
| 3195 | - add_option( Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION, $sitemaps_active ); | |
| 3196 | - } | |
| 3197 | - | |
| 3198 | - /** | |
| 3199 | - * Keeps the Jetpack SEO sitemap option in sync with the legacy `sitemaps` module | |
| 3200 | - * while both still exist. | |
| 3201 | - * | |
| 3202 | - * Hooked to the module's activate/deactivate actions, so toggling sitemaps from any | |
| 3203 | - * surface (the legacy Traffic settings, the SEO Settings tab, or WP-CLI) keeps the | |
| 3204 | - * durable {@see Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION} option current. The | |
| 3205 | - * actions fire after `active_modules` is updated, so the configured state already | |
| 3206 | - * reflects the new choice. Ignore temporary private-site suppression without bypassing | |
| 3207 | - * permanent module overrides. Removed alongside the module itself. | |
| 3208 | - */ | |
| 3209 | - public static function sync_seo_sitemap_option() { | |
| 3210 | - update_option( Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION, self::is_module_active_for_seo_option( 'sitemaps' ) ); | |
| 3211 | - } | |
| 3212 | - | |
| 3213 | - /** | |
| 3214 | - * Records whether the standalone Canonical URLs module is active so the setting survives | |
| 3215 | - * the module's removal. | |
| 3216 | - * | |
| 3217 | - * The Jetpack SEO product reads the {@see Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION} | |
| 3218 | - * option instead of the `canonical-urls` module's active state. Module-active state is | |
| 3219 | - * filtered against the modules present on disk, so once the standalone module is | |
| 3220 | - * removed it would read as inactive even for sites that had it on. This one-time | |
| 3221 | - * migration captures the configured module state — which persists regardless of | |
| 3222 | - * whether the module file is present — into the durable option. | |
| 3223 | - * | |
| 3224 | - * Deliberately non-destructive: `add_option()` only seeds when the option is absent, so | |
| 3225 | - * it is safe to run on every version bump and never reverts a value the user has since | |
| 3226 | - * set. | |
| 3227 | - * | |
| 3228 | - * Hooked on `updating_jetpack_version`; the version arguments are not needed because | |
| 3229 | - * `add_option()` provides the run-once guard. | |
| 3230 | - */ | |
| 3231 | - public static function migrate_canonical_urls_module_to_seo_option() { | |
| 3232 | - $canonical_active = self::is_module_active_for_seo_option( 'canonical-urls' ); | |
| 3233 | - | |
| 3234 | - add_option( Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION, $canonical_active ); | |
| 3235 | - } | |
| 3236 | - | |
| 3237 | - /** | |
| 3238 | - * Keeps the Jetpack SEO canonical-urls option in sync with the legacy `canonical-urls` | |
| 3239 | - * module while both still exist. | |
| 3240 | - * | |
| 3241 | - * Hooked to the module's activate/deactivate actions, so toggling canonical URLs from any | |
| 3242 | - * surface (the legacy Traffic settings, the SEO Settings tab, or WP-CLI) keeps the | |
| 3243 | - * durable {@see Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION} option current. The | |
| 3244 | - * actions fire after `active_modules` is updated, so the configured state already | |
| 3245 | - * reflects the new choice. Permanent module overrides remain authoritative. Removed | |
| 3246 | - * alongside the module itself. | |
| 3247 | - */ | |
| 3248 | - public static function sync_seo_canonical_urls_option() { | |
| 3249 | - update_option( Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION, self::is_module_active_for_seo_option( 'canonical-urls' ) ); | |
| 3250 | - } | |
| 3251 | - | |
| 3252 | - /** | |
| 3253 | - * Repairs durable SEO module-state options that the first pass of the migration seeded | |
| 3254 | - * from a filtered read. | |
| 3255 | - * | |
| 3256 | - * Jetpack 16.0 seeded {@see Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION} and | |
| 3257 | - * {@see Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION} through | |
| 3258 | - * {@see Modules::is_active()}, which passes the `jetpack_active_modules` filter. A site | |
| 3259 | - * that was private at the time therefore recorded `sitemaps` as off even though the user | |
| 3260 | - * had it on, and because the migration seeds with `add_option()` the value was never | |
| 3261 | - * revisited — making the site public again did not restore the setting. | |
| 3262 | - * | |
| 3263 | - * This runs once and rewrites both options from the site's configured module state, | |
| 3264 | - * including permanent module overrides. That is safe against a choice the user has made | |
| 3265 | - * since: every surface that toggles these settings (the legacy Traffic page, the SEO | |
| 3266 | - * Settings tab, WP-CLI) goes through {@see Modules::activate()}/{@see Modules::deactivate()}, | |
| 3267 | - * so the module state and durable option are already in agreement wherever the original | |
| 3268 | - * migration got it right. | |
| 3269 | - * | |
| 3270 | - * Idempotent: the marker is written with `add_option()`, so reruns on later version bumps | |
| 3271 | - * are no-ops. Like the migrations it seeds from, it touches no sitemap data or cron state. | |
| 3272 | - * | |
| 3273 | - * @since 16.1 | |
| 3274 | - */ | |
| 3275 | - public static function reconcile_seo_module_state_options() { | |
| 3276 | - if ( get_option( self::SEO_MODULE_STATE_RECONCILED_OPTION ) ) { | |
| 3277 | - return; | |
| 3278 | - } | |
| 3279 | - | |
| 3280 | - update_option( Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION, self::is_module_active_for_seo_option( 'sitemaps' ) ); | |
| 3281 | - update_option( Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION, self::is_module_active_for_seo_option( 'canonical-urls' ) ); | |
| 3282 | - | |
| 3283 | - add_option( self::SEO_MODULE_STATE_RECONCILED_OPTION, true ); | |
| 3284 | - } | |
| 3285 | - | |
| 3286 | - /** | |
| 3287 | - * Wires up the migration + sync hooks that keep the durable Jetpack SEO module-state | |
| 3288 | - * options ({@see Jetpack_SEO_Initializer::SITEMAP_ENABLED_OPTION} / | |
| 3289 | - * {@see Jetpack_SEO_Initializer::CANONICAL_ENABLED_OPTION}) seeded and in sync with their | |
| 3290 | - * legacy modules. Called once from `load-jetpack.php`. | |
| 3291 | - * | |
| 3292 | - * Extracted from file scope so the wiring is unit-testable (file-scope `add_action()` | |
| 3293 | - * calls run during bootstrap and can't be exercised by a test). Removed alongside the | |
| 3294 | - * modules in the deferred post-convergence follow-up that absorbs them into Jetpack SEO. | |
| 3295 | - */ | |
| 3296 | - public static function register_seo_module_migration_hooks() { | |
| 3297 | - add_action( 'updating_jetpack_version', array( 'Jetpack', 'migrate_sitemaps_module_to_seo_option' ) ); | |
| 3298 | - add_action( 'jetpack_activate_module_sitemaps', array( 'Jetpack', 'sync_seo_sitemap_option' ) ); | |
| 3299 | - add_action( 'jetpack_deactivate_module_sitemaps', array( 'Jetpack', 'sync_seo_sitemap_option' ) ); | |
| 3300 | - | |
| 3301 | - add_action( 'updating_jetpack_version', array( 'Jetpack', 'migrate_canonical_urls_module_to_seo_option' ) ); | |
| 3302 | - add_action( 'jetpack_activate_module_canonical-urls', array( 'Jetpack', 'sync_seo_canonical_urls_option' ) ); | |
| 3303 | - add_action( 'jetpack_deactivate_module_canonical-urls', array( 'Jetpack', 'sync_seo_canonical_urls_option' ) ); | |
| 3304 | - | |
| 3305 | - // Runs after both migrations above (default priority, registered last) so a freshly | |
| 3306 | - // seeded site is already correct and the reconciliation is a no-op there. | |
| 3307 | - add_action( 'updating_jetpack_version', array( 'Jetpack', 'reconcile_seo_module_state_options' ) ); | |
| 3308 | - } | |
| 3309 | - | |
| 3310 | - /** | |
| 3311 | 3170 | * Seeds the Jetpack SEO discoverability cohort once, so the new SEO surface is |
| 3312 | 3171 | * auto-discoverable on fresh installs but opt-in on existing ones (JETPACK-1700). |
| 3313 | 3172 | * |
| 3314 | 3173 | * Hooked on `updating_jetpack_version`, which fires on every install including the |
| @@ -4140,9 +3999,9 @@ | ||
| 4140 | 3999 | */ |
| 4141 | 4000 | public function plugin_action_links( $actions ) { |
| 4142 | 4001 | if ( current_user_can( 'jetpack_manage_modules' ) && ( self::is_connection_ready() || ( new Status() )->is_offline_mode() ) ) { |
| 4143 | 4002 | return array_merge( |
| 4144 | - array( 'settings' => sprintf( '<a href="%s">%s</a>', esc_url( self::admin_url( 'page=jetpack#/settings' ) ), __( 'Settings', 'jetpack' ) ) ), | |
| 4003 | + array( 'settings' => sprintf( '<a href="%s">%s</a>', esc_url( self::admin_url( 'page=jetpack-settings#/settings' ) ), __( 'Settings', 'jetpack' ) ) ), | |
| 4145 | 4004 | $actions |
| 4146 | 4005 | ); |
| 4147 | 4006 | } |
| 4148 | 4007 | |
| @@ -4178,9 +4037,9 @@ | ||
| 4178 | 4037 | Assets::enqueue_script( 'jetpack-plugins-page-js' ); |
| 4179 | 4038 | |
| 4180 | 4039 | // Add objects to be passed to the initial state of the app. |
| 4181 | 4040 | // Use wp_add_inline_script instead of wp_localize_script, see https://core.trac.wordpress.org/ticket/25280. |
| 4182 | - wp_add_inline_script( 'jetpack-plugins-page-js', 'var Initial_State=' . wp_json_encode( Jetpack_Redux_State_Helper::get_minimal_state(), JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) . ';', 'before' ); | |
| 4041 | + wp_add_inline_script( 'jetpack-plugins-page-js', 'var Initial_State=' . wp_json_encode( Jetpack_Redux_State_Helper::get_plugins_page_state(), JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) . ';', 'before' ); | |
| 4183 | 4042 | |
| 4184 | 4043 | add_action( 'admin_footer', array( $this, 'jetpack_plugin_portal_containers' ) ); |
| 4185 | 4044 | } |
| 4186 | 4045 | } |