| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* HTML code for the Manage Snippets page |
| 5 |
* |
| 6 |
* @package Code_Snippets |
| 7 |
* @subpackage Views |
| 8 |
* |
| 9 |
* @var Code_Snippets_Manage_Menu $this |
| 10 |
*/ |
| 11 |
|
| 12 |
/* Bail if accessed directly */ |
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
return; |
| 15 |
} |
| 16 |
|
| 17 |
?> |
| 18 |
|
| 19 |
<div class="wrap"> |
| 20 |
<h1><?php |
| 21 |
esc_html_e( 'Snippets', 'code-snippets' ); |
| 22 |
|
| 23 |
printf( '<a href="%2$s" class="page-title-action add-new-h2">%1$s</a>', |
| 24 |
esc_html_x( 'Add New', 'snippet', 'code-snippets' ), |
| 25 |
code_snippets()->get_menu_url( 'add' ) |
| 26 |
); |
| 27 |
|
| 28 |
printf( '<a href="%2$s" class="page-title-action">%1$s</a>', |
| 29 |
esc_html_x( 'Import', 'snippets', 'code-snippets' ), |
| 30 |
code_snippets()->get_menu_url( 'import' ) |
| 31 |
); |
| 32 |
|
| 33 |
$admin = code_snippets()->admin; |
| 34 |
|
| 35 |
if ( $admin->is_compact_menu() && isset( $admin->menus['settings'] ) ) { |
| 36 |
printf( '<a href="%2$s" class="page-title-action">%1$s</a>', |
| 37 |
esc_html_x( 'Settings', 'snippets', 'code-snippets' ), |
| 38 |
code_snippets()->get_menu_url( 'settings' ) |
| 39 |
); |
| 40 |
} |
| 41 |
|
| 42 |
$this->list_table->search_notice(); |
| 43 |
?></h1> |
| 44 |
|
| 45 |
<?php |
| 46 |
do_action( 'code_snippets/admin/manage/before_list_table' ); |
| 47 |
$this->list_table->views(); |
| 48 |
?> |
| 49 |
|
| 50 |
<form method="get" action=""> |
| 51 |
<?php |
| 52 |
$this->list_table->required_form_fields( 'search_box' ); |
| 53 |
$this->list_table->search_box( __( 'Search Installed Snippets', 'code-snippets' ), 'search_id' ); |
| 54 |
?> |
| 55 |
</form> |
| 56 |
<form method="post" action=""> |
| 57 |
<input type="hidden" id="code_snippets_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'code_snippets_manage_ajax' ) ); ?>"> |
| 58 |
|
| 59 |
<?php |
| 60 |
$this->list_table->required_form_fields(); |
| 61 |
$this->list_table->display(); |
| 62 |
?> |
| 63 |
</form> |
| 64 |
|
| 65 |
<?php do_action( 'code_snippets/admin/manage' ); ?> |
| 66 |
</div> |
| 67 |
|