LLMS_Admin_Review::dismiss()

AJAX callback for dismissing the notice


Description Description


Return Return

(void)


Top ↑

Source Source

File: includes/admin/class-llms-admin-review.php

	public function dismiss() {

		if ( ! current_user_can( 'manage_lifterlms' ) || ! llms_verify_nonce( 'nonce', 'llms-admin-review-request-dismiss' ) ) {
			wp_die();
		}

		$success = llms_parse_bool( llms_filter_input( INPUT_POST, 'success', FILTER_SANITIZE_STRING ) );

		update_option(
			'llms_review',
			array(
				'time'      => time(),
				'dismissed' => true,
				'success'   => $success ? 'yes' : 'no',
			)
		);

		wp_die();

	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.14.0 Only users with manager_lifterlms caps can dismiss and added nonce verification. Use llms_filter_input() in favor of filter_input().
3.24.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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