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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-02-16 18:58:06 +00:00
parent a2603e710e
commit 400dc5312f
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 ) ) {