Make WordPress Core


Ignore:
Timestamp:
12/18/2018 09:31:14 PM (6 years ago)
Author:
desrosj
Message:

Editor: Remove unwanted fields before saving posts.

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

Merges [44047] to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/post.php

    r44260 r44295  
    201201        // Update the thumbnail filename
    202202        $newmeta          = wp_get_attachment_metadata( $post_id, true );
    203         $newmeta['thumb'] = $_POST['thumb'];
     203        $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
    204204
    205205        wp_update_attachment_metadata( $post_id, $newmeta );
Note: See TracChangeset for help on using the changeset viewer.