WordPress.org

Make WordPress Core

Ticket #20451: 20451.diff

File 20451.diff, 464 bytes (added by CoenJacobs, 3 years ago)

Basic fix that loops through provided meta fields and values

  • wp-includes/post.php

     
    26262626                } 
    26272627        } 
    26282628 
     2629        if ( ! empty( $meta_input ) ) { 
     2630                foreach ( $meta_input as $field => $value ) { 
     2631                        update_post_meta( $post_ID, $field, $value ); 
     2632                } 
     2633        } 
     2634 
    26292635        $current_guid = get_post_field( 'guid', $post_ID ); 
    26302636 
    26312637        clean_post_cache( $post_ID, $data['post_type'] );