@@ 334-347 (lines=14) @@ | ||
331 | /** |
|
332 | * Set invalid user token. |
|
333 | */ |
|
334 | public function admin_post_set_invalid_user_tokens() { |
|
335 | check_admin_referer( 'set-invalid-user-tokens' ); |
|
336 | $this->notice_type = 'jetpack-broken'; |
|
337 | ||
338 | $new_tokens = array(); |
|
339 | ||
340 | foreach ( Jetpack_Options::get_option( 'user_tokens' ) as $id => $token ) { |
|
341 | $new_tokens[ $id ] = sprintf( $this->invalid_user_token, $id ); |
|
342 | } |
|
343 | ||
344 | Jetpack_Options::update_option( 'user_tokens', $new_tokens ); |
|
345 | ||
346 | $this->admin_post_redirect_referrer(); |
|
347 | } |
|
348 | ||
349 | /** |
|
350 | * Set invalid current user token. |
|
@@ 352-364 (lines=13) @@ | ||
349 | /** |
|
350 | * Set invalid current user token. |
|
351 | */ |
|
352 | public function admin_post_set_invalid_current_user_token() { |
|
353 | check_admin_referer( 'set-invalid-current-user-token' ); |
|
354 | $this->notice_type = 'jetpack-broken'; |
|
355 | ||
356 | $tokens = Jetpack_Options::get_option( 'user_tokens' ); |
|
357 | ||
358 | $id = get_current_user_id(); |
|
359 | $tokens[ $id ] = sprintf( $this->invalid_user_token, $id ); |
|
360 | ||
361 | Jetpack_Options::update_option( 'user_tokens', $tokens ); |
|
362 | ||
363 | $this->admin_post_redirect_referrer(); |
|
364 | } |
|
365 | ||
366 | /** |
|
367 | * Clear blog token. |