Changeset 5174
- Timestamp:
- 11/23/2013 12:45:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/tools.php
r5173 r5174 1157 1157 <legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ); ?></span></legend> 1158 1158 <label><input type="checkbox" class="checkbox" name="bbpress-delete-imported-users" id="bbpress-delete-imported-users" value="1" /> <?php esc_html_e( 'This option will delete all previously imported users, and cannot be undone.', 'bbpress' ); ?></label> 1159 <p class="description"><?php esc_html_e( 'Note: Resetting without this checked will delete the meta-data necessary to delete these users.', 'bbpress' ); ?></p> 1159 1160 </fieldset> 1160 1161 </td> … … 1243 1244 /** User ******************************************************************/ 1244 1245 1246 // Delete users 1245 1247 if ( !empty( $_POST['bbpress-delete-imported-users'] ) ) { 1246 1248 $sql_users = $wpdb->get_results( "SELECT `user_id` FROM `{$wpdb->usermeta}` WHERE `meta_key` = '_bbp_user_id'", OBJECT_K ); … … 1260 1262 $messages[] = sprintf( $statement, $result ); 1261 1263 } 1264 1265 // Delete imported user metadata 1266 } else { 1267 $statement = __( 'Deleting User Meta… %s', 'bbpress' ); 1268 $sql_delete = "DELETE FROM `{$wpdb->usermeta}` WHERE `meta_key` LIKE '%%_bbp_%%';"; 1269 $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success; 1270 $messages[] = sprintf( $statement, $result ); 1262 1271 } 1263 1272
Note: See TracChangeset
for help on using the changeset viewer.