$html .= '</p>';
     $html .= '<p>';
     $html .= __("To begin a product should be selected. Next the customer should be chosen. This can either be an existing customer, or a new customer. When creating a new customer, the user will automatically receive the WordPress new user email with a link to set her password.", Plugin::SLUG);
     $html .= '</p>';
     $html .= '<p>';
     $html .= __("The activation limit and expiration date can both be set as well. If left blank, the key will have an unlimited number of activations and a lifetime expiration date.", Plugin::SLUG);
     $html .= '</p>';
     $html .= '<p>';
     $html .= __("If necessary, the license key can be manually set by clicking the <em>Set the license key manually</em> link. Otherwise, the key will be automatically generated based on the key type specified in Exchange.", Plugin::SLUG);
     $html .= '</p>';
     $html .= '<p>';
     $html .= __("Lastly, the amount the customer paid can be set. This will become the <em>Total</em> in the new transaction. If the customer didn’t pay anything for this license, it is important to set the amount paid to \$0.00. Otherwise the revenue statistics will be inaccurate.", Plugin::SLUG);
     $html .= '</p>';
     return $html;
 }, function () {
     return Dispatch::is_current_view('licenses') && \ITELIC\Admin\Licenses\Dispatch::is_current_view('add-new');
 });
 $help->add(__("Overview", Plugin::SLUG), function () {
     $html = '';
     $html .= '<p>';
     $html .= __("All of the releases for your products appear on this screen. This includes the initial release for your product, as well as all the subsequent releases. You can use the Screen Options tab to customize the display of this screen.", Plugin::SLUG);
     $html .= '</p>';
     $html .= '<p>';
     $html .= __("You can narrow the list by status using the text links at the top of the screen. You can also filter the list to only show releases for a certain product. Only products that have licensing enabled will appear on this list. Additionally, the releases can be qualified by type.", Plugin::SLUG);
     $html .= '</p>';
     $html .= '<p>';
     $html .= __("The search box lets you look for a particular release by searching through the changelogs. You can find a release by version by prefixing your search with <em>v</em>. For example searching with <em>v1.5</em> will find all releases with the version number 1.5", Plugin::SLUG);
     $html .= '</p>';
     return $html;
 }, function () {
     return Dispatch::is_current_view('releases') && \ITELIC\Admin\Releases\Dispatch::is_current_view('list');
 /**
  * Setup the table.
  */
 public function setup_table()
 {
     if (!Dispatch::is_current_view('list')) {
         return;
     }
     try {
         $msg = $this->process_bulk_actions();
         if ($msg) {
             $this->message[View::NOTICE_SUCCESS] = $msg;
         }
     } catch (\Exception $e) {
         $this->message[View::NOTICE_ERROR] = $e->getMessage();
     }
     $query = new Keys($this->generate_get_key_args());
     $keys = $query->get_results();
     $total = $query->get_total_items();
     $products = itelic_get_products_with_licensing_enabled();
     $this->table = new Table($this->prepare_data($keys), $total, $products);
     if (isset($_GET['s'])) {
         $key = itelic_get_key($_GET['s']);
         if ($key) {
             wp_redirect(itelic_get_admin_edit_key_link($key->get_key()));
             die;
         }
     }
 }
<?php

/**
 * Load the roster view.
 *
 * @author    Iron Bound Designs
 * @since     1.0
 * @license   AGPL
 * @copyright Iron Bound Designs, 2015.
 */
namespace ITELIC\Admin\Licenses;

use ITELIC\Admin\Licenses\Controller\Add_New;
use ITELIC\Admin\Licenses\Controller\ListC;
use ITELIC\Admin\Licenses\Controller\Single;
Dispatch::register_view('list', new ListC());
Dispatch::register_view('single', new Single());
Dispatch::register_view('add-new', new Add_New());
 /**
  * Render the view for this controller.
  *
  * @return void
  */
 public function render()
 {
     $licenses_dispatch = new Licenses_Dispatch();
     $licenses_dispatch->dispatch();
 }