WordPress.org

Make WordPress Core

Ticket #19708: 19708.3.diff

File 19708.3.diff, 1.1 KB (added by duck_, 2 years ago)
  • wp-includes/post.php

     
    15131513/** 
    15141514 * Retrieve post meta fields, based on post ID. 
    15151515 * 
    1516  * The post meta fields are retrieved from the cache, so the function is 
    1517  * optimized to be called more than once. It also applies to the functions, that 
    1518  * use this function. 
     1516 * The post meta fields are retrieved from the cache where possible, 
     1517 * so the function is optimized to be called more than once. 
    15191518 * 
    15201519 * @since 1.2.0 
    15211520 * @link http://codex.wordpress.org/Function_Reference/get_post_custom 
    15221521 * 
    1523  * @uses $id Current Loop Post ID 
    1524  * 
    1525  * @param int $post_id post ID 
     1522 * @param int $post_id Post ID. 
    15261523 * @return array 
    15271524 */ 
    15281525function get_post_custom( $post_id = 0 ) { 
    15291526        $post_id = absint( $post_id ); 
    1530  
    15311527        if ( ! $post_id ) 
    15321528                $post_id = get_the_ID(); 
    15331529 
    1534         if ( ! wp_cache_get( $post_id, 'post_meta' ) ) 
    1535                 update_postmeta_cache( $post_id ); 
    1536  
    1537         return wp_cache_get( $post_id, 'post_meta' ); 
     1530        return get_post_meta( $post_id, '' ); 
    15381531} 
    15391532 
    15401533/**