@@ 1166-1180 (lines=15) @@ | ||
1163 | * @param Array $args arguments that need to have the source added. |
|
1164 | * @return Array $amended arguments. |
|
1165 | */ |
|
1166 | public static function apply_activation_source_to_args( $args ) { |
|
1167 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1168 | ||
1169 | if ( $activation_source_name ) { |
|
1170 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1171 | $args['_as'] = urlencode( $activation_source_name ); |
|
1172 | } |
|
1173 | ||
1174 | if ( $activation_source_keyword ) { |
|
1175 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1176 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1177 | } |
|
1178 | ||
1179 | return $args; |
|
1180 | } |
|
1181 | ||
1182 | /** |
|
1183 | * Returns the callable that would be used to generate secrets. |
@@ 4945-4955 (lines=11) @@ | ||
4942 | return self::connection()->get_assumed_site_creation_date(); |
|
4943 | } |
|
4944 | ||
4945 | public static function apply_activation_source_to_args( &$args ) { |
|
4946 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
4947 | ||
4948 | if ( $activation_source_name ) { |
|
4949 | $args['_as'] = urlencode( $activation_source_name ); |
|
4950 | } |
|
4951 | ||
4952 | if ( $activation_source_keyword ) { |
|
4953 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
4954 | } |
|
4955 | } |
|
4956 | ||
4957 | function build_reconnect_url( $raw = false ) { |
|
4958 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |