raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * Media Library administration panel.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 /** WordPress Administration Bootstrap */
mp-wp_genesis 10 require_once('admin.php');
mp-wp_genesis 11
mp-wp_genesis 12 if (!current_user_can('upload_files'))
mp-wp_genesis 13 wp_die(__('You do not have permission to upload files.'));
mp-wp_genesis 14
mp-wp_genesis 15 if ( isset($_GET['find_detached'] ) ) {
mp-wp_genesis 16 check_admin_referer('bulk-media');
mp-wp_genesis 17
mp-wp_genesis 18 if ( ! current_user_can('edit_posts') )
mp-wp_genesis 19 wp_die( __('You are not allowed to scan for lost attachments.') );
mp-wp_genesis 20
mp-wp_genesis 21 $all_posts = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'post' OR post_type = 'page'");
mp-wp_genesis 22 $all_att = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'attachment'");
mp-wp_genesis 23
mp-wp_genesis 24 $lost = array();
mp-wp_genesis 25 foreach ( (array) $all_att as $att ) {
mp-wp_genesis 26 if ( $att->post_parent > 0 && ! in_array($att->post_parent, $all_posts) )
mp-wp_genesis 27 $lost[] = $att->ID;
mp-wp_genesis 28 }
mp-wp_genesis 29 $_GET['detached'] = 1;
mp-wp_genesis 30
mp-wp_genesis 31 } elseif ( isset($_GET['found_post_id']) && isset($_GET['media']) ) {
mp-wp_genesis 32 check_admin_referer('bulk-media');
mp-wp_genesis 33
mp-wp_genesis 34 if ( ! ( $parent_id = (int) $_GET['found_post_id'] ) )
mp-wp_genesis 35 return;
mp-wp_genesis 36
mp-wp_genesis 37 $parent = &get_post($parent_id);
mp-wp_genesis 38 if ( !current_user_can('edit_post', $parent_id) )
mp-wp_genesis 39 wp_die( __('You are not allowed to edit this post.') );
mp-wp_genesis 40
mp-wp_genesis 41 $attach = array();
mp-wp_genesis 42 foreach( (array) $_GET['media'] as $att_id ) {
mp-wp_genesis 43 $att_id = (int) $att_id;
mp-wp_genesis 44
mp-wp_genesis 45 if ( !current_user_can('edit_post', $att_id) )
mp-wp_genesis 46 continue;
mp-wp_genesis 47
mp-wp_genesis 48 $attach[] = $att_id;
mp-wp_genesis 49 }
mp-wp_genesis 50
mp-wp_genesis 51 if ( ! empty($attach) ) {
mp-wp_genesis 52 $attach = implode(',', $attach);
mp-wp_genesis 53 $attached = $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ($attach)", $parent_id) );
mp-wp_genesis 54 }
mp-wp_genesis 55
mp-wp_genesis 56 if ( isset($attached) ) {
mp-wp_genesis 57 $location = 'upload.php';
mp-wp_genesis 58 if ( $referer = wp_get_referer() ) {
mp-wp_genesis 59 if ( false !== strpos($referer, 'upload.php') )
mp-wp_genesis 60 $location = $referer;
mp-wp_genesis 61 }
mp-wp_genesis 62
mp-wp_genesis 63 $location = add_query_arg( array( 'detached' => 1, 'attached' => $attached ) , $location );
mp-wp_genesis 64 wp_redirect($location);
mp-wp_genesis 65 exit;
mp-wp_genesis 66 }
mp-wp_genesis 67
mp-wp_remove-all-... 68 } elseif ( isset($_GET['action']) && isset($_GET['media']) && -1 != $_GET['action'] ) {
mp-wp_genesis 69 check_admin_referer('bulk-media');
mp-wp_remove-all-... 70 $doaction = $_GET['action'];
mp-wp_genesis 71
mp-wp_genesis 72 if ( 'delete' == $doaction ) {
mp-wp_genesis 73 foreach( (array) $_GET['media'] as $post_id_del ) {
mp-wp_genesis 74 $post_del = & get_post($post_id_del);
mp-wp_genesis 75
mp-wp_genesis 76 if ( !current_user_can('delete_post', $post_id_del) )
mp-wp_genesis 77 wp_die( __('You are not allowed to delete this post.') );
mp-wp_genesis 78
mp-wp_genesis 79 if ( $post_del->post_type == 'attachment' )
mp-wp_genesis 80 if ( ! wp_delete_attachment($post_id_del) )
mp-wp_genesis 81 wp_die( __('Error in deleting...') );
mp-wp_genesis 82 }
mp-wp_genesis 83
mp-wp_genesis 84 $location = 'upload.php';
mp-wp_genesis 85 if ( $referer = wp_get_referer() ) {
mp-wp_genesis 86 if ( false !== strpos($referer, 'upload.php') )
mp-wp_genesis 87 $location = $referer;
mp-wp_genesis 88 }
mp-wp_genesis 89
mp-wp_genesis 90 $location = add_query_arg('message', 2, $location);
mp-wp_genesis 91 $location = remove_query_arg('posted', $location);
mp-wp_genesis 92 wp_redirect($location);
mp-wp_genesis 93 exit;
mp-wp_genesis 94 }
mp-wp_genesis 95 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
mp-wp_genesis 96 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
mp-wp_genesis 97 exit;
mp-wp_genesis 98 }
mp-wp_genesis 99
mp-wp_genesis 100 $title = __('Media Library');
mp-wp_genesis 101 $parent_file = 'upload.php';
mp-wp_genesis 102
mp-wp_genesis 103 if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 )
mp-wp_genesis 104 $_GET['paged'] = 1;
mp-wp_genesis 105
mp-wp_genesis 106 if ( isset($_GET['detached']) ) {
mp-wp_genesis 107
mp-wp_genesis 108 if ( !empty($lost) ) {
mp-wp_genesis 109 $start = ( $_GET['paged'] - 1 ) * 50;
mp-wp_genesis 110 $page_links_total = ceil(count($lost) / 50);
mp-wp_genesis 111 $lost = implode(',', $lost);
mp-wp_genesis 112
mp-wp_genesis 113 $orphans = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN ($lost) LIMIT $start, 50" );
mp-wp_genesis 114 } else {
mp-wp_genesis 115 $start = ( $_GET['paged'] - 1 ) * 25;
mp-wp_genesis 116 $orphans = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent < 1 LIMIT $start, 25" );
mp-wp_genesis 117 $page_links_total = ceil($wpdb->get_var( "SELECT FOUND_ROWS()" ) / 25);
mp-wp_genesis 118 }
mp-wp_genesis 119
mp-wp_genesis 120 $post_mime_types = array(
mp-wp_genesis 121 'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')),
mp-wp_genesis 122 'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')),
mp-wp_genesis 123 'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')),
mp-wp_genesis 124 );
mp-wp_genesis 125 $post_mime_types = apply_filters('post_mime_types', $post_mime_types);
mp-wp_genesis 126
mp-wp_genesis 127 $avail_post_mime_types = get_available_post_mime_types('attachment');
mp-wp_genesis 128
mp-wp_genesis 129 if ( isset($_GET['post_mime_type']) && !array_intersect( (array) $_GET['post_mime_type'], array_keys($post_mime_types) ) )
mp-wp_genesis 130 unset($_GET['post_mime_type']);
mp-wp_genesis 131
mp-wp_genesis 132 } else {
mp-wp_genesis 133 list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
mp-wp_genesis 134 }
mp-wp_genesis 135
mp-wp_genesis 136 require_once('admin-header.php'); ?>
mp-wp_genesis 137
mp-wp_genesis 138 <?php
mp-wp_genesis 139 if ( isset($_GET['posted']) && (int) $_GET['posted'] ) {
mp-wp_genesis 140 $_GET['message'] = '1';
mp-wp_genesis 141 $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
mp-wp_genesis 142 }
mp-wp_genesis 143
mp-wp_genesis 144 if ( isset($_GET['attached']) && (int) $_GET['attached'] ) {
mp-wp_genesis 145 $attached = (int) $_GET['attached'];
mp-wp_genesis 146 $message = sprintf( __ngettext('Reattached %d attachment', 'Reattached %d attachments', $attached), $attached );
mp-wp_genesis 147 $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);
mp-wp_genesis 148 }
mp-wp_genesis 149
mp-wp_genesis 150 $messages[1] = __('Media attachment updated.');
mp-wp_genesis 151 $messages[2] = __('Media deleted.');
mp-wp_genesis 152 $messages[3] = __('Error saving media attachment.');
mp-wp_genesis 153
mp-wp_genesis 154 if ( isset($_GET['message']) && (int) $_GET['message'] ) {
mp-wp_genesis 155 $message = $messages[$_GET['message']];
mp-wp_genesis 156 $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
mp-wp_genesis 157 }
mp-wp_genesis 158 ?>
mp-wp_genesis 159
mp-wp_genesis 160 <?php do_action('restrict_manage_posts'); ?>
mp-wp_genesis 161
mp-wp_genesis 162 <div class="wrap">
mp-wp_genesis 163 <?php screen_icon(); ?>
mp-wp_genesis 164 <h2><?php echo wp_specialchars( $title );
mp-wp_genesis 165 if ( isset($_GET['s']) && $_GET['s'] )
mp-wp_genesis 166 printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', wp_specialchars( get_search_query() ) ); ?>
mp-wp_genesis 167 </h2>
mp-wp_genesis 168
mp-wp_genesis 169 <?php
mp-wp_genesis 170 if ( isset($message) ) { ?>
mp-wp_genesis 171 <div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
mp-wp_genesis 172 <?php
mp-wp_genesis 173 }
mp-wp_genesis 174 ?>
mp-wp_genesis 175
mp-wp_genesis 176 <ul class="subsubsub">
mp-wp_genesis 177 <?php
mp-wp_genesis 178 $type_links = array();
mp-wp_genesis 179 $_num_posts = (array) wp_count_attachments();
mp-wp_genesis 180 $_total_posts = array_sum( $_num_posts );
mp-wp_genesis 181 $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
mp-wp_genesis 182 foreach ( $matches as $type => $reals )
mp-wp_genesis 183 foreach ( $reals as $real )
mp-wp_genesis 184 $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
mp-wp_genesis 185
mp-wp_genesis 186 $class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
mp-wp_genesis 187 $type_links[] = "<li><a href='upload.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>';
mp-wp_genesis 188 foreach ( $post_mime_types as $mime_type => $label ) {
mp-wp_genesis 189 $class = '';
mp-wp_genesis 190
mp-wp_genesis 191 if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
mp-wp_genesis 192 continue;
mp-wp_genesis 193
mp-wp_genesis 194 if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
mp-wp_genesis 195 $class = ' class="current"';
mp-wp_genesis 196
mp-wp_genesis 197 $type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
mp-wp_genesis 198 }
mp-wp_genesis 199 $class = isset($_GET['detached']) ? ' class="current"' : '';
mp-wp_genesis 200
mp-wp_genesis 201 echo implode( " |</li>\n", $type_links) . '</li>';
mp-wp_genesis 202 unset($type_links);
mp-wp_genesis 203 ?>
mp-wp_genesis 204 </ul>
mp-wp_genesis 205
mp-wp_genesis 206 <form class="search-form" action="" method="get">
mp-wp_genesis 207 <p class="search-box">
mp-wp_genesis 208 <label class="hidden" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
mp-wp_genesis 209 <input type="text" class="search-input" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
mp-wp_genesis 210 <input type="submit" value="<?php _e( 'Search Media' ); ?>" class="button" />
mp-wp_genesis 211 </p>
mp-wp_genesis 212 </form>
mp-wp_genesis 213
mp-wp_genesis 214 <form id="posts-filter" action="" method="get">
mp-wp_genesis 215 <div class="tablenav">
mp-wp_genesis 216 <?php
mp-wp_genesis 217 if ( ! isset($page_links_total) )
mp-wp_genesis 218 $page_links_total = $wp_query->max_num_pages;
mp-wp_genesis 219
mp-wp_genesis 220 $page_links = paginate_links( array(
mp-wp_genesis 221 'base' => add_query_arg( 'paged', '%#%' ),
mp-wp_genesis 222 'format' => '',
mp-wp_genesis 223 'prev_text' => __('&laquo;'),
mp-wp_genesis 224 'next_text' => __('&raquo;'),
mp-wp_genesis 225 'total' => $page_links_total,
mp-wp_genesis 226 'current' => $_GET['paged']
mp-wp_genesis 227 ));
mp-wp_genesis 228
mp-wp_remove-all-... 229 if ( $page_links ) { ?>
mp-wp_genesis 230 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
mp-wp_genesis 231 number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
mp-wp_genesis 232 number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
mp-wp_genesis 233 number_format_i18n( $wp_query->found_posts ),
mp-wp_genesis 234 $page_links
mp-wp_genesis 235 ); echo $page_links_text; ?></div>
mp-wp_remove-all-... 236 <?php } ?>
mp-wp_genesis 237
mp-wp_genesis 238 <div class="alignleft actions">
mp-wp_genesis 239 <select name="action" class="select-action">
mp-wp_genesis 240 <option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
mp-wp_genesis 241 <option value="delete"><?php _e('Delete'); ?></option>
mp-wp_genesis 242 </select>
mp-wp_genesis 243 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />
mp-wp_genesis 244 <?php wp_nonce_field('bulk-media'); ?>
mp-wp_genesis 245
mp-wp_genesis 246 <?php
mp-wp_genesis 247 if ( ! is_singular() && ! isset($_GET['detached']) ) {
mp-wp_genesis 248 $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";
mp-wp_genesis 249
mp-wp_genesis 250 $arc_result = $wpdb->get_results( $arc_query );
mp-wp_genesis 251
mp-wp_genesis 252 $month_count = count($arc_result);
mp-wp_genesis 253
mp-wp_genesis 254 if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) : ?>
mp-wp_genesis 255 <select name='m'>
mp-wp_genesis 256 <option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
mp-wp_genesis 257 <?php
mp-wp_genesis 258 foreach ($arc_result as $arc_row) {
mp-wp_genesis 259 if ( $arc_row->yyear == 0 )
mp-wp_genesis 260 continue;
mp-wp_genesis 261 $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
mp-wp_genesis 262
mp-wp_genesis 263 if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
mp-wp_genesis 264 $default = ' selected="selected"';
mp-wp_genesis 265 else
mp-wp_genesis 266 $default = '';
mp-wp_genesis 267
mp-wp_genesis 268 echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
mp-wp_genesis 269 echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
mp-wp_genesis 270 echo "</option>\n";
mp-wp_genesis 271 }
mp-wp_genesis 272 ?>
mp-wp_genesis 273 </select>
mp-wp_genesis 274 <?php endif; // month_count ?>
mp-wp_genesis 275
mp-wp_genesis 276 <input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" />
mp-wp_genesis 277
mp-wp_genesis 278 <?php } // ! is_singular ?>
mp-wp_genesis 279
mp-wp_genesis 280 <?php if ( isset($_GET['detached']) ) { ?>
mp-wp_genesis 281 <input type="submit" id="find_detached" name="find_detached" value="<?php _e('Scan for lost attachments'); ?>" class="button-secondary" />
mp-wp_genesis 282 <?php } ?>
mp-wp_genesis 283
mp-wp_genesis 284 </div>
mp-wp_genesis 285
mp-wp_genesis 286 <br class="clear" />
mp-wp_genesis 287 </div>
mp-wp_genesis 288
mp-wp_genesis 289 <div class="clear"></div>
mp-wp_genesis 290
mp-wp_genesis 291 <?php if ( isset($orphans) ) { ?>
mp-wp_genesis 292 <table class="widefat" cellspacing="0">
mp-wp_genesis 293 <thead>
mp-wp_genesis 294 <tr>
mp-wp_remove-all-... 295 <th scope="col" class="check-column">&nbsp;</th>
mp-wp_genesis 296 <th scope="col"></th>
mp-wp_genesis 297 <th scope="col"><?php echo _c('Media|media column header'); ?></th>
mp-wp_genesis 298 <th scope="col"><?php echo _c('Date Added|media column header'); ?></th>
mp-wp_genesis 299 </tr>
mp-wp_genesis 300 </thead>
mp-wp_genesis 301 <tbody id="the-list" class="list:post">
mp-wp_genesis 302 <?php
mp-wp_genesis 303 if ( $orphans ) {
mp-wp_genesis 304 foreach ( $orphans as $post ) {
mp-wp_genesis 305 $class = 'alternate' == $class ? '' : 'alternate';
mp-wp_genesis 306 $att_title = wp_specialchars( _draft_or_post_title($post->ID) );
mp-wp_genesis 307 ?>
mp-wp_genesis 308 <tr id='post-<?php echo $post->ID; ?>' class='<?php echo $class; ?>' valign="top">
mp-wp_remove-all-... 309 <td scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php echo $post->ID; ?>" /></td>
mp-wp_genesis 310
mp-wp_genesis 311 <td class="media-icon"><?php
mp-wp_genesis 312 if ( $thumb = wp_get_attachment_image( $post->ID, array(80, 60), true ) ) { ?>
mp-wp_genesis 313 <a href="media.php?action=edit&amp;attachment_id=<?php echo $post->ID; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $thumb; ?></a>
mp-wp_genesis 314 <?php } ?></td>
mp-wp_genesis 315
mp-wp_genesis 316 <td><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />
mp-wp_genesis 317 <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
mp-wp_genesis 318
mp-wp_genesis 319 <p>
mp-wp_genesis 320 <?php
mp-wp_genesis 321 $actions = array();
mp-wp_genesis 322 if ( current_user_can('edit_post', $post->ID) )
mp-wp_genesis 323 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
mp-wp_genesis 324 if ( current_user_can('delete_post', $post->ID) )
mp-wp_remove-all-... 325 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete') . "</a>";
mp-wp_genesis 326 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
mp-wp_genesis 327 $action_count = count($actions);
mp-wp_genesis 328 $i = 0;
mp-wp_genesis 329 foreach ( $actions as $action => $link ) {
mp-wp_genesis 330 ++$i;
mp-wp_genesis 331 ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
mp-wp_genesis 332 echo "<span class='$action'>$link$sep</span>";
mp-wp_genesis 333 } ?>
mp-wp_genesis 334 </p></td>
mp-wp_genesis 335
mp-wp_genesis 336 <?php if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
mp-wp_genesis 337 $t_time = $h_time = __('Unpublished');
mp-wp_genesis 338 } else {
mp-wp_genesis 339 $t_time = get_the_time(__('Y/m/d g:i:s A'));
mp-wp_genesis 340 $m_time = $post->post_date;
mp-wp_genesis 341 $time = get_post_time( 'G', true );
mp-wp_genesis 342 if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
mp-wp_genesis 343 if ( $t_diff < 0 )
mp-wp_genesis 344 $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
mp-wp_genesis 345 else
mp-wp_genesis 346 $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
mp-wp_genesis 347 } else {
mp-wp_genesis 348 $h_time = mysql2date(__('Y/m/d'), $m_time);
mp-wp_genesis 349 }
mp-wp_genesis 350 } ?>
mp-wp_genesis 351 <td><?php echo $h_time ?></td>
mp-wp_genesis 352 </tr>
mp-wp_genesis 353 <?php }
mp-wp_genesis 354
mp-wp_genesis 355 } else { ?>
mp-wp_genesis 356 <tr><td colspan="5"><?php _e('No posts found.') ?></td></tr>
mp-wp_genesis 357 <?php } ?>
mp-wp_genesis 358 </tbody>
mp-wp_genesis 359 </table>
mp-wp_genesis 360
mp-wp_remove-all-... 361 <?php
mp-wp_genesis 362 } else {
mp-wp_genesis 363 include( 'edit-attachment-rows.php' );
mp-wp_genesis 364 } ?>
mp-wp_genesis 365
mp-wp_remove-all-... 366 <?php if ( $page_links ) { ?>
mp-wp_remove-all-... 367 <div class="tablenav">
mp-wp_remove-all-... 368 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
mp-wp_remove-all-... 369 number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
mp-wp_remove-all-... 370 number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
mp-wp_remove-all-... 371 number_format_i18n( $wp_query->found_posts ),
mp-wp_remove-all-... 372 $page_links
mp-wp_remove-all-... 373 ); echo $page_links_text; ?></div>
mp-wp_genesis 374 <div class="tablenav">
mp-wp_genesis 375 <?php } ?>
mp-wp_genesis 376
mp-wp_genesis 377 </form>
mp-wp_genesis 378 <br class="clear" />
mp-wp_genesis 379
mp-wp_genesis 380 </div>
mp-wp_genesis 381
mp-wp_genesis 382 <?php
mp-wp_genesis 383
mp-wp_genesis 384 include('admin-footer.php');
mp-wp_genesis 385 ?>