Changeset 19906 for trunk/wp-includes/post.php
- Timestamp:
- 02/10/2012 10:00:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r19853 r19906 1514 1514 * Retrieve post meta fields, based on post ID. 1515 1515 * 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. 1519 1518 * 1520 1519 * @since 1.2.0 1521 1520 * @link http://codex.wordpress.org/Function_Reference/get_post_custom 1522 1521 * 1523 * @uses $id Current Loop Post ID 1524 * 1525 * @param int $post_id post ID 1522 * @param int $post_id Post ID. 1526 1523 * @return array 1527 1524 */ 1528 1525 function get_post_custom( $post_id = 0 ) { 1529 1526 $post_id = absint( $post_id ); 1530 1531 1527 if ( ! $post_id ) 1532 1528 $post_id = get_the_ID(); 1533 1529 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, '' ); 1538 1531 } 1539 1532
Note: See TracChangeset
for help on using the changeset viewer.