Created
January 24, 2021 03:59
-
-
Save gvgvgvijayan/d8b704b97069e7d86a70f17014e5994c to your computer and use it in GitHub Desktop.
This gist is used in the tutorial https://www.vijayan.in/how-to-create-custom-table-list-in-wordpress-admin-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
/** | |
* This function is responsible for render the drafts table | |
*/ | |
function bootload_drafts_table() : void { | |
$drafts_table = new Drafts_List_Table(); | |
?> | |
<div class="wrap"> | |
<h2><?php esc_html_e( 'All Drafts List', 'admin-table-tut' ); ?></h2> | |
<form id="all-drafts" method="get"> | |
<input type="hidden" name="page" value="all-drafts" /> | |
<?php | |
$drafts_table->prepare_items(); | |
$drafts_table->search_box( 'Search', 'search' ); | |
$drafts_table->display(); | |
?> | |
</form> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment