| @@ 1081-1095 (lines=15) @@ | ||
| 1078 | * @param Array $args arguments that need to have the source added. |
|
| 1079 | * @return Array $amended arguments. |
|
| 1080 | */ |
|
| 1081 | public static function apply_activation_source_to_args( $args ) { |
|
| 1082 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1083 | ||
| 1084 | if ( $activation_source_name ) { |
|
| 1085 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1086 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1087 | } |
|
| 1088 | ||
| 1089 | if ( $activation_source_keyword ) { |
|
| 1090 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1091 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1092 | } |
|
| 1093 | ||
| 1094 | return $args; |
|
| 1095 | } |
|
| 1096 | ||
| 1097 | /** |
|
| 1098 | * Returns the callable that would be used to generate secrets. |
|
| @@ 4818-4828 (lines=11) @@ | ||
| 4815 | return self::connection()->get_assumed_site_creation_date(); |
|
| 4816 | } |
|
| 4817 | ||
| 4818 | public static function apply_activation_source_to_args( &$args ) { |
|
| 4819 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 4820 | ||
| 4821 | if ( $activation_source_name ) { |
|
| 4822 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 4823 | } |
|
| 4824 | ||
| 4825 | if ( $activation_source_keyword ) { |
|
| 4826 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 4827 | } |
|
| 4828 | } |
|
| 4829 | ||
| 4830 | function build_reconnect_url( $raw = false ) { |
|
| 4831 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|