/** * Initialize the plugin by setting localization, filters, and administration functions. * * @since 1.0 */ public function __construct($prefix, $height = 200) { $this->prefix = $prefix; $this->height = $height; $this->notices = get_option($this->prefix . '_side_notices', array()); // Load the administrative Stylesheets and JavaScript add_action('admin_enqueue_scripts', WP_Side_Notice::add_stylesheets_and_javascript()); // Process responses to the notices add_action('admin_init', WP_Side_Notice::process_response()); }
/** * Renders the intro to the settings section. * * @since 1.0 */ public function display_section() { // get the aiwp side notices setting height of 500px $notices = new WP_Side_Notice('aiwp', 150); // display the notices $notices->display(); }