@@ 1328-1342 (lines=15) @@ | ||
1325 | * @param array $args arguments that need to have the source added. |
|
1326 | * @return array $amended arguments. |
|
1327 | */ |
|
1328 | public static function apply_activation_source_to_args( $args ) { |
|
1329 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1330 | ||
1331 | if ( $activation_source_name ) { |
|
1332 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1333 | $args['_as'] = urlencode( $activation_source_name ); |
|
1334 | } |
|
1335 | ||
1336 | if ( $activation_source_keyword ) { |
|
1337 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1338 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1339 | } |
|
1340 | ||
1341 | return $args; |
|
1342 | } |
|
1343 | ||
1344 | /** |
|
1345 | * Generates two secret tokens and the end of life timestamp for them. |
@@ 5133-5143 (lines=11) @@ | ||
5130 | return self::connection()->get_assumed_site_creation_date(); |
|
5131 | } |
|
5132 | ||
5133 | public static function apply_activation_source_to_args( &$args ) { |
|
5134 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
5135 | ||
5136 | if ( $activation_source_name ) { |
|
5137 | $args['_as'] = urlencode( $activation_source_name ); |
|
5138 | } |
|
5139 | ||
5140 | if ( $activation_source_keyword ) { |
|
5141 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
5142 | } |
|
5143 | } |
|
5144 | ||
5145 | function build_reconnect_url( $raw = false ) { |
|
5146 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |