Don't allow changing the post type. Props nacin. For 3.1

git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-02-16 18:58:40 +00:00
parent 4425fc362e
commit d5cd365c06
1 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,8 @@ function edit_post( $post_data = null ) {
$post_data = &$_POST;
$post_ID = (int) $post_data['post_ID'];
$post = get_post( $post_ID );
$post_data['post_type'] = $post->post_type;
$ptype = get_post_type_object($post_data['post_type']);
if ( !current_user_can( $ptype->cap->edit_post, $post_ID ) ) {