@@ 1312-1326 (lines=15) @@ | ||
1309 | * @param array $args arguments that need to have the source added. |
|
1310 | * @return array $amended arguments. |
|
1311 | */ |
|
1312 | public static function apply_activation_source_to_args( $args ) { |
|
1313 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1314 | ||
1315 | if ( $activation_source_name ) { |
|
1316 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1317 | $args['_as'] = urlencode( $activation_source_name ); |
|
1318 | } |
|
1319 | ||
1320 | if ( $activation_source_keyword ) { |
|
1321 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1322 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1323 | } |
|
1324 | ||
1325 | return $args; |
|
1326 | } |
|
1327 | ||
1328 | /** |
|
1329 | * Generates two secret tokens and the end of life timestamp for them. |
@@ 5166-5176 (lines=11) @@ | ||
5163 | return self::connection()->get_assumed_site_creation_date(); |
|
5164 | } |
|
5165 | ||
5166 | public static function apply_activation_source_to_args( &$args ) { |
|
5167 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
5168 | ||
5169 | if ( $activation_source_name ) { |
|
5170 | $args['_as'] = urlencode( $activation_source_name ); |
|
5171 | } |
|
5172 | ||
5173 | if ( $activation_source_keyword ) { |
|
5174 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
5175 | } |
|
5176 | } |
|
5177 | ||
5178 | function build_reconnect_url( $raw = false ) { |
|
5179 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |