mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add edit_pages checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@3269 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -249,10 +249,17 @@ function map_meta_cap($cap, $user_id) {
|
||||
// If the post is published...
|
||||
if ($post->post_status == 'publish')
|
||||
$caps[] = 'edit_published_posts';
|
||||
else if ($post->post_status == 'static')
|
||||
$caps[] = 'edit_pages';
|
||||
else
|
||||
// If the post is draft...
|
||||
$caps[] = 'edit_posts';
|
||||
} else {
|
||||
if ($post->post_status == 'static') {
|
||||
$caps[] = 'edit_pages';
|
||||
break;
|
||||
}
|
||||
|
||||
// The user is trying to edit someone else's post.
|
||||
$caps[] = 'edit_others_posts';
|
||||
// The post is published, extra cap required.
|
||||
|
||||
Reference in New Issue
Block a user