| @@ 5136-5146 (lines=11) @@ | ||
| 5133 | return self::connection()->get_assumed_site_creation_date(); |
|
| 5134 | } |
|
| 5135 | ||
| 5136 | public static function apply_activation_source_to_args( &$args ) { |
|
| 5137 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 5138 | ||
| 5139 | if ( $activation_source_name ) { |
|
| 5140 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 5141 | } |
|
| 5142 | ||
| 5143 | if ( $activation_source_keyword ) { |
|
| 5144 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 5145 | } |
|
| 5146 | } |
|
| 5147 | ||
| 5148 | function build_reconnect_url( $raw = false ) { |
|
| 5149 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|
| @@ 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. |
|