| @@ 1235-1249 (lines=15) @@ | ||
| 1232 | * @param array $args arguments that need to have the source added. | |
| 1233 | * @return array $amended arguments. | |
| 1234 | */ | |
| 1235 | 	public static function apply_activation_source_to_args( $args ) { | |
| 1236 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); | |
| 1237 | ||
| 1238 | 		if ( $activation_source_name ) { | |
| 1239 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode | |
| 1240 | $args['_as'] = urlencode( $activation_source_name ); | |
| 1241 | } | |
| 1242 | ||
| 1243 | 		if ( $activation_source_keyword ) { | |
| 1244 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode | |
| 1245 | $args['_ak'] = urlencode( $activation_source_keyword ); | |
| 1246 | } | |
| 1247 | ||
| 1248 | return $args; | |
| 1249 | } | |
| 1250 | ||
| 1251 | /** | |
| 1252 | * Returns the callable that would be used to generate secrets. | |
| @@ 4933-4943 (lines=11) @@ | ||
| 4930 | return self::connection()->get_assumed_site_creation_date(); | |
| 4931 | } | |
| 4932 | ||
| 4933 | 	public static function apply_activation_source_to_args( &$args ) { | |
| 4934 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); | |
| 4935 | ||
| 4936 | 		if ( $activation_source_name ) { | |
| 4937 | $args['_as'] = urlencode( $activation_source_name ); | |
| 4938 | } | |
| 4939 | ||
| 4940 | 		if ( $activation_source_keyword ) { | |
| 4941 | $args['_ak'] = urlencode( $activation_source_keyword ); | |
| 4942 | } | |
| 4943 | } | |
| 4944 | ||
| 4945 | 	function build_reconnect_url( $raw = false ) { | |
| 4946 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); | |