@@ 5106-5116 (lines=11) @@ | ||
5103 | return self::connection()->get_assumed_site_creation_date(); |
|
5104 | } |
|
5105 | ||
5106 | public static function apply_activation_source_to_args( &$args ) { |
|
5107 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
5108 | ||
5109 | if ( $activation_source_name ) { |
|
5110 | $args['_as'] = urlencode( $activation_source_name ); |
|
5111 | } |
|
5112 | ||
5113 | if ( $activation_source_keyword ) { |
|
5114 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
5115 | } |
|
5116 | } |
|
5117 | ||
5118 | function build_reconnect_url( $raw = false ) { |
|
5119 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
@@ 1281-1295 (lines=15) @@ | ||
1278 | * @param array $args arguments that need to have the source added. |
|
1279 | * @return array $amended arguments. |
|
1280 | */ |
|
1281 | public static function apply_activation_source_to_args( $args ) { |
|
1282 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1283 | ||
1284 | if ( $activation_source_name ) { |
|
1285 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1286 | $args['_as'] = urlencode( $activation_source_name ); |
|
1287 | } |
|
1288 | ||
1289 | if ( $activation_source_keyword ) { |
|
1290 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1291 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1292 | } |
|
1293 | ||
1294 | return $args; |
|
1295 | } |
|
1296 | ||
1297 | /** |
|
1298 | * Generates two secret tokens and the end of life timestamp for them. |