You appear to be a bot. Output may be restricted
Description
Handle dismissing the admin notice for the block widget editor optin.
Usage
genesis_handle_dismissing_block_widget_editor_notice();
Parameters
Returns
void
Source
File name: genesis/lib/widgets/widgets.php
Lines:
1 to 26 of 26
function genesis_handle_dismissing_block_widget_editor_notice() { // Only handle dismissing the block widget editor notice if "?genesis_widget_block_editor_dismiss=1" is in the URL. if ( filter_input( INPUT_GET, 'genesis_widget_block_editor_dismiss', FILTER_SANITIZE_STRING ) !== '1' ) { // Exit early. return; } // If no nonce exists in the URL, do nothing. if ( ! isset( $_GET['_wpnonce'] ) ) { return; } // If the nonce fails, do nothing. if ( ! wp_verify_nonce( filter_input( INPUT_GET, '_wpnonce', FILTER_SANITIZE_STRING ), 'genesis-widget-block-editor-dismiss' ) ) { return; } // Make sure the current user has permission to dismiss the notice. if ( ! current_user_can( 'administrator' ) ) { return; } // Set the notice to be dismissed. update_option( 'genesis_notice_dismissed_use_widgets_block_editor', true ); }