@@ 1263-1277 (lines=15) @@ | ||
1260 | * @param array $args arguments that need to have the source added. |
|
1261 | * @return array $amended arguments. |
|
1262 | */ |
|
1263 | public static function apply_activation_source_to_args( $args ) { |
|
1264 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1265 | ||
1266 | if ( $activation_source_name ) { |
|
1267 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1268 | $args['_as'] = urlencode( $activation_source_name ); |
|
1269 | } |
|
1270 | ||
1271 | if ( $activation_source_keyword ) { |
|
1272 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1273 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1274 | } |
|
1275 | ||
1276 | return $args; |
|
1277 | } |
|
1278 | ||
1279 | /** |
|
1280 | * Generates two secret tokens and the end of life timestamp for them. |
@@ 4977-4987 (lines=11) @@ | ||
4974 | return self::connection()->get_assumed_site_creation_date(); |
|
4975 | } |
|
4976 | ||
4977 | public static function apply_activation_source_to_args( &$args ) { |
|
4978 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
4979 | ||
4980 | if ( $activation_source_name ) { |
|
4981 | $args['_as'] = urlencode( $activation_source_name ); |
|
4982 | } |
|
4983 | ||
4984 | if ( $activation_source_keyword ) { |
|
4985 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
4986 | } |
|
4987 | } |
|
4988 | ||
4989 | function build_reconnect_url( $raw = false ) { |
|
4990 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |