PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | json-endpoints/class.wpcom-json-api-site-settings-endpoint.php +2 -17 16.3-beta → 16.3-a.1 View file →
@@ -10,10 +10,8 @@
10 10 if ( ! defined( 'ABSPATH' ) ) {
11 11 exit( 0 );
12 12 }
13 13
14 -require_once dirname( __DIR__ ) . '/modules/verification-tools/verification-tools-utils.php';
15 -
16 14 new WPCOM_JSON_API_Site_Settings_Endpoint(
17 15 array(
18 16 'description' => 'Get detailed settings information about a site.',
19 17 'group' => '__do_not_document',
@@ -647,8 +645,9 @@
647 645
648 646 if ( function_exists( 'wpcom_switch_to_user_locale' ) ) {
649 647 // Compare the locales before/after switch to decide if we should switch back
650 648 $locale_before = determine_locale();
649 + // @phan-suppress-next-line PhanUndeclaredFunction -- Checked above. See also https://github.com/phan/phan/issues/1204.
651 650 wpcom_switch_to_user_locale();
652 651 $switched_locale = determine_locale() !== $locale_before;
653 652 }
654 653
@@ -1234,23 +1233,9 @@
1234 1233 }
1235 1234 break;
1236 1235
1237 1236 case 'verification_services_codes':
1238 - foreach ( $value as $raw_code ) {
1239 - if ( '' === $raw_code || null === $raw_code || false === $raw_code ) {
1240 - continue;
1241 - }
1242 -
1243 - if ( false === jetpack_verification_validate_code( $raw_code ) ) {
1244 - return new WP_Error(
1245 - 'invalid_input',
1246 - __( 'Invalid site verification code. Enter a verification code or verification tag.', 'jetpack' ),
1247 - 400
1248 - );
1249 - }
1250 - }
1251 -
1252 - $verification_codes = jetpack_verification_validate_codes( $value );
1237 + $verification_codes = jetpack_verification_validate( $value );
1253 1238
1254 1239 if ( update_option( 'verification_services_codes', $verification_codes ) ) {
1255 1240 $updated[ $key ] = $verification_codes;
1256 1241 }