bbp_admin_reset_handler()

Handle a bbPress admin area reset request.


Description Description


Source Source

File: includes/admin/tools/reset.php

function bbp_admin_reset_handler() {

	// Bail if not resetting.
	if ( ! bbp_is_post_request() || empty( $_POST['bbpress-are-you-sure'] ) ) {
		return;
	}

	// Only keymasters can proceed.
	if ( ! bbp_is_user_keymaster() ) {
		return;
	}

	// Bail if not referred from resetter
	check_admin_referer( 'bbpress-reset' );

	// Reset all of bbPress
	bbp_admin_reset_database();
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.