diff --git src/wp-includes/capabilities.php src/wp-includes/capabilities.php
index 530fe563d8..608ff40625 100644
|
|
function map_meta_cap( $cap, $user_id ) { |
121 | 121 | $caps[] = $post_type->cap->delete_private_posts; |
122 | 122 | } |
123 | 123 | } |
| 124 | |
| 125 | /* |
| 126 | * Setting the privacy policy page requires `manage_privacy_options`, |
| 127 | * so deleting it should require that too. |
| 128 | */ |
| 129 | if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { |
| 130 | $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); |
| 131 | } |
| 132 | |
124 | 133 | break; |
125 | 134 | // edit_post breaks down to edit_posts, edit_published_posts, or |
126 | 135 | // edit_others_posts |
… |
… |
function map_meta_cap( $cap, $user_id ) { |
183 | 192 | $caps[] = $post_type->cap->edit_private_posts; |
184 | 193 | } |
185 | 194 | } |
| 195 | |
| 196 | /* |
| 197 | * Setting the privacy policy page requires `manage_privacy_options`, |
| 198 | * so editing it should require that too. |
| 199 | */ |
| 200 | if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { |
| 201 | $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); |
| 202 | } |
| 203 | |
186 | 204 | break; |
187 | 205 | case 'read_post': |
188 | 206 | case 'read_page': |