Пример #1
0
    /**
     * Displays the UI view.
     *
     * @since 2.0.0
     */
    public function display()
    {
        // Prepare the list table.
        $optins_table = Optin_Monster_UI_Optins_Table::get_instance();
        $optins_table->prepare_items();
        // Output the list table.
        ?>
        <form id="optin-monster-optins-table" method="get" action="<?php 
        echo add_query_arg('page', 'optin-monster-settings', admin_url('admin.php'));
        ?>
">
            <input type="hidden" name="post_type" value="optin" />
            <input type="hidden" name="page" value="optin-monster-settings" />
            <?php 
        $optins_table->display();
        ?>
        </form>
        <?php 
    }
Пример #2
0
 /**
  * Returns the singleton instance of the class.
  *
  * @since 2.0.0
  *
  * @return object The Optin_Monster_UI_Optins_Table object.
  */
 public static function get_instance()
 {
     if (!isset(self::$instance) && !self::$instance instanceof Optin_Monster_UI_Optins_Table) {
         self::$instance = new Optin_Monster_UI_Optins_Table();
     }
     return self::$instance;
 }