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:
parent
a2603e710e
commit
400dc5312f
|
@ -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 ) ) {
|
||||
|
|
Loading…
Reference in New Issue