@@ 4593-4600 (lines=8) @@ | ||
4590 | return $secrets[ $secret_name ]; |
|
4591 | } |
|
4592 | ||
4593 | public static function get_secret( $action, $user_id ) { |
|
4594 | $secret_name = 'jetpack_' . $action . '_' . $user_id; |
|
4595 | $secrets = Jetpack_Options::get_option( 'secrets', array() ); |
|
4596 | if ( isset( $secrets[ $secret_name ] ) ) { |
|
4597 | return $secrets[ $secret_name ]; |
|
4598 | } |
|
4599 | return false; |
|
4600 | } |
|
4601 | ||
4602 | public static function delete_secret( $action, $user_id ) { |
|
4603 | $secret_name = 'jetpack_' . $action . '_' . $user_id; |
|
@@ 4602-4609 (lines=8) @@ | ||
4599 | return false; |
|
4600 | } |
|
4601 | ||
4602 | public static function delete_secret( $action, $user_id ) { |
|
4603 | $secret_name = 'jetpack_' . $action . '_' . $user_id; |
|
4604 | $secrets = Jetpack_Options::get_option( 'secrets', array() ); |
|
4605 | if ( isset( $secrets[ $secret_name ] ) ) { |
|
4606 | unset( $secrets[ $secret_name ] ); |
|
4607 | Jetpack_Options::update_options( 'secrets', $secrets ); |
|
4608 | } |
|
4609 | } |
|
4610 | ||
4611 | /** |
|
4612 | * Builds the timeout limit for queries talking with the wpcom servers. |