WordPress.org

Make WordPress Core

Changeset 24826


Ignore:
Timestamp:
07/28/13 21:38:00 (9 months ago)
Author:
nacin
Message:

Return an empty stdClass from wp_count_posts() when a nonexistent post type is requested.

props johnpbloch.
fixes #24803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r24823 r24826  
    20432043    global $wpdb; 
    20442044 
     2045    if ( ! post_type_exists( $type ) ) 
     2046        return new stdClass; 
     2047 
    20452048    $user = wp_get_current_user(); 
    20462049 
Note: See TracChangeset for help on using the changeset viewer.