| @@ 1146-1160 (lines=15) @@ | ||
| 1143 | * @param Array $args arguments that need to have the source added. |
|
| 1144 | * @return Array $amended arguments. |
|
| 1145 | */ |
|
| 1146 | public static function apply_activation_source_to_args( $args ) { |
|
| 1147 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1148 | ||
| 1149 | if ( $activation_source_name ) { |
|
| 1150 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1151 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1152 | } |
|
| 1153 | ||
| 1154 | if ( $activation_source_keyword ) { |
|
| 1155 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1156 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1157 | } |
|
| 1158 | ||
| 1159 | return $args; |
|
| 1160 | } |
|
| 1161 | ||
| 1162 | /** |
|
| 1163 | * Returns the callable that would be used to generate secrets. |
|
| @@ 4843-4853 (lines=11) @@ | ||
| 4840 | return self::connection()->get_assumed_site_creation_date(); |
|
| 4841 | } |
|
| 4842 | ||
| 4843 | public static function apply_activation_source_to_args( &$args ) { |
|
| 4844 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 4845 | ||
| 4846 | if ( $activation_source_name ) { |
|
| 4847 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 4848 | } |
|
| 4849 | ||
| 4850 | if ( $activation_source_keyword ) { |
|
| 4851 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 4852 | } |
|
| 4853 | } |
|
| 4854 | ||
| 4855 | function build_reconnect_url( $raw = false ) { |
|
| 4856 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|