PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
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 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php +3 -1 12.1.3 → 16.3-beta View file →
@@ -58,9 +58,9 @@
58 58 if ( false === $user_id ) {
59 59 $user_id = get_current_user_id();
60 60 }
61 61
62 - $callable = apply_filters( 'jetpack_connection_secret_generator', array( get_called_class(), 'secret_callable_method' ) );
62 + $callable = apply_filters( 'jetpack_connection_secret_generator', array( static::class, 'secret_callable_method' ) );
63 63
64 64 $secrets = Jetpack_Options::get_raw_option(
65 65 self::LEGACY_SECRETS_OPTION_NAME,
66 66 array()
@@ -92,8 +92,9 @@
92 92 *
93 93 * @param String $action The action name.
94 94 * @param Integer $user_id The user identifier.
95 95 * @return string|array an array of secrets or an error string.
96 + * @phan-return string|array{secret_1:string,secret_2:string,exp:int}
96 97 */
97 98 public function get( $action, $user_id ) {
98 99 $secret_name = 'jetpack_' . $action . '_' . $user_id;
99 100 $secrets = Jetpack_Options::get_raw_option(
@@ -157,8 +158,9 @@
157 158 * @param \WP_User $user The user object.
158 159 */
159 160 do_action( 'jetpack_verify_secrets_begin', $action, $user );
160 161
162 + /** Closure to run the 'fail' action and return an error. */
161 163 $return_error = function ( WP_Error $error ) use ( $action, $user ) {
162 164 /**
163 165 * Verifying of the previously generated secret has failed.
164 166 *