@@ 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' ); |
@@ 1215-1229 (lines=15) @@ | ||
1212 | * @param array $args arguments that need to have the source added. |
|
1213 | * @return array $amended arguments. |
|
1214 | */ |
|
1215 | public static function apply_activation_source_to_args( $args ) { |
|
1216 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1217 | ||
1218 | if ( $activation_source_name ) { |
|
1219 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1220 | $args['_as'] = urlencode( $activation_source_name ); |
|
1221 | } |
|
1222 | ||
1223 | if ( $activation_source_keyword ) { |
|
1224 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1225 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1226 | } |
|
1227 | ||
1228 | return $args; |
|
1229 | } |
|
1230 | ||
1231 | /** |
|
1232 | * Generates two secret tokens and the end of life timestamp for them. |