/** * Generate navigation tabs HTML, based on a specific admin menu. * @access public * @since 1.0.0 * @return string/WP_Error */ public static function get_navigation_tabs($menu_key = 'ignition') { $html = ''; $screens = Ignition_Updater_Screen::get_available_screens(); $current_tab = self::get_current_screen(); if (0 < count($screens)) { foreach ($screens as $k => $v) { $class = 'nav-tab'; if ($current_tab == $k) { $class .= ' nav-tab-active'; } $url = add_query_arg('page', 'ignition-helper', network_admin_url('index.php')); $url = add_query_arg('screen', $k, $url); $html .= '<a href="' . esc_url($url) . '" class="' . esc_attr($class) . '">' . esc_html($v) . '</a>'; } } return $html; }
/** * Load the main management screen. * * @access public * @since 1.0.0 * @return void */ public function settings_screen() { ?> <div id="welcome-panel" class="wrap about-wrap ignition-updater-wrap"> <h1><?php _e('IgniteWoo Key Manager', 'ignition-updater'); ?> </h1> <div class="about-text ignition-helper-about-text"> <?php _e('This is where you can activate your license keys.', 'ignition-updater'); ?> </div> <div class="short-description ignition-helper-short-description"> <?php //echo wpautop( sprintf( __( 'To make sure your licenses stay active %1$sadd a saved card%2$s and %3$senable auto-renew%2$s on the licenses you’re continuing to enjoy.', 'ignition-updater' ), '<a href="' . esc_url( $this->my_account_url ) . '">', '</a>', '<a href="' . esc_url( $this->my_subscriptions_url ) . '">' ) ); ?> <?php echo wpautop(sprintf(__('To make sure your licenses stay active be sure to renew before expiration, otherwise you lose access to updates and support.', 'ignition-updater'), '<a href="' . esc_url($this->my_account_url) . '">', '</a>', '<a href="' . esc_url($this->my_subscriptions_url) . '">')); ?> </div><!--/.short-description--> </div><!--/#welcome-panel .welcome-panel--> <?php Ignition_Updater_Screen::get_header(); $screen = Ignition_Updater_Screen::get_current_screen(); switch ($screen) { // Help screen. case 'help': do_action('ignition_updater_help_screen_before'); $this->load_help_screen_boxes(); require_once $this->screens_path . 'screen-help.php'; do_action('ignition_updater_help_screen_after'); break; // Licenses screen. // Licenses screen. case 'license': default: if ($this->api->ping()) { $this->installed_products = $this->get_detected_products(); $this->pending_products = $this->get_pending_products(); do_action('ignition_updater_license_screen_before'); require_once $this->screens_path . 'screen-manage.php'; do_action('ignition_updater_license_screen_after'); } else { do_action('ignition_updater_api_unreachable_screen_before'); require_once $this->screens_path . 'ignition-api-unreachable.php'; do_action('ignition_updater_api_unreachable_screen_after'); } break; } Ignition_Updater_Screen::get_footer(); }