Changeset 3473161
- Timestamp:
- 03/03/2026 12:26:33 AM (5 weeks ago)
- File:
-
- 1 edited
-
akismet/trunk/class.akismet-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
akismet/trunk/class.akismet-admin.php
r3473046 r3473161 1170 1170 } 1171 1171 1172 // the user can choose to auto connect their API key by clicking a button on the akismet done page 1173 // if jetpack, get verified api key by using connected wpcom user id 1174 // if no jetpack, get verified api key by using an akismet token 1172 // The user can choose to auto-connect their API key by clicking a button on the Akismet done page. 1173 // If Jetpack is insalled and connected, use the connected wpcom user. 1175 1174 1176 1175 $akismet_user = false; 1177 1176 1178 if ( isset( $_GET['token'] ) && preg_match( '/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) ) { 1179 $akismet_user = self::verify_wpcom_key( '', '', array( 'token' => $_GET['token'] ) ); 1180 } 1181 1182 if ( false === $akismet_user ) { 1183 $jetpack_user = self::get_jetpack_user(); 1184 1185 if ( is_array( $jetpack_user ) ) { 1186 $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); 1187 } 1188 } 1189 1190 if ( isset( $_GET['action'] ) ) { 1191 if ( $_GET['action'] == 'save-key' ) { 1192 if ( is_object( $akismet_user ) ) { 1193 self::save_key( $akismet_user->api_key ); 1194 self::display_configuration_page(); 1195 return; 1196 } 1197 } 1177 $jetpack_user = self::get_jetpack_user(); 1178 1179 if ( is_array( $jetpack_user ) ) { 1180 $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); 1198 1181 } 1199 1182
Note: See TracChangeset
for help on using the changeset viewer.