| @@ 1456-1470 (lines=15) @@ | ||
| 1453 | * @param array $args arguments that need to have the source added. |
|
| 1454 | * @return array $amended arguments. |
|
| 1455 | */ |
|
| 1456 | public static function apply_activation_source_to_args( $args ) { |
|
| 1457 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1458 | ||
| 1459 | if ( $activation_source_name ) { |
|
| 1460 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1461 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1462 | } |
|
| 1463 | ||
| 1464 | if ( $activation_source_keyword ) { |
|
| 1465 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1466 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1467 | } |
|
| 1468 | ||
| 1469 | return $args; |
|
| 1470 | } |
|
| 1471 | ||
| 1472 | /** |
|
| 1473 | * Generates two secret tokens and the end of life timestamp for them. |
|
| @@ 4819-4829 (lines=11) @@ | ||
| 4816 | self::state( 'message', 'reconnection_completed' ); |
|
| 4817 | } |
|
| 4818 | ||
| 4819 | public static function apply_activation_source_to_args( &$args ) { |
|
| 4820 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 4821 | ||
| 4822 | if ( $activation_source_name ) { |
|
| 4823 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 4824 | } |
|
| 4825 | ||
| 4826 | if ( $activation_source_keyword ) { |
|
| 4827 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 4828 | } |
|
| 4829 | } |
|
| 4830 | ||
| 4831 | function build_reconnect_url( $raw = false ) { |
|
| 4832 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|