| @@ 5115-5125 (lines=11) @@ | ||
| 5112 | return self::connection()->get_assumed_site_creation_date(); |
|
| 5113 | } |
|
| 5114 | ||
| 5115 | public static function apply_activation_source_to_args( &$args ) { |
|
| 5116 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 5117 | ||
| 5118 | if ( $activation_source_name ) { |
|
| 5119 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 5120 | } |
|
| 5121 | ||
| 5122 | if ( $activation_source_keyword ) { |
|
| 5123 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 5124 | } |
|
| 5125 | } |
|
| 5126 | ||
| 5127 | function build_reconnect_url( $raw = false ) { |
|
| 5128 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|
| @@ 1457-1471 (lines=15) @@ | ||
| 1454 | * @param array $args arguments that need to have the source added. |
|
| 1455 | * @return array $amended arguments. |
|
| 1456 | */ |
|
| 1457 | public static function apply_activation_source_to_args( $args ) { |
|
| 1458 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1459 | ||
| 1460 | if ( $activation_source_name ) { |
|
| 1461 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1462 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1463 | } |
|
| 1464 | ||
| 1465 | if ( $activation_source_keyword ) { |
|
| 1466 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1467 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1468 | } |
|
| 1469 | ||
| 1470 | return $args; |
|
| 1471 | } |
|
| 1472 | ||
| 1473 | /** |
|
| 1474 | * Generates two secret tokens and the end of life timestamp for them. |
|