Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Block editing of post_mime_type and guid in bulk_edit_posts(). More f…

…ilter unsets. For trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@18369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 68d8691cc867d3dd823a841c67e0b0a833ad31b5 1 parent 7a466b9
ryan authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 wp-admin/includes/post.php
View
12 wp-admin/includes/post.php
@@ -143,8 +143,7 @@ function edit_post( $post_data = null ) {
$post_data = &$_POST;
// Clear out any data in internal vars.
- if ( isset( $post_data['filter'] ) )
- unset( $post_data['filter'] );
+ unset( $post_data['filter'] );
$post_ID = (int) $post_data['post_ID'];
$post = get_post( $post_ID );
@@ -352,7 +351,8 @@ function bulk_edit_posts( $post_data = null ) {
continue;
}
- $tax_names = get_object_taxonomies( get_post($post_ID) );
+ $post = get_post( $post_ID );
+ $tax_names = get_object_taxonomies( $post );
foreach ( $tax_names as $tax_name ) {
$taxonomy_obj = get_taxonomy($tax_name);
if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
@@ -374,6 +374,9 @@ function bulk_edit_posts( $post_data = null ) {
unset( $post_data['tax_input']['category'] );
}
+ $post_data['post_mime_type'] = $post->post_mime_type;
+ $post_data['guid'] = $post->guid;
+
$post_data['ID'] = $post_ID;
$updated[] = wp_update_post( $post_data );
@@ -545,6 +548,9 @@ function wp_write_post() {
$_POST['post_mime_type'] = '';
+ // Clear out any data in internal vars.
+ unset( $_POST['filter'] );
+
// Check for autosave collisions
// Does this need to be updated? ~ Mark
$temp_id = false;
Please sign in to comment.
Something went wrong with that request. Please try again.