function __construct($post_type)
 {
     parent::__construct(array('singular' => 'post', 'plural' => 'posts', 'ajax' => false));
     self::$storage_post_type = $post_type;
 }
예제 #2
0
    function admin_entry_index()
    {
        $list_table = new cf7_storage_list_table(self::$post_type);
        $list_table->prepare_items();
        ?>
		<div class="wrap">
			<h2>
			<?php 
        esc_html_e('Contact Form Entries', 'cf7-storage');
        if (!empty($_REQUEST['s'])) {
            printf('<span class="subtitle">%s</span>', esc_html(sprintf(__('Search results for "%s"', 'cf7-storage'), $_REQUEST['s'])));
        }
        ?>
			</h2>

			<?php 
        do_action('cf7_storage_admin_notices');
        ?>

			<?php 
        $list_table->views();
        ?>

			<form method="get" action="">
				<input type="hidden" name="page" value="<?php 
        echo esc_attr($_REQUEST['page']);
        ?>
" />
				<?php 
        $list_table->search_box(__('Search Entries', 'cf7-storage'), self::$post_type);
        $list_table->display();
        ?>
			</form>

		</div>
		<?php 
    }