mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 07:35:39 +01:00
Move no_items logic to WP_Comments_Table. See #14579
git-svn-id: http://svn.automattic.com/wordpress/trunk@16108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
945115e73a
commit
bb99a95284
@ -204,7 +204,6 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU
|
|||||||
<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
||||||
<?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
|
<?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" />
|
<input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" />
|
||||||
<?php if ( $post_id ) : ?>
|
<?php if ( $post_id ) : ?>
|
||||||
<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
|
<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
|
||||||
@ -220,32 +219,12 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU
|
|||||||
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
|
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<br class="clear" />
|
<?php $wp_list_table->display(); ?>
|
||||||
|
|
||||||
<?php if ( $wp_list_table->has_items() ) { ?>
|
|
||||||
|
|
||||||
<?php $wp_list_table->display_table(); ?>
|
|
||||||
|
|
||||||
<br class="clear" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
|
|
||||||
<?php } elseif ( 'moderated' == $comment_status ) { ?>
|
|
||||||
<p><?php _e('No comments awaiting moderation… yet.') ?></p>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
|
||||||
<p><?php _e('No comments found.') ?></p>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_comment_reply('-1', true, 'detail');
|
wp_comment_reply('-1', true, 'detail');
|
||||||
wp_comment_trashnotice();
|
wp_comment_trashnotice();
|
||||||
|
@ -113,6 +113,15 @@ class WP_Comments_Table extends WP_List_Table {
|
|||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function no_items() {
|
||||||
|
global $comment_status;
|
||||||
|
|
||||||
|
if ( 'moderated' == $comment_status )
|
||||||
|
_e( 'No comments awaiting moderation… yet.' );
|
||||||
|
else
|
||||||
|
_e( 'No comments found.' );
|
||||||
|
}
|
||||||
|
|
||||||
function get_views() {
|
function get_views() {
|
||||||
global $post_id, $comment_status;
|
global $post_id, $comment_status;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user