diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 8be61474bc..5fab0ab640 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -165,6 +165,13 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); } + if ( isset( $post_data['post_category'] ) ) { + $category_object = get_taxonomy( 'category' ); + if ( ! current_user_can( $category_object->cap->assign_terms ) ) { + unset( $post_data['post_category'] ); + } + } + return $post_data; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 05f7209c28..931f1d9dfc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5.3-alpha-37757'; +$wp_version = '4.5.3-alpha-37759'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.