mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
No need to recount. see #12734
git-svn-id: https://develop.svn.wordpress.org/trunk@14567 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
691fc01761
commit
411f09b811
@ -492,8 +492,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
|
||||
// @todo transient caching of these results with proper invalidation on updating of a post of this type
|
||||
$get_posts = new WP_Query;
|
||||
$posts = $get_posts->query( $args );
|
||||
$count_posts = (int) @count( $posts );
|
||||
if ( ! $count_posts ) {
|
||||
if ( ! $get_posts->post_count ) {
|
||||
echo '<p>' . __( 'No items.' ) . '</p>';
|
||||
return;
|
||||
}
|
||||
@ -502,7 +501,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
|
||||
|
||||
$num_pages = $get_posts->max_num_pages;
|
||||
|
||||
if ( isset( $get_posts->found_posts ) && ( $get_posts->found_posts > $count_posts ) ) {
|
||||
if ( isset( $get_posts->found_posts ) && ( $get_posts->found_posts > $get_posts->post_count ) ) {
|
||||
// somewhat like display_page_row(), let's make sure ancestors show up on paged display
|
||||
$parent_ids = array();
|
||||
$child_ids = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user