allowed() && $can_see_toolbox && !is_network_admin()); } // end is_toolbox_enabled; /** * Loads the necessary elements to display the Toolbox. * * @since 2.0.0 * @return void */ public function load_toolbox() { if ($this->is_toolbox_enabled()) { add_action('wp_footer', array($this, 'output')); add_action('admin_footer', array($this, 'output')); add_action('wp_enqueue_scripts', array($this, 'enqueue_styles')); } // end if; } // end load_toolbox; /** * Adds the admin styles to make sure the tooltip renders. * * @since 2.0.0 * @return void */ public function enqueue_styles() { wp_enqueue_style('wu-admin'); } // end enqueue_styles; /** * Outputs the actual HTML markup of the Toolbox. * * @since 2.0.0 * @return void */ public function output() { $current_site = wu_get_current_site(); wu_get_template('ui/toolbox', array( 'toolbox' => $this, 'current_site' => $current_site, 'customer' => $current_site ? $current_site->get_customer() : false, 'membership' => $current_site ? $current_site->get_membership() : false, )); } // end output; } // end class Toolbox;