Ejemplo n.º 1
0
 /**
  * Executed when the admin page is loaded
  */
 function load()
 {
     parent::load();
     /* Load the contextual help tabs */
     $contextual_help = new Code_Snippets_Contextual_Help('manage');
     $contextual_help->load();
     /* Initialize the list table class */
     $this->list_table = new Code_Snippets_List_Table();
     $this->list_table->prepare_items();
 }
Ejemplo n.º 2
0
 /**
  * Executed when the admin page is loaded
  */
 function load()
 {
     parent::load();
     /* Load the contextual help tabs */
     code_snippets_load_manage_help();
     /* Initialize the list table class */
     require_once plugin_dir_path(CODE_SNIPPETS_FILE) . 'php/class-list-table.php';
     $this->list_table = new Code_Snippets_List_Table();
     $this->list_table->prepare_items();
 }
Ejemplo n.º 3
0
/**
 * Initializes the list table class and loads the help tabs
 * for the Manage Snippets page
 *
 * @since 1.0
 * @access private
 */
function code_snippets_load_manage_menu()
{
    /* Make sure the user has permission to be here */
    if (!current_user_can(get_snippets_cap())) {
        wp_die(__('You are not authorized to access this page.', 'code-snippets'));
    }
    /* Create the snippet tables if they don't exist */
    create_code_snippets_tables();
    /* Load the screen help tabs */
    require plugin_dir_path(__FILE__) . 'admin-help.php';
    /* Initialize the snippet table class */
    require_once plugin_dir_path(__FILE__) . 'class-list-table.php';
    global $code_snippets_list_table;
    $code_snippets_list_table = new Code_Snippets_List_Table();
    $code_snippets_list_table->prepare_items();
}