mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
Allow get_post_meta() to be called with only a post ID, as get_metadata() handles this. props scribu, fixes #19882.
git-svn-id: https://develop.svn.wordpress.org/trunk@19908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9f6709c599
commit
c8f498046f
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user