projects/plugins/jetpack/tests/php/modules/wpcom-block-editor/test_class-jetpack-wpcom-block-editor.php 1 location
|
@@ 78-88 (lines=11) @@
|
| 75 |
|
* @param string $scheme Authentication scheme. |
| 76 |
|
* @return string |
| 77 |
|
*/ |
| 78 |
|
public function filter_salt( $salt, $scheme ) { |
| 79 |
|
if ( 'jetpack_frame_nonce' === $scheme ) { |
| 80 |
|
$token = ( new Automattic\Jetpack\Connection\Tokens() )->get_access_token( $this->user_id ); |
| 81 |
|
|
| 82 |
|
if ( $token ) { |
| 83 |
|
$salt = $token->secret; |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
return $salt; |
| 88 |
|
} |
| 89 |
|
} |
| 90 |
|
|
projects/plugins/jetpack/modules/wpcom-block-editor/class-jetpack-wpcom-block-editor.php 1 location
|
@@ 283-293 (lines=11) @@
|
| 280 |
|
* @param string $scheme Authentication scheme. |
| 281 |
|
* @return string |
| 282 |
|
*/ |
| 283 |
|
public function filter_salt( $salt, $scheme ) { |
| 284 |
|
if ( 'jetpack_frame_nonce' === $scheme ) { |
| 285 |
|
$token = ( new Tokens() )->get_access_token( $this->nonce_user_id ); |
| 286 |
|
|
| 287 |
|
if ( $token ) { |
| 288 |
|
$salt = $token->secret; |
| 289 |
|
} |
| 290 |
|
} |
| 291 |
|
|
| 292 |
|
return $salt; |
| 293 |
|
} |
| 294 |
|
|
| 295 |
|
/** |
| 296 |
|
* Enqueues the WordPress.com block editor integration assets for the editor. |