示例#1
0
 function __construct()
 {
     parent::__construct();
     wp_enqueue_style('bp-moderation', $this->plugin_url . '/css/bp-moderation.css', false, $this->plugin_ver, 'screen');
     wp_enqueue_script('bp-moderation', $this->plugin_url . '/js/bp-moderation.js', array('jquery'), $this->plugin_ver, !'in footer');
     add_action('bp_activity_entry_meta', array(&$this, 'activity_loop_link'), 20);
     $this->already_flagged = $this->already_flagged_by_current_user();
 }
示例#2
0
 /**
  * bpModBackend constructor
  *
  * hooks in wordpress backend
  */
 function __construct()
 {
     parent::__construct();
     add_action(is_multisite() ? 'network_admin_menu' : 'admin_menu', array(&$this, 'add_admin_menu'));
     add_action('rightnow_end', array(&$this, 'rightnow_widget_section'));
     add_action('admin_init', array(&$this, 'register_settings'));
     if (isset($this->options['generate_test_data'])) {
         unset($this->options['generate_test_data']);
         update_site_option('bp_moderation_options', $this->options);
         add_action('admin_init', array(bpModLoader, 'test_data'));
     }
 }
示例#3
0
 /**
  * bpModBackend constructor
  *
  * hooks in wordpress backend
  */
 function __construct()
 {
     if (version_compare(get_site_option('bp_moderation_db_version'), $this->db_ver, '<')) {
         bpModLoader::load_class('bpModInstaller');
         $installer = new bpModInstaller();
         $installer->install();
     }
     parent::__construct();
     add_action(is_multisite() ? 'network_admin_menu' : 'admin_menu', array(&$this, 'add_admin_menu'));
     add_action('admin_head', array(&$this, 'print_page_icon_style'));
     add_action('rightnow_end', array(&$this, 'rightnow_widget_section'));
     add_action('admin_init', array(&$this, 'register_settings'));
     if (isset($this->options['generate_test_data'])) {
         unset($this->options['generate_test_data']);
         update_site_option('bp_moderation_options', $this->options);
         add_action('admin_init', array(bpModLoader, 'test_data'));
     }
 }
 function __construct()
 {
     parent::__construct();
     add_action('admin_init', array(&$this, 'route_action'));
 }