LLMS_Admin_Notices::hide_notices()
Called when “Dismiss X” or “Remind Me” is clicked on a notice Validates request and deletes the notice
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.notices.php
public static function hide_notices() { if ( ( isset( $_GET['llms-hide-notice'] ) || isset( $_GET['llms-remind-notice'] ) ) && isset( $_GET['_llms_notice_nonce'] ) ) { if ( ! wp_verify_nonce( $_GET['_llms_notice_nonce'], 'llms_hide_notices_nonce' ) ) { wp_die( __( 'Action failed. Please refresh the page and retry.', 'lifterlms' ) ); } if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Cheatin’ huh?', 'lifterlms' ) ); } if ( isset( $_GET['llms-hide-notice'] ) ) { $notice = sanitize_text_field( $_GET['llms-hide-notice'] ); $action = 'hide'; } elseif ( isset( $_GET['llms-remind-notice'] ) ) { $notice = sanitize_text_field( $_GET['llms-remind-notice'] ); $action = 'remind'; } self::delete_notice( $notice, $action ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |