<?php //Create an instance of our package class... $testListTable = new PF_Flags_Table(); //Fetch, prepare, sort, and filter our data... $testListTable->prepare_items(); ?> <h2><?php echo __('My Flags', 'post-flagger') . ' ' . pf_add_new_button(); ?> </h2> <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions --> <form id="flags-filter" method="get"> <!-- For plugins, we also need to ensure that the form posts back to our current page --> <input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?> " /> <!-- Show my WP_List_Table --> <?php $testListTable->display(); ?> </form>
<h2><?php echo __('Edit Flag', 'post-flagger') . ' ' . pf_add_new_button(); ?> </h2> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-2"> <div id="post-body-content"> <form action="admin-post.php" method="post" name="edit-form"> <input type="hidden" name="action" value="pf_update_flag"/> <input type="hidden" name="id" value="<?php echo $id; ?> "/> <div class="pf-form-field primary"> <input type="text" name="name" id="name" placeholder="<?php echo __('Add a flag name', 'post-flagger'); ?> " value="<?php echo $name; ?> "/> </div> <div class="pf-form-field"> <label for="slug">Slug</label> <input type="text" name="slug" id="slug" placeholder="<?php echo __('e.g. view', 'post-flagger'); ?> " value="<?php