Make WordPress Core

Ticket #12955: post.php.diff

File post.php.diff, 687 bytes (added by JohnLamansky, 14 years ago)
  • wp-includes/post.php

     
    338338function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
    339339        global $wpdb;
    340340        $null = null;
    341 
     341       
    342342        if ( empty($post) ) {
    343343                if ( isset($GLOBALS['post']) )
    344344                        $_post = & $GLOBALS['post'];
     
    361361                        wp_cache_add($_post->ID, $_post, 'posts');
    362362                }
    363363        }
    364 
     364       
    365365        if ($filter != 'raw')
    366366                $_post = sanitize_post($_post, $filter);
    367 
     367       
     368        $_post = apply_filters( 'get_post', $_post );
     369       
    368370        if ( $output == OBJECT ) {
    369371                return $_post;
    370372        } elseif ( $output == ARRAY_A ) {