public function dismiss() {
		// Validate nonce.
		if ( isset( $_POST['set_key_auth'] ) && check_ajax_referer( 'boldgrid_set_key', 'set_key_auth', false ) ) {
			$id = sanitize_key( $_POST['notice'] );

			// Mark the notice as dismissed, if not already done so.
			$dismissal = array(
				'id' => $id,
				'timestamp' => time(),
			);

			if ( ! Notice::isDismissed( $id ) ) {
				add_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices', $dismissal );
			}
		}
	}
public function dismiss() {
		// Validate nonce.
		if ( isset( $_POST['set_key_auth'] ) && check_ajax_referer( 'boldgrid_set_key', 'set_key_auth', false ) ) {
			$id = sanitize_key( $_POST['notice'] );

			// Mark the notice as dismissed, if not already done so.
			$dismissal = array(
				'id' => $id,
				'timestamp' => time(),
			);

			if ( ! Notice::isDismissed( $id ) ) {
				add_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices', $dismissal );
			}
		}
	}
public function dismiss ( ) { // Validate nonce. if ( isset ( $ _POST [ 'set_key_auth' ] ) && check_ajax_referer ( 'boldgrid_set_key' , 'set_key_auth' , false ) ) { $ id = sanitize_key ( $ _POST [ 'notice' ] ) ; // Mark the notice as dismissed, if not already done so. $ dismissal = array ( 'id' => $ id , 'timestamp' => time ( ) , ) ; if ( ! Notice :: isDismissed ( $ id ) ) { add_user_meta ( get_current_user_id ( ) , 'boldgrid_dismissed_admin_notices' , $ dismissal ) ; } } }
Handle dismissal of the key prompt notice.

@since 2.1.0

@see \Boldgrid\Library\Library\Notice::isDismissed()

@uses $_POST['notice'] Notice id.

@hook: wp_ajax_dismissBoldgridNotice
Handle dismissal of the key prompt notice .