Esempio n. 1
0
 function __construct()
 {
     global $wpdb;
     $this->db =& $wpdb;
     foreach ($this->tables as $table) {
         $this->{$table} = popover_db_prefix($this->db, $table);
     }
     add_action('init', array(&$this, 'initialise_ajax'), 99);
     add_action('plugins_loaded', array(&$this, 'load_textdomain'));
     $directories = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
     $this->mylocation = $directories[count($directories) - 1];
 }
Esempio n. 2
0
 function __construct()
 {
     global $wpdb;
     $this->db =& $wpdb;
     foreach ($this->tables as $table) {
         $this->{$table} = popover_db_prefix($this->db, $table);
     }
     // Adds the JS to the themes header - this replaces all previous methods of loading
     add_action('init', array(&$this, 'initialise_plugin'));
     add_action('plugins_loaded', array(&$this, 'load_textdomain'));
     $directories = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
     $this->mylocation = $directories[count($directories) - 1];
     $installed = get_option('popover_installed', false);
     if ($installed === false || $installed != $this->build) {
         $this->install();
         update_option('popover_installed', $this->build);
     }
 }
Esempio n. 3
0
 function __construct()
 {
     global $wpdb;
     $this->db =& $wpdb;
     foreach ($this->tables as $table) {
         $this->{$table} = popover_db_prefix($this->db, $table);
     }
     add_action('admin_menu', array(&$this, 'add_menu_pages'));
     add_action('network_admin_menu', array(&$this, 'add_menu_pages'));
     add_action('plugins_loaded', array(&$this, 'load_textdomain'));
     // Add header files
     add_action('load-toplevel_page_popover', array(&$this, 'add_admin_header_popover_menu'));
     add_action('load-pop-overs_page_popoveraddons', array(&$this, 'add_admin_header_popover_addons'));
     add_action('load-pop-overs_page_popoversettings', array(&$this, 'add_admin_header_popover_settings'));
     // Ajax calls
     add_action('wp_ajax_popover_update_order', array(&$this, 'ajax_update_popover_order'));
     $installed = get_option('popover_installed', false);
     if ($installed === false || $installed != $this->build) {
         $this->install();
         update_option('popover_installed', $this->build);
     }
 }