@@ 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. |
@@ 4831-4841 (lines=11) @@ | ||
4828 | return self::connection()->get_assumed_site_creation_date(); |
|
4829 | } |
|
4830 | ||
4831 | public static function apply_activation_source_to_args( &$args ) { |
|
4832 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
4833 | ||
4834 | if ( $activation_source_name ) { |
|
4835 | $args['_as'] = urlencode( $activation_source_name ); |
|
4836 | } |
|
4837 | ||
4838 | if ( $activation_source_keyword ) { |
|
4839 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
4840 | } |
|
4841 | } |
|
4842 | ||
4843 | function build_reconnect_url( $raw = false ) { |
|
4844 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |