Skip to:
Content

bbPress.org

Changeset 5960


Ignore:
Timestamp:
12/11/2015 02:47:56 AM (10 years ago)
Author:
netweb
Message:

Tools: Include forum-mod taxonomy code in bbp_admin_reset_handler()

This changeset adds support for deleting the forum moderator taxonomy when running the bbPress "Reset Forums" tool.

Props netweb.
Fixes #2898.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r5951 r5960  
    21562156                            <?php esc_html_e( 'Forum Activity',       'bbpress' ); ?><br />
    21572157                            <?php esc_html_e( 'Forum User Roles',     'bbpress' ); ?><br />
     2158                            <?php esc_html_e( 'Forum Moderators',     'bbpress' ); ?><br />
    21582159                            <?php esc_html_e( 'Importer Helper Data', 'bbpress' ); ?><br />
    21592160                        </td>
     
    22542255    }
    22552256
     2257    /** Forum moderators ******************************************************/
     2258
     2259    $statement  = __( 'Deleting Forum Moderators&hellip; %s', 'bbpress' );
     2260    $sql_delete = "DELETE a,b,c FROM `{$bbp_db->terms}` AS a LEFT JOIN `{$bbp_db->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$bbp_db->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'forum-mod';";
     2261    $result     = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
     2262    $messages[] = sprintf( $statement, $result );
     2263
    22562264    /** Topic Tags ************************************************************/
    22572265
Note: See TracChangeset for help on using the changeset viewer.