BBP_Admin::hide_notices()

Handle hiding of general admin area notices.


Description Description


Source Source

File: includes/admin/classes/class-bbp-admin.php

	public function hide_notices() {

		// Hiding a notice?
		$hiding_notice = ! empty( $_GET['bbp-hide-notice'] )
			? sanitize_key( $_GET['bbp-hide-notice'] )
			: false;

		// Bail if not hiding a notice
		if ( empty( $hiding_notice ) ) {
			return;
		}

		// Bail if user cannot visit upgrade page (cannot clear notice either!)
		if ( ! current_user_can( 'bbp_tools_upgrade_page' ) ) {
			return;
		}

		// Check the admin referer
		check_admin_referer( 'bbp-hide-notice' );

		// Maybe delete notices
		switch ( $hiding_notice ) {

			// Skipped upgrade notice
			case 'bbp-skip-upgrades' :
				bbp_clear_pending_upgrades();
				break;
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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