Make WordPress Core


Ignore:
Timestamp:
12/13/2018 01:56:35 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.

Merges [44047] to the 4.0 branch.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/wp-admin/post.php

    r44069 r44070  
    228228    // Update the thumbnail filename
    229229    $newmeta = wp_get_attachment_metadata( $post_id, true );
    230     $newmeta['thumb'] = $_POST['thumb'];
     230    $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
    231231
    232232    wp_update_attachment_metadata( $post_id, $newmeta );
Note: See TracChangeset for help on using the changeset viewer.