WordPress.org

Make WordPress Core

Ticket #23198: add-WP_Error.diff

File add-WP_Error.diff, 440 bytes (added by adamsilverstein, 8 years ago)

adds WP_Error return to get_post_format

  • wp-includes/post.php

     
    765765function get_post_format( $post = null ) {
    766766        $post = get_post($post);
    767767
     768        if ( empty($post) )
     769                return new WP_Error('invalid_post', __('Invalid post'));
     770
    768771        if ( ! post_type_supports( $post->post_type, 'post-formats' ) )
    769772                return false;
    770773