PUM_Admin_Settings::notices()
Displays any saved admin notices.
Contents
Description Description
Source Source
File: classes/Admin/Settings.php
public static function notices() { if ( isset( $_GET['success'] ) && get_option( 'pum_settings_admin_notice' ) ) { self::$notices[] = array( 'type' => $_GET['success'] ? 'success' : 'error', 'message' => get_option( 'pum_settings_admin_notice' ), ); delete_option( 'pum_settings_admin_notice' ); } if ( ! empty( self::$notices ) ) { foreach ( self::$notices as $notice ) { ?> <div class="notice notice-<?php echo esc_attr( $notice['type'] ); ?> is-dismissible"> <p><strong><?php esc_html_e( $notice['message'] ); ?></strong></p> <button type="button" class="notice-dismiss"> <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'popup-maker' ); ?></span> </button> </div> <?php } } }
Expand full source code Collapse full source code View on Trac