Ticket #3173: 3173.diff
File 3173.diff, 1.3 KB (added by , 7 years ago) |
---|
-
src/includes/admin/tools/reset.php
82 82 */ 83 83 function bbp_admin_reset_handler() { 84 84 85 // Bail if not resetting 85 // Bail if not resetting. 86 86 if ( ! bbp_is_post_request() || empty( $_POST['bbpress-are-you-sure'] ) ) { 87 87 return; 88 88 } 89 89 90 // Only keymasters can proceed 90 // Only keymasters can proceed. 91 91 if ( ! bbp_is_user_keymaster() ) { 92 92 return; 93 93 } … … 94 94 95 95 check_admin_referer( 'bbpress-reset' ); 96 96 97 // Stores messages 97 bbp_admin_reset_bbpress(); 98 } 99 100 /** 101 * Reset bbPress. 102 * 103 * @since 2.6.0 bbPress 104 */ 105 function bbp_admin_reset_bbpress() { 106 107 // Stores messages. 98 108 $messages = array(); 99 109 $failed = esc_html__( 'Failed!', 'bbpress' ); 100 110 $success = esc_html__( 'Success!', 'bbpress' ); … … 104 114 105 115 /** Posts *****************************************************************/ 106 116 107 // Post types and status 117 // Post types and status. 108 118 $fpt = bbp_get_forum_post_type(); 109 119 $tpt = bbp_get_topic_post_type(); 110 120 $rpt = bbp_get_reply_post_type(); 111 121 112 // Define variables 122 // Define variables. 113 123 $bbp_db = bbp_db(); 114 124 $statement = esc_html__( 'Deleting Posts… %s', 'bbpress' ); 115 125