WordPress.org

Make WordPress Core

Ticket #19882: 19882.2.diff

File 19882.2.diff, 726 bytes (added by scribu, 6 years ago)
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 562d4ef..085747a 100644
    function delete_post_meta($post_id, $meta_key, $meta_value = '') { 
    14671467 * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
    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}
    14731473
    function get_post_custom( $post_id = 0 ) { 
    15271527        if ( ! $post_id )
    15281528                $post_id = get_the_ID();
    15291529
    1530         return get_post_meta( $post_id, '' );
     1530        return get_post_meta( $post_id );
    15311531}
    15321532
    15331533/**