LLMS_Admin_Notices::hide_notices()
Called when “Dismiss X” or “Remind Me” is clicked on a notice
Description Description
Validates request and deletes the notice.
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.notices.php
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | * * @since 3.0.0 * @since 3.35.0 Unslash input data. * @since 5.2.0 Remove notice and notice query string vars and redirect after clearing. * * @ return void */ public static function hide_notices() { if ( ( isset( $_GET [ 'llms-hide-notice' ] ) || isset( $_GET [ 'llms-remind-notice' ] ) ) && isset( $_GET [ '_llms_notice_nonce' ] ) ) { if ( ! llms_verify_nonce( '_llms_notice_nonce' , 'llms_hide_notices_nonce' , 'GET' ) ) { 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( wp_unslash( $_GET [ 'llms-hide-notice' ] ) ); $action = 'hide' ; } elseif ( isset( $_GET [ 'llms-remind-notice' ] ) ) { |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Remove notice and notice query string vars and redirect after clearing. |
3.35.0 | Unslash input data. |
3.0.0 | Introduced. |