Example #1
0
 /**
  * Adds all required hooks
  */
 public function __construct()
 {
     parent::__construct();
     add_action('wpp_settings_help_tab', array($this, 'help_tab'), 10, 4);
     add_action('wp_ajax_wpp_export_properties', array($this, 'wpp_export_properties'));
     add_action('wp_ajax_nopriv_wpp_export_properties', array($this, 'wpp_export_properties'));
     /** May be export properties to CSV file */
     add_action("template_redirect", array($this, 'maybe_export_properties_to_scv'));
 }
Example #2
0
 /**
  * Adds all required hooks
  */
 public function __construct()
 {
     parent::__construct();
     /**
      * Init 'All Properties' page.
      */
     new Admin_Overview();
     //** Load admin header scripts */
     add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
     /** Admin interface init */
     add_action("admin_init", array($this, "admin_init"));
     // @todo Move back to Settings -> Properties as it was years ago.
     add_action("admin_menu", array($this, 'admin_menu'), 150);
 }
Example #3
0
 /**
  * Init AJAX actions
  *
  * @author peshkov@UD
  */
 public function __construct()
 {
     parent::__construct();
     /**
      * Maybe extend the list by external modules.
      */
     $this->actions = apply_filters('wpp::ajax_actions', $this->actions);
     $this->nopriv = apply_filters('wpp::ajax_nopriv', $this->nopriv);
     foreach ($this->actions as $action) {
         add_action('wp_ajax_' . $action, array($this, 'request'));
     }
     foreach ($this->nopriv as $action) {
         add_action('wp_ajax_nopriv_' . $action, array($this, 'request'));
     }
 }