diff --git src/wp-admin/includes/misc.php src/wp-admin/includes/misc.php
index 1d8615899f..c95b8b15a2 100644
|
|
final class WP_Privacy_Policy_Content { |
1564 | 1564 | return; |
1565 | 1565 | } |
1566 | 1566 | |
1567 | | if ( ! current_user_can( 'manage_privacy_options' ) ) { |
1568 | | return; |
1569 | | } |
1570 | | |
1571 | 1567 | $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); |
1572 | 1568 | |
1573 | 1569 | if ( ! $policy_page_id || $policy_page_id != $post->ID ) { |
diff --git src/wp-includes/capabilities.php src/wp-includes/capabilities.php
index 530fe563d8..b6eb6acbe2 100644
|
|
function map_meta_cap( $cap, $user_id ) { |
121 | 121 | $caps[] = $post_type->cap->delete_private_posts; |
122 | 122 | } |
123 | 123 | } |
| 124 | |
| 125 | /* |
| 126 | * Deleting the Privacy Policy page should require the same capability |
| 127 | * as choosing which page is used. |
| 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 | * Editing the Privacy Policy page should require the same capability |
| 198 | * as choosing which page is used. |
| 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': |