|
@@ 1325-1328 (lines=4) @@
|
| 1322 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); |
| 1323 |
|
if ( $post_data['post_type'] != get_post_type( $post_data['ID'] ) ) |
| 1324 |
|
return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); |
| 1325 |
|
} else { |
| 1326 |
|
if ( ! current_user_can( $post_type->cap->create_posts ) || ! current_user_can( $post_type->cap->edit_posts ) ) |
| 1327 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to post on this site.' ) ); |
| 1328 |
|
} |
| 1329 |
|
|
| 1330 |
|
switch ( $post_data['post_status'] ) { |
| 1331 |
|
case 'draft': |
|
@@ 4612-4613 (lines=2) @@
|
| 4609 |
|
do_action( 'xmlrpc_call', 'blogger.newPost' ); |
| 4610 |
|
|
| 4611 |
|
$cap = ($publish) ? 'publish_posts' : 'edit_posts'; |
| 4612 |
|
if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) || !current_user_can($cap) ) |
| 4613 |
|
return new IXR_Error(401, __('Sorry, you are not allowed to post on this site.')); |
| 4614 |
|
|
| 4615 |
|
$post_status = ($publish) ? 'publish' : 'draft'; |
| 4616 |
|
|
|
@@ 4878-4879 (lines=2) @@
|
| 4875 |
|
$post_type = 'post'; |
| 4876 |
|
} |
| 4877 |
|
|
| 4878 |
|
if ( ! current_user_can( get_post_type_object( $post_type )->cap->create_posts ) ) |
| 4879 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts on this site.' ) ); |
| 4880 |
|
if ( !current_user_can( $cap ) ) |
| 4881 |
|
return new IXR_Error( 401, $error_message ); |
| 4882 |
|
|