@@ 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. |
@@ 5124-5134 (lines=11) @@ | ||
5121 | return self::connection()->get_assumed_site_creation_date(); |
|
5122 | } |
|
5123 | ||
5124 | public static function apply_activation_source_to_args( &$args ) { |
|
5125 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
5126 | ||
5127 | if ( $activation_source_name ) { |
|
5128 | $args['_as'] = urlencode( $activation_source_name ); |
|
5129 | } |
|
5130 | ||
5131 | if ( $activation_source_keyword ) { |
|
5132 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
5133 | } |
|
5134 | } |
|
5135 | ||
5136 | function build_reconnect_url( $raw = false ) { |
|
5137 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |