Block editing of post_mime_type and guid in bulk_edit_posts(). More filter unsets. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@18370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a7e69b27f7
commit
b8b93c07ad
|
@ -136,7 +136,6 @@ function edit_post( $post_data = null ) {
|
||||||
$post_data = &$_POST;
|
$post_data = &$_POST;
|
||||||
|
|
||||||
// Clear out any data in internal vars.
|
// 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_ID = (int) $post_data['post_ID'];
|
||||||
|
@ -345,7 +344,8 @@ function bulk_edit_posts( $post_data = null ) {
|
||||||
continue;
|
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 ) {
|
foreach ( $tax_names as $tax_name ) {
|
||||||
$taxonomy_obj = get_taxonomy($tax_name);
|
$taxonomy_obj = get_taxonomy($tax_name);
|
||||||
if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
|
if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
|
||||||
|
@ -367,6 +367,9 @@ function bulk_edit_posts( $post_data = null ) {
|
||||||
unset( $post_data['tax_input']['category'] );
|
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;
|
$post_data['ID'] = $post_ID;
|
||||||
$updated[] = wp_update_post( $post_data );
|
$updated[] = wp_update_post( $post_data );
|
||||||
|
|
||||||
|
@ -538,6 +541,9 @@ function wp_write_post() {
|
||||||
|
|
||||||
$_POST['post_mime_type'] = '';
|
$_POST['post_mime_type'] = '';
|
||||||
|
|
||||||
|
// Clear out any data in internal vars.
|
||||||
|
unset( $_POST['filter'] );
|
||||||
|
|
||||||
// Check for autosave collisions
|
// Check for autosave collisions
|
||||||
// Does this need to be updated? ~ Mark
|
// Does this need to be updated? ~ Mark
|
||||||
$temp_id = false;
|
$temp_id = false;
|
||||||
|
|
Loading…
Reference in New Issue