|
@@ 1334-1337 (lines=4) @@
|
| 1331 |
|
case 'draft': |
| 1332 |
|
case 'pending': |
| 1333 |
|
break; |
| 1334 |
|
case 'private': |
| 1335 |
|
if ( ! current_user_can( $post_type->cap->publish_posts ) ) |
| 1336 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ) ); |
| 1337 |
|
break; |
| 1338 |
|
case 'publish': |
| 1339 |
|
case 'future': |
| 1340 |
|
if ( ! current_user_can( $post_type->cap->publish_posts ) ) |
|
@@ 1339-1342 (lines=4) @@
|
| 1336 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ) ); |
| 1337 |
|
break; |
| 1338 |
|
case 'publish': |
| 1339 |
|
case 'future': |
| 1340 |
|
if ( ! current_user_can( $post_type->cap->publish_posts ) ) |
| 1341 |
|
return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ) ); |
| 1342 |
|
break; |
| 1343 |
|
default: |
| 1344 |
|
if ( ! get_post_status_object( $post_data['post_status'] ) ) |
| 1345 |
|
$post_data['post_status'] = 'draft'; |