| @@ 1241-1255 (lines=15) @@ | ||
| 1238 | * @param array $args arguments that need to have the source added. |
|
| 1239 | * @return array $amended arguments. |
|
| 1240 | */ |
|
| 1241 | public static function apply_activation_source_to_args( $args ) { |
|
| 1242 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1243 | ||
| 1244 | if ( $activation_source_name ) { |
|
| 1245 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1246 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1247 | } |
|
| 1248 | ||
| 1249 | if ( $activation_source_keyword ) { |
|
| 1250 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1251 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1252 | } |
|
| 1253 | ||
| 1254 | return $args; |
|
| 1255 | } |
|
| 1256 | ||
| 1257 | /** |
|
| 1258 | * Generates two secret tokens and the end of life timestamp for them. |
|
| @@ 4979-4989 (lines=11) @@ | ||
| 4976 | return self::connection()->get_assumed_site_creation_date(); |
|
| 4977 | } |
|
| 4978 | ||
| 4979 | public static function apply_activation_source_to_args( &$args ) { |
|
| 4980 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 4981 | ||
| 4982 | if ( $activation_source_name ) { |
|
| 4983 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 4984 | } |
|
| 4985 | ||
| 4986 | if ( $activation_source_keyword ) { |
|
| 4987 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 4988 | } |
|
| 4989 | } |
|
| 4990 | ||
| 4991 | function build_reconnect_url( $raw = false ) { |
|
| 4992 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|