From 396a5b89e8129d0cfe20c533529036730d929e15 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 10 Feb 2012 22:42:54 +0000 Subject: [PATCH] Allow get_post_meta() to be called with only a post ID, as get_metadata() handles this. props scribu, fixes #19882. git-svn-id: http://svn.automattic.com/wordpress/trunk@19908 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 562d4efca..085747a93 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1467,7 +1467,7 @@ function delete_post_meta($post_id, $meta_key, $meta_value = '') { * @return mixed Will be an array if $single is false. Will be value of meta data field if $single * is true. */ -function get_post_meta($post_id, $key, $single = false) { +function get_post_meta($post_id, $key = '', $single = false) { return get_metadata('post', $post_id, $key, $single); } @@ -1527,7 +1527,7 @@ function get_post_custom( $post_id = 0 ) { if ( ! $post_id ) $post_id = get_the_ID(); - return get_post_meta( $post_id, '' ); + return get_post_meta( $post_id ); } /**