@@ 1322-1336 (lines=15) @@ | ||
1319 | * @param array $args arguments that need to have the source added. |
|
1320 | * @return array $amended arguments. |
|
1321 | */ |
|
1322 | public static function apply_activation_source_to_args( $args ) { |
|
1323 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1324 | ||
1325 | if ( $activation_source_name ) { |
|
1326 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1327 | $args['_as'] = urlencode( $activation_source_name ); |
|
1328 | } |
|
1329 | ||
1330 | if ( $activation_source_keyword ) { |
|
1331 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1332 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1333 | } |
|
1334 | ||
1335 | return $args; |
|
1336 | } |
|
1337 | ||
1338 | /** |
|
1339 | * Returns the callable that would be used to generate secrets. |
@@ 5120-5130 (lines=11) @@ | ||
5117 | return self::connection()->get_assumed_site_creation_date(); |
|
5118 | } |
|
5119 | ||
5120 | public static function apply_activation_source_to_args( &$args ) { |
|
5121 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
5122 | ||
5123 | if ( $activation_source_name ) { |
|
5124 | $args['_as'] = urlencode( $activation_source_name ); |
|
5125 | } |
|
5126 | ||
5127 | if ( $activation_source_keyword ) { |
|
5128 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
5129 | } |
|
5130 | } |
|
5131 | ||
5132 | function build_reconnect_url( $raw = false ) { |
|
5133 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |