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