/** * Construct function * Protected to make sure it isn't declared elsewhere * * @since 1.4 * @access protected */ protected function __construct() { self::$_instance = $this; parent::__construct(); // Load data $this->set_optionData(get_option($this->get_optionKey())); /** * Checks if the management part of module should be enabled * * @since 1.4 Validate option data * @since 1.6 Also calls init() */ if (true == $this->get_optionData('enable')) { $this->enable = true; $this->init(); } /** * Only allow settings for admin users or users with the correct apabilities * * @since 1.5.2 Validate custom capability view_admin_as_role_defaults * @since 1.5.2.1 Validate is_super_admin (bug in 1.5.2) * @since 1.5.3 Disable for network pages */ if ($this->is_vaa_enabled() && !is_network_admin() && (is_super_admin($this->get_curUser()->ID) || current_user_can('view_admin_as_role_defaults'))) { add_action('vaa_view_admin_as_init', array($this, 'vaa_init')); } }
/** * Construct function * * @since 1.6 * @access protected */ protected function __construct() { self::$_instance = $this; parent::__construct(); if ($this->store->get_userSettings('view_mode') == 'browse') { add_filter('user_row_actions', array($this, 'filter_user_row_actions'), 10, 2); } //add_action( 'wp_meta', array( $this, 'action_wp_meta' ) ); }
/** * VAA_View_Admin_As_View constructor. * * @since 1.6 */ protected function __construct() { self::$_instance = $this; parent::__construct(); // When a user logs in or out, reset the view to default add_action('wp_login', array($this, 'cleanup_views'), 10, 2); add_action('wp_login', array($this, 'reset_view'), 10, 2); add_action('wp_logout', array($this, 'reset_view')); }
/** * Construct function * Protected to make sure it isn't declared elsewhere * * @since 1.5 * @access protected */ protected function __construct() { self::$_instance = $this; parent::__construct(); if ($this->is_vaa_enabled()) { add_action('vaa_view_admin_as_init', array($this, 'vaa_init')); } // Load data $this->set_optionData(get_option($this->get_optionKey())); }
/** * Populate the instance * @since 1.6 */ protected function __construct() { self::$_instance = $this; parent::__construct(); }