WordPress.org

Make WordPress Core

Ticket #14958: post.php.diff

File post.php.diff, 387 bytes (added by davidmosterd, 17 months ago)

Adds filter 'get_post' to the get_post() function.

  • wp-includes/post.php

     
    407407 
    408408        $_post = $_post->filter( $filter ); 
    409409 
     410    $_post = apply_filters( 'get_post', $_post ); 
     411     
    410412        if ( $output == ARRAY_A ) 
    411413                return $_post->to_array(); 
    412414        elseif ( $output == ARRAY_N )