| @@ -137,8 +137,9 @@ | ||
| 137 | 137 | 'jetpack-widget-social-icons-styles', |
| 138 | 138 | 'wpcom_instagram_widget', |
| 139 | 139 | 'milestone-widget', |
| 140 | 140 | 'subscribe-modal-css', |
| 141 | + 'subscribe-overlay-css', | |
| 141 | 142 | ); |
| 142 | 143 | |
| 143 | 144 | /** |
| 144 | 145 | * Contains all assets that have had their URL rewritten to minified versions. |
| @@ -1078,9 +1079,8 @@ | ||
| 1078 | 1079 | * |
| 1079 | 1080 | * @return array list of callables. |
| 1080 | 1081 | */ |
| 1081 | 1082 | public function filter_sync_callable_whitelist( $callables ) { |
| 1082 | - | |
| 1083 | 1083 | // Jetpack Functions. |
| 1084 | 1084 | $jetpack_callables = array( |
| 1085 | 1085 | 'single_user_site' => array( 'Jetpack', 'is_single_user_site' ), |
| 1086 | 1086 | 'updates' => array( 'Jetpack', 'get_updates' ), |
| @@ -1085,23 +1085,9 @@ | ||
| 1085 | 1085 | 'single_user_site' => array( 'Jetpack', 'is_single_user_site' ), |
| 1086 | 1086 | 'updates' => array( 'Jetpack', 'get_updates' ), |
| 1087 | 1087 | 'available_jetpack_blocks' => array( 'Jetpack_Gutenberg', 'get_availability' ), // Includes both Gutenberg blocks *and* plugins. |
| 1088 | 1088 | ); |
| 1089 | - $callables = array_merge( $callables, $jetpack_callables ); | |
| 1090 | - | |
| 1091 | - // Jetpack_SSO_Helpers. | |
| 1092 | - if ( include_once JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php' ) { | |
| 1093 | - $sso_helpers = array( | |
| 1094 | - 'sso_is_two_step_required' => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ), | |
| 1095 | - 'sso_should_hide_login_form' => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ), | |
| 1096 | - 'sso_match_by_email' => array( 'Jetpack_SSO_Helpers', 'match_by_email' ), | |
| 1097 | - 'sso_new_user_override' => array( 'Jetpack_SSO_Helpers', 'new_user_override' ), | |
| 1098 | - 'sso_bypass_default_login_form' => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ), | |
| 1099 | - ); | |
| 1100 | - $callables = array_merge( $callables, $sso_helpers ); | |
| 1101 | - } | |
| 1102 | - | |
| 1103 | - return $callables; | |
| 1089 | + return array_merge( $callables, $jetpack_callables ); | |
| 1104 | 1090 | } |
| 1105 | 1091 | |
| 1106 | 1092 | /** |
| 1107 | 1093 | * Extend Sync multisite callables with Jetpack Plugin functions. |
| @@ -2412,20 +2398,28 @@ | ||
| 2412 | 2398 | |
| 2413 | 2399 | /** |
| 2414 | 2400 | * Catches PHP errors. Must be used in conjunction with output buffering. |
| 2415 | 2401 | * |
| 2402 | + * @deprecated since 13.5 | |
| 2416 | 2403 | * @param bool $catch True to start catching, False to stop. |
| 2417 | 2404 | * |
| 2418 | 2405 | * @static |
| 2406 | + * @deprecated 13.5 | |
| 2407 | + * @see \Automattic\Jetpack\Errors | |
| 2419 | 2408 | */ |
| 2420 | 2409 | public static function catch_errors( $catch ) { |
| 2410 | + _deprecated_function( __METHOD__, '13.5' ); | |
| 2411 | + // @phan-suppress-next-line PhanDeprecatedClass | |
| 2421 | 2412 | return ( new Errors() )->catch_errors( $catch ); |
| 2422 | 2413 | } |
| 2423 | 2414 | |
| 2424 | 2415 | /** |
| 2425 | 2416 | * Saves any generated PHP errors in ::state( 'php_errors', {errors} ) |
| 2417 | + * | |
| 2418 | + * @deprecated since 13.5 | |
| 2426 | 2419 | */ |
| 2427 | 2420 | public static function catch_errors_on_shutdown() { |
| 2421 | + _deprecated_function( __METHOD__, '13.5' ); | |
| 2428 | 2422 | self::state( 'php_errors', self::alias_directories( ob_get_clean() ) ); |
| 2429 | 2423 | } |
| 2430 | 2424 | |
| 2431 | 2425 | /** |
| @@ -2549,9 +2543,8 @@ | ||
| 2549 | 2543 | |
| 2550 | 2544 | // Check each module for fatal errors, a la wp-admin/plugins.php::activate before activating. |
| 2551 | 2545 | if ( $send_state_messages ) { |
| 2552 | 2546 | self::restate(); |
| 2553 | - self::catch_errors( true ); | |
| 2554 | 2547 | } |
| 2555 | 2548 | |
| 2556 | 2549 | $active = self::get_active_modules(); |
| 2557 | 2550 | |
| @@ -2619,10 +2612,8 @@ | ||
| 2619 | 2612 | if ( $send_state_messages ) { |
| 2620 | 2613 | self::state( 'error', false ); |
| 2621 | 2614 | self::state( 'module', false ); |
| 2622 | 2615 | } |
| 2623 | - | |
| 2624 | - self::catch_errors( false ); | |
| 2625 | 2616 | /** |
| 2626 | 2617 | * Fires when default modules are activated. |
| 2627 | 2618 | * |
| 2628 | 2619 | * @since 1.9.0 |
| @@ -3322,8 +3313,9 @@ | ||
| 3322 | 3313 | if ( 'stats.php' === basename( $plugin ) ) { |
| 3323 | 3314 | $throw = true; |
| 3324 | 3315 | } |
| 3325 | 3316 | } else { |
| 3317 | + // @phan-suppress-next-line PhanUndeclaredFunctionInCallable -- Checked above. See also https://github.com/phan/phan/issues/1204. | |
| 3326 | 3318 | $reflection = new ReflectionFunction( 'stats_get_api_key' ); |
| 3327 | 3319 | if ( basename( $plugin ) === basename( $reflection->getFileName() ) ) { |
| 3328 | 3320 | $throw = true; |
| 3329 | 3321 | } |
| @@ -5358,8 +5350,10 @@ | ||
| 5358 | 5350 | * Loads a view file from the views |
| 5359 | 5351 | * |
| 5360 | 5352 | * Data passed in with the $data parameter will be available in the |
| 5361 | 5353 | * template file as $data['value'] |
| 5354 | + * | |
| 5355 | + * @html-template-var array $data | |
| 5362 | 5356 | * |
| 5363 | 5357 | * @param string $template - Template file to load. |
| 5364 | 5358 | * @param array $data - Any data to pass along to the template. |
| 5365 | 5359 | * @return boolean - If template file was found. |