Make WordPress Core

Ticket #54835: 54835.diff

File 54835.diff, 956 bytes (added by thelovekesh, 3 years ago)
  • src/wp-includes/post.php

     
    24752475 * @return bool True on success, false on failure.
    24762476 */
    24772477function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) {
    2478         // Make sure meta is added to the post, not a revision.
     2478        // Make sure meta is deleted from the post, not from revision.
    24792479        $the_post = wp_is_post_revision( $post_id );
    24802480        if ( $the_post ) {
    24812481                $post_id = $the_post;
     
    25272527 *                  is the same as the one that is already in the database.
    25282528 */
    25292529function update_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) {
    2530         // Make sure meta is added to the post, not a revision.
     2530        // Make sure meta is updated for the post, not for revision.
    25312531        $the_post = wp_is_post_revision( $post_id );
    25322532        if ( $the_post ) {
    25332533                $post_id = $the_post;