Changeset 10961
- Timestamp:
- 05/10/2021 05:42:47 AM (2 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/admin/class-user-registrations-list-table.php
r10944 r10961 26 26 'akismet', 27 27 'Akismet said no', 28 ], 29 [ 30 'heuristics', 31 'Heiristics: Review / Block', 28 32 ] 29 33 ]; … … 80 84 case 'akismet': 81 85 return "meta LIKE '%akismet_result\":\"spam%'"; 86 case 'heuristics': 87 return "meta LIKE '%heuristics%' AND meta NOT LIKE '%heuristics\":\"allow%'"; 82 88 case 'registered': 83 89 return 'created = 1'; … … 317 323 } 318 324 325 $heuristics = $meta->heuristics ?? ''; 326 if ( $heuristics ) { 327 printf( 328 '<abbr title="%s">%s</abbr> ', 329 esc_attr( 'Heuristics' ), 330 esc_html( strtolower( $heuristics ) ) 331 ); 332 } 333 319 334 $row_actions = []; 320 335 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php
r10949 r10961 122 122 } 123 123 124 if ( function_exists( 'wporg_registration_check_private_heuristics' ) ) { 125 // Returns block, review, allow. 126 $pending_user['meta']['heuristics'] = wporg_registration_check_private_heuristics( compact( 'user_login', 'user_email' ) ); 127 } 128 124 129 $pending_user['meta']['akismet_result'] = wporg_login_check_akismet( $user_login, $user_email ); 125 130 126 131 $pending_user['cleared'] = ( 132 // ( !isset( $pending_user['meta']['heuristics'] ) || 'allow' === $pending_user['meta']['heuristics'] ) && // Disabled for now, review results first, replace Akismet below 127 133 'spam' !== $pending_user['meta']['akismet_result'] && 128 134 (float)$pending_user['scores']['pending'] >= (float) get_option( 'recaptcha_v3_threshold', 0.2 ) … … 213 219 214 220 // Cast the int fields to an integer. 215 foreach ( [ 'pending_id', 'cleared', 'created' ] as $field ) {216 $pending_user[ $field ] = (int) $pending_user[ $field];217 }221 $pending_user['pending_id'] = (int) $pending_user['pending_id']; 222 $pending_user['cleared'] = (int) $pending_user['cleared']; 223 $pending_user['created'] = (int) $pending_user['created']; 218 224 219 225 return $pending_user;
Note: See TracChangeset
for help on using the changeset viewer.