Make WordPress Core


Ignore:
Timestamp:
12/13/2018 01:24:11 AM (6 years ago)
Author:
pento
Message:

Editor: Remove unwanted fields before saving posts.

The meta_input, file, and guid fields are not intended to be updated through user input.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/post.php

    r43861 r44047  
    190190    // Update the thumbnail filename
    191191    $newmeta = wp_get_attachment_metadata( $post_id, true );
    192     $newmeta['thumb'] = $_POST['thumb'];
     192    $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
    193193
    194194    wp_update_attachment_metadata( $post_id, $newmeta );
Note: See TracChangeset for help on using the changeset viewer.