/**
  * Private constructor (singleton)
  *
  * @since  4.6.0
  */
 protected function __construct()
 {
     parent::__construct();
     // Add admin menus.
     add_action('admin_menu', array('IncPopup', 'admin_menus'));
     add_action('network_admin_menu', array('IncPopup', 'admin_menus'));
     // Initialize hooks that are used only in the current module.
     add_action('current_screen', array('IncPopup', 'setup_module_specific'));
     // Handles all admin ajax requests.
     add_action('wp_ajax_po-ajax', array('IncPopup', 'handle_ajax'));
     // Every time a popup is changed we validate "order" value of all popups.
     add_action('save_post_' . IncPopupItem::POST_TYPE, array('IncPopup', 'post_check_order'), 99, 3);
     // -- SETTINGS --------------------------
     // Save changes from settings page.
     add_action('load-inc_popup_page_settings', array('IncPopup', 'handle_settings_update'));
 }
 /**
  * Private constructor (singleton)
  *
  * @since  4.6
  */
 protected function __construct()
 {
     parent::__construct();
     // Init loading-process of the PopUp.
     add_action('wp', array($this, 'init_public'));
     /**
      * Experimental hook to dynamically create popups on your site.
      * Call the action hook `wdev-popup` with param 1 being the content and
      * param 2 is an optional array of popup options.
      *
      * Note that currently this plays nice with existing popups if FOOTER
      * loading method is used, but all other loading methods will interfere
      * with this hook and only show either the dynamic or predefined popups.
      *
      * @since  4.7.1
      * @param  string $content The popup contents (HTML code allowed).
      * @param  array $options Optional. List of popup configuration options.
      */
     add_action('wdev-popup', array($this, 'show_popup'), 10, 2);
 }
Example #3
0
 /**
  * Private constructor (singleton)
  *
  * @since  4.6
  */
 protected function __construct()
 {
     parent::__construct();
     // Init loading-process of the PopUp.
     add_action('wp', array($this, 'init_public'));
 }