is_toolbox_enabled()) { add_action('wp_footer', [$this, 'output']); add_action('admin_footer', [$this, 'output']); add_action('wp_enqueue_scripts', [$this, 'enqueue_styles']); } } /** * Adds the admin styles to make sure the tooltip renders. * * @since 2.0.0 * @return void */ public function enqueue_styles(): void { wp_enqueue_style('wu-admin'); } /** * Outputs the actual HTML markup of the Toolbox. * * @since 2.0.0 * @return void */ public function output(): void { $current_site = wu_get_current_site(); wu_get_template( 'ui/toolbox', [ 'toolbox' => $this, 'current_site' => $current_site, 'customer' => $current_site ? $current_site->get_customer() : false, 'membership' => $current_site ? $current_site->get_membership() : false, ] ); } }