diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 4c15f52b17..c2c216dec9 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -56,13 +56,13 @@ if ( is_single() ) { $post_status_label = _c('Manage Posts|manage posts header'); if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) $post_status_label = $post_stati[$_GET['post_status']][1]; - if ( $post_listing_pageable && !is_archive() && !is_search() ) - $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); - else + //if ( $post_listing_pageable && !is_archive() && !is_search() ) //Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php + // $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); + //else $h2_noun = $post_status_label; // Use $_GET instead of is_ since they can override each other $h2_author = ''; - $_GET['author'] = (int) $_GET['author']; + $_GET['author'] = isset($_GET['author']) ? (int) $_GET['author'] : 0; if ( $_GET['author'] != 0 ) { if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion $h2_author = ' ' . __('by other authors'); @@ -93,7 +93,7 @@ foreach ( $post_stati as $status => $label ) { if ( empty( $num_posts->$status ) ) continue; - if ( $status == $_GET['post_status'] ) + if ( isset($_GET['post_status']) && $status == $_GET['post_status'] ) $class = ' class="current"'; $status_links[] = "