get_cap(), code_snippets()->get_menu_slug(), array( $this, 'render' ), 'div', // icon is added through CSS is_network_admin() ? 21 : 67 ); /* Register the sub-menu */ parent::register(); } /** * 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(); } /** * Print the status and error messages */ protected function print_messages() { /* Output a warning if safe mode is active */ if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE ) { echo '
';
_e( 'Warning: Safe mode is active and snippets will not execute! Remove the CODE_SNIPPETS_SAFE_MODE constant from wp-config.php to turn off safe mode. Help', 'code-snippets' );
echo '