| @@ 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' ); |
|
| @@ 1129-1143 (lines=15) @@ | ||
| 1126 | * @param Array $args arguments that need to have the source added. |
|
| 1127 | * @return Array $amended arguments. |
|
| 1128 | */ |
|
| 1129 | public static function apply_activation_source_to_args( $args ) { |
|
| 1130 | list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); |
|
| 1131 | ||
| 1132 | if ( $activation_source_name ) { |
|
| 1133 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1134 | $args['_as'] = urlencode( $activation_source_name ); |
|
| 1135 | } |
|
| 1136 | ||
| 1137 | if ( $activation_source_keyword ) { |
|
| 1138 | // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode |
|
| 1139 | $args['_ak'] = urlencode( $activation_source_keyword ); |
|
| 1140 | } |
|
| 1141 | ||
| 1142 | return $args; |
|
| 1143 | } |
|
| 1144 | ||
| 1145 | /** |
|
| 1146 | * Returns the callable that would be used to generate secrets. |
|