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