|
@@ 88-94 (lines=7) @@
|
| 85 |
|
break; |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
if ( ! $post_type->map_meta_cap ) { |
| 89 |
|
$caps[] = $post_type->cap->$cap; |
| 90 |
|
// Prior to 3.1 we would re-call map_meta_cap here. |
| 91 |
|
if ( 'delete_post' == $cap ) |
| 92 |
|
$cap = $post_type->cap->$cap; |
| 93 |
|
break; |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
// If the post author is set and the user is the author... |
| 97 |
|
if ( $post->post_author && $user_id == $post->post_author ) { |
|
@@ 149-155 (lines=7) @@
|
| 146 |
|
break; |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
if ( ! $post_type->map_meta_cap ) { |
| 150 |
|
$caps[] = $post_type->cap->$cap; |
| 151 |
|
// Prior to 3.1 we would re-call map_meta_cap here. |
| 152 |
|
if ( 'edit_post' == $cap ) |
| 153 |
|
$cap = $post_type->cap->$cap; |
| 154 |
|
break; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
// If the post author is set and the user is the author... |
| 158 |
|
if ( $post->post_author && $user_id == $post->post_author ) { |
|
@@ 208-214 (lines=7) @@
|
| 205 |
|
break; |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
if ( ! $post_type->map_meta_cap ) { |
| 209 |
|
$caps[] = $post_type->cap->$cap; |
| 210 |
|
// Prior to 3.1 we would re-call map_meta_cap here. |
| 211 |
|
if ( 'read_post' == $cap ) |
| 212 |
|
$cap = $post_type->cap->$cap; |
| 213 |
|
break; |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
$status_obj = get_post_status_object( $post->post_status ); |
| 217 |
|
if ( $status_obj->public ) { |