WordPress.org

Make WordPress Core

Ticket #18822: 18822.diff

File 18822.diff, 477 bytes (added by scribu, 3 years ago)
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 76fdd65..9944b53 100644
    function &get_post(&$post, $output = OBJECT, $filter = 'raw') { 
    381381                _get_post_ancestors($post); 
    382382                $_post = sanitize_post($post, 'raw'); 
    383383                wp_cache_add($post->ID, $_post, 'posts'); 
     384        } elseif ( is_object($post) && 'raw' == $post->filter ) { 
     385                $_post = $post; 
    384386        } else { 
    385387                if ( is_object($post) ) 
    386388                        $post_id = $post->ID;