442 | | $cap = ($publish) ? 'publish_posts' : 'edit_posts'; |
| 442 | if ($publish) { |
| 443 | if (!current_user_can('publish_posts')) { |
| 444 | $msg_cant_publish = __('Sorry, you do not have the right to publish new posts.'); |
| 445 | if (!current_user_can('edit_posts')) { |
| 446 | $this->auth_required($msg_cant_publish); |
| 447 | } else { |
| 448 | $this->auth_required($msg_cant_publish . ' ' . |
| 449 | __('Please submit your post as draft for review.')); |
| 450 | } |
| 451 | } |
| 452 | } else { |
| 453 | if (!current_user_can('edit_posts')) |
| 454 | $this->auth_required(__('Sorry, you do not have the right to submit new posts.')); |
| 455 | } |
| 456 | |