| @@ 5017-5027 (lines=11) @@ | ||
| 5014 | return self::connection()->get_assumed_site_creation_date(); |
|
| 5015 | } |
|
| 5016 | ||
| 5017 | public static function apply_activation_source_to_args( &$args ) { |
|
| 5018 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 5019 | ||
| 5020 | if ( $activation_source_name ) { |
|
| 5021 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 5022 | } |
|
| 5023 | ||
| 5024 | if ( $activation_source_keyword ) { |
|
| 5025 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 5026 | } |
|
| 5027 | } |
|
| 5028 | ||
| 5029 | function build_reconnect_url( $raw = false ) { |
|
| 5030 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|
| @@ 1342-1356 (lines=15) @@ | ||
| 1339 | * @param array $args arguments that need to have the source added. |
|
| 1340 | * @return array $amended arguments. |
|
| 1341 | */ |
|
| 1342 | public static function apply_activation_source_to_args( $args ) { |
|
| 1343 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1344 | ||
| 1345 | if ( $activation_source_name ) { |
|
| 1346 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1347 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1348 | } |
|
| 1349 | ||
| 1350 | if ( $activation_source_keyword ) { |
|
| 1351 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1352 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1353 | } |
|
| 1354 | ||
| 1355 | return $args; |
|
| 1356 | } |
|
| 1357 | ||
| 1358 | /** |
|
| 1359 | * Returns the callable that would be used to generate secrets. |
|