Make WordPress Core

Changeset 19908


Ignore:
Timestamp:
02/10/2012 10:42:54 PM (13 years ago)
Author:
nacin
Message:

Allow get_post_meta() to be called with only a post ID, as get_metadata() handles this. props scribu, fixes #19882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r19906 r19908  
    14681468 *  is true.
    14691469 */
    1470 function get_post_meta($post_id, $key, $single = false) {
     1470function get_post_meta($post_id, $key = '', $single = false) {
    14711471    return get_metadata('post', $post_id, $key, $single);
    14721472}
     
    15281528        $post_id = get_the_ID();
    15291529
    1530     return get_post_meta( $post_id, '' );
     1530    return get_post_meta( $post_id );
    15311531}
    15321532
Note: See TracChangeset for help on using the changeset viewer.