/** * @static * @return \BackWPup_Adminbar */ public static function get_instance() { if (NULL === self::$instance) { self::$instance = new self(); } return self::$instance; }
/** * @static * @return \BackWPup_Adminbar */ public static function get_instance() { if (NULL === self::$instance && !is_admin_bar_showing() || !current_user_can('backwpup') || !get_site_option('backwpup_cfg_showadminbar')) { return NULL; } if (NULL === self::$instance) { self::$instance = new self(); } return self::$instance; }
/** * Plugin init function * * @return void */ public function plugin_init() { //Add Admin Bar if (!defined('DOING_CRON') && current_user_can('backwpup') && current_user_can('backwpup') && is_admin_bar_showing() && get_site_option('backwpup_cfg_showadminbar')) { BackWPup_Adminbar::get_instance(); } }