WordPress.org

Make WordPress Core

Changeset 16108


Ignore:
Timestamp:
10/31/2010 01:17:00 AM (8 years ago)
Author:
scribu
Message:

Move no_items logic to WP_Comments_Table. See #14579

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r16061 r16108  
    205205    <?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
    206206</p>
    207 
    208207<input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" />
    209208<?php if ( $post_id ) : ?>
     
    221220<?php } ?>
    222221
    223 <br class="clear" />
    224 
    225 <?php if ( $wp_list_table->has_items() ) { ?>
    226 
    227 <?php $wp_list_table->display_table(); ?>
    228 
    229 <br class="clear" />
    230 </div>
    231 
    232 </form>
    233 
    234 <div id="ajax-response"></div>
    235 
    236 <?php } elseif ( 'moderated' == $comment_status ) { ?>
    237 <p><?php _e('No comments awaiting moderation&hellip; yet.') ?></p>
     222<?php $wp_list_table->display(); ?>
    238223</div>
    239224</form>
    240225
    241 <?php } else { ?>
    242 <p><?php _e('No comments found.') ?></p>
    243 </div>
    244 </form>
    245 
    246 <?php } ?>
    247 </div>
     226<div id="ajax-response"></div>
    248227
    249228<?php
  • trunk/wp-admin/includes/list-table-comments.php

    r16073 r16108  
    112112            'per_page' => $comments_per_page,
    113113        ) );
     114    }
     115
     116    function no_items() {
     117        global $comment_status;
     118
     119        if ( 'moderated' == $comment_status )
     120            _e( 'No comments awaiting moderation&hellip; yet.' );
     121        else
     122            _e( 'No comments found.' );
    114123    }
    115124
Note: See TracChangeset for help on using the changeset viewer.