@@ 1407-1410 (lines=4) @@ | ||
1404 | return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); |
|
1405 | if ( $post_data['post_type'] != get_post_type( $post_data['ID'] ) ) |
|
1406 | return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); |
|
1407 | } else { |
|
1408 | if ( ! current_user_can( $post_type->cap->create_posts ) || ! current_user_can( $post_type->cap->edit_posts ) ) |
|
1409 | return new IXR_Error( 401, __( 'Sorry, you are not allowed to post on this site.' ) ); |
|
1410 | } |
|
1411 | ||
1412 | switch ( $post_data['post_status'] ) { |
|
1413 | case 'draft': |
|
@@ 4724-4725 (lines=2) @@ | ||
4721 | do_action( 'xmlrpc_call', 'blogger.newPost' ); |
|
4722 | ||
4723 | $cap = ($publish) ? 'publish_posts' : 'edit_posts'; |
|
4724 | if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) || !current_user_can($cap) ) |
|
4725 | return new IXR_Error(401, __('Sorry, you are not allowed to post on this site.')); |
|
4726 | ||
4727 | $post_status = ($publish) ? 'publish' : 'draft'; |
|
4728 | ||
@@ 4990-4991 (lines=2) @@ | ||
4987 | $post_type = 'post'; |
|
4988 | } |
|
4989 | ||
4990 | if ( ! current_user_can( get_post_type_object( $post_type )->cap->create_posts ) ) |
|
4991 | return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts on this site.' ) ); |
|
4992 | if ( !current_user_can( $cap ) ) |
|
4993 | return new IXR_Error( 401, $error_message ); |
|
4994 |