| 1 | Index: wp-includes/post.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/post.php (revision 17567) |
|---|
| 4 | +++ wp-includes/post.php (working copy) |
|---|
| 5 | @@ -1424,13 +1424,14 @@ |
|---|
| 6 | * @link http://codex.wordpress.org/Function_Reference/get_post_meta |
|---|
| 7 | * |
|---|
| 8 | * @param int $post_id Post ID. |
|---|
| 9 | - * @param string $key The meta key to retrieve. |
|---|
| 10 | + * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for |
|---|
| 11 | + * the specified object. |
|---|
| 12 | * @param bool $single Whether to return a single value. |
|---|
| 13 | * @return mixed Will be an array if $single is false. Will be value of meta data field if $single |
|---|
| 14 | * is true. |
|---|
| 15 | */ |
|---|
| 16 | -function get_post_meta($post_id, $key, $single = false) { |
|---|
| 17 | - return get_metadata('post', $post_id, $key, $single); |
|---|
| 18 | +function get_post_meta( $post_id, $meta_key = '', $single = false ) { |
|---|
| 19 | + return get_metadata( 'post', $post_id, $meta_key, $single ); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | /** |
|---|
| 23 | Index: wp-includes/comment.php |
|---|
| 24 | =================================================================== |
|---|
| 25 | --- wp-includes/comment.php (revision 17567) |
|---|
| 26 | +++ wp-includes/comment.php (working copy) |
|---|
| 27 | @@ -527,13 +527,14 @@ |
|---|
| 28 | * @link http://codex.wordpress.org/Function_Reference/get_comment_meta |
|---|
| 29 | * |
|---|
| 30 | * @param int $comment_id Comment ID. |
|---|
| 31 | - * @param string $key The meta key to retrieve. |
|---|
| 32 | + * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for |
|---|
| 33 | + * the specified object. |
|---|
| 34 | * @param bool $single Whether to return a single value. |
|---|
| 35 | * @return mixed Will be an array if $single is false. Will be value of meta data field if $single |
|---|
| 36 | * is true. |
|---|
| 37 | */ |
|---|
| 38 | -function get_comment_meta($comment_id, $key, $single = false) { |
|---|
| 39 | - return get_metadata('comment', $comment_id, $key, $single); |
|---|
| 40 | +function get_comment_meta( $comment_id, $meta_key = '', $single = false ) { |
|---|
| 41 | + return get_metadata( 'comment', $comment_id, $meta_key, $single ); |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | /** |
|---|
| 45 | Index: wp-includes/user.php |
|---|
| 46 | =================================================================== |
|---|
| 47 | --- wp-includes/user.php (revision 17567) |
|---|
| 48 | +++ wp-includes/user.php (working copy) |
|---|
| 49 | @@ -784,13 +784,14 @@ |
|---|
| 50 | * @link http://codex.wordpress.org/Function_Reference/get_user_meta |
|---|
| 51 | * |
|---|
| 52 | * @param int $user_id Post ID. |
|---|
| 53 | - * @param string $key The meta key to retrieve. |
|---|
| 54 | + * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for |
|---|
| 55 | + * the specified object. |
|---|
| 56 | * @param bool $single Whether to return a single value. |
|---|
| 57 | * @return mixed Will be an array if $single is false. Will be value of meta data field if $single |
|---|
| 58 | * is true. |
|---|
| 59 | */ |
|---|
| 60 | -function get_user_meta($user_id, $key, $single = false) { |
|---|
| 61 | - return get_metadata('user', $user_id, $key, $single); |
|---|
| 62 | +function get_user_meta( $user_id, $meta_key = '', $single = false ) { |
|---|
| 63 | + return get_metadata( 'user', $user_id, $meta_key, $single ); |
|---|
| 64 | } |
|---|
| 65 | |
|---|
| 66 | /** |
|---|