| @@ 4762-4772 (lines=11) @@ | ||
| 4759 | return self::connection()->get_assumed_site_creation_date(); |
|
| 4760 | } |
|
| 4761 | ||
| 4762 | public static function apply_activation_source_to_args( &$args ) { |
|
| 4763 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 4764 | ||
| 4765 | if ( $activation_source_name ) { |
|
| 4766 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 4767 | } |
|
| 4768 | ||
| 4769 | if ( $activation_source_keyword ) { |
|
| 4770 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 4771 | } |
|
| 4772 | } |
|
| 4773 | ||
| 4774 | function build_reconnect_url( $raw = false ) { |
|
| 4775 | $url = wp_nonce_url( self::admin_url( 'action=reconnect' ), 'jetpack-reconnect' ); |
|
| @@ 1110-1124 (lines=15) @@ | ||
| 1107 | * @param Array $args arguments that need to have the source added. |
|
| 1108 | * @return Array $amended arguments. |
|
| 1109 | */ |
|
| 1110 | public static function apply_activation_source_to_args( $args ) { |
|
| 1111 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1112 | ||
| 1113 | if ( $activation_source_name ) { |
|
| 1114 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1115 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1116 | } |
|
| 1117 | ||
| 1118 | if ( $activation_source_keyword ) { |
|
| 1119 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1120 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1121 | } |
|
| 1122 | ||
| 1123 | return $args; |
|
| 1124 | } |
|
| 1125 | ||
| 1126 | /** |
|
| 1127 | * Returns the callable that would be used to generate secrets. |
|