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

git-svn-id: https://develop.svn.wordpress.org/trunk@17457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-02-16 18:58:06 +00:00
parent 5bfe6fa2b1
commit e7ceede332
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 ) ) {