@@ 1321-1335 (lines=15) @@ | ||
1318 | * @param array $args arguments that need to have the source added. |
|
1319 | * @return array $amended arguments. |
|
1320 | */ |
|
1321 | public static function apply_activation_source_to_args( $args ) { |
|
1322 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1323 | ||
1324 | if ( $activation_source_name ) { |
|
1325 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1326 | $args['_as'] = urlencode( $activation_source_name ); |
|
1327 | } |
|
1328 | ||
1329 | if ( $activation_source_keyword ) { |
|
1330 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1331 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1332 | } |
|
1333 | ||
1334 | return $args; |
|
1335 | } |
|
1336 | ||
1337 | /** |
|
1338 | * Returns the callable that would be used to generate secrets. |
@@ 4514-4524 (lines=11) @@ | ||
4511 | self::state( 'message', 'reconnection_completed' ); |
|
4512 | } |
|
4513 | ||
4514 | public static function apply_activation_source_to_args( &$args ) { |
|
4515 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
4516 | ||
4517 | if ( $activation_source_name ) { |
|
4518 | $args['_as'] = urlencode( $activation_source_name ); |
|
4519 | } |
|
4520 | ||
4521 | if ( $activation_source_keyword ) { |
|
4522 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
4523 | } |
|
4524 | } |
|
4525 | ||
4526 | function build_reconnect_url( $raw = false ) { |
|
4527 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |