Changeset 7062 for trunk/wp-admin/upload.php
- Timestamp:
- 02/27/2008 08:31:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r7057 r7062 38 38 require_once('admin-header.php'); 39 39 40 add_filter( 'post_limits', $limit_filter = create_function( '$a', 'if ( empty($_GET["paged"]) ) $_GET["paged"] = 1; $start = ( intval($_GET["paged"]) - 1 ) * 15; return "LIMIT $start, 20";' ) ); 40 if ( isset($_GET['paged']) && $start = ( intval($_GET['paged']) - 1 ) * 15 ) 41 add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 15';" ) ); 41 42 list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); 42 43 $wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra ) … … 82 83 <ul class="subsubsub"> 83 84 <?php 84 $ status_links = array();85 $type_links = array(); 85 86 $_num_posts = (array) wp_count_attachments(); 86 87 $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); … … 97 98 $class = ' class="current"'; 98 99 99 $ status_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" .100 $type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" . 100 101 sprintf($label[2], $num_posts[$mime_type]) . '</a>'; 101 102 } 102 103 $class = empty($_GET['post_mime_type']) ? ' class="current"' : ''; 103 $ status_links[] = "<li><a href=\"upload.php\"$class>".__('All Types')."</a>";104 echo implode(' | </li>', $status_links) . '</li>';105 unset($ status_links);104 $type_links[] = "<li><a href=\"upload.php\"$class>".__('All Types')."</a>"; 105 echo implode(' | </li>', $type_links) . '</li>'; 106 unset($type_links); 106 107 ?> 107 108 </ul>
Note: See TracChangeset
for help on using the changeset viewer.