@@ 1130-1144 (lines=15) @@ | ||
1127 | * @param Array $args arguments that need to have the source added. |
|
1128 | * @return Array $amended arguments. |
|
1129 | */ |
|
1130 | public static function apply_activation_source_to_args( $args ) { |
|
1131 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
1132 | ||
1133 | if ( $activation_source_name ) { |
|
1134 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1135 | $args['_as'] = urlencode( $activation_source_name ); |
|
1136 | } |
|
1137 | ||
1138 | if ( $activation_source_keyword ) { |
|
1139 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
1140 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
1141 | } |
|
1142 | ||
1143 | return $args; |
|
1144 | } |
|
1145 | ||
1146 | /** |
|
1147 | * Returns the callable that would be used to generate secrets. |
@@ 4837-4847 (lines=11) @@ | ||
4834 | return self::connection()->get_assumed_site_creation_date(); |
|
4835 | } |
|
4836 | ||
4837 | public static function apply_activation_source_to_args( &$args ) { |
|
4838 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
4839 | ||
4840 | if ( $activation_source_name ) { |
|
4841 | $args['_as'] = urlencode( $activation_source_name ); |
|
4842 | } |
|
4843 | ||
4844 | if ( $activation_source_keyword ) { |
|
4845 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
4846 | } |
|
4847 | } |
|
4848 | ||
4849 | function build_reconnect_url( $raw = false ) { |
|
4850 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |