WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/13/2010 08:49:27 AM (12 years ago)
Author:
nacin
Message:

Consistently hide bulk actions, filters, and subpage links on admin panels when there are no items to show. Fixes #12086

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/link-manager.php

    r12895 r13100  
    100100<div class="tablenav">
    101101
     102<?php
     103if ( 'all' == $cat_id )
     104    $cat_id = '';
     105$args = array( 'category' => $cat_id, 'hide_invisible' => 0, 'orderby' => $sqlorderby, 'hide_empty' => 0 );
     106if ( ! empty( $_GET['s'] ) )
     107    $args['search'] = $_GET['s'];
     108$links = get_bookmarks( $args );
     109if ( $links ) {
     110?>
     111
    102112<div class="alignleft actions">
    103113<select name="action">
     
    136146
    137147<?php
    138 if ( 'all' == $cat_id )
    139     $cat_id = '';
    140 $args = array('category' => $cat_id, 'hide_invisible' => 0, 'orderby' => $sqlorderby, 'hide_empty' => 0);
    141 if ( !empty($_GET['s']) )
    142     $args['search'] = $_GET['s'];
    143 $links = get_bookmarks( $args );
    144 if ( $links ) {
    145148    $link_columns = get_column_headers('link-manager');
    146149    $hidden = get_hidden_columns('link-manager');
     
    252255</table>
    253256
    254 <?php } else { ?>
    255 <p><?php _e('No links found.') ?></p>
    256 <?php } ?>
    257 
    258257<div class="tablenav">
    259258
     
    266265</div>
    267266
     267<?php } else { ?>
     268<p><?php _e( 'No links found.' ) ?></p>
     269<?php } ?>
     270
    268271<br class="clear" />
    269272</div>
Note: See TracChangeset for help on using the changeset viewer.