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..d1b61f20b3 100644
|
|
|
function map_meta_cap( $cap, $user_id ) { |
| 121 | 121 | $caps[] = $post_type->cap->delete_private_posts; |
| 122 | 122 | } |
| 123 | 123 | } |
| | 124 | |
| | 125 | /* |
| | 126 | * Editing the Privacy Policy page should require the same capability |
| | 127 | * as choosing which page is used. |
| | 128 | */ |
| | 129 | $privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); |
| | 130 | if ( $privacy_policy_page_id && ! empty( $args[0] ) && $privacy_policy_page_id === $args[0] ) { |
| | 131 | $caps[] = 'manage_privacy_options'; |
| | 132 | } |
| | 133 | |
| 124 | 134 | break; |
| 125 | 135 | // edit_post breaks down to edit_posts, edit_published_posts, or |
| 126 | 136 | // edit_others_posts |
| … |
… |
function map_meta_cap( $cap, $user_id ) { |
| 183 | 193 | $caps[] = $post_type->cap->edit_private_posts; |
| 184 | 194 | } |
| 185 | 195 | } |
| | 196 | |
| | 197 | /* |
| | 198 | * Editing the Privacy Policy page should require the same capability |
| | 199 | * as choosing which page is used. |
| | 200 | */ |
| | 201 | $privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); |
| | 202 | if ( $privacy_policy_page_id && ! empty( $args[0] ) && $privacy_policy_page_id === $args[0] ) { |
| | 203 | $caps[] = 'manage_privacy_options'; |
| | 204 | } |
| | 205 | |
| 186 | 206 | break; |
| 187 | 207 | case 'read_post': |
| 188 | 208 | case 'read_page': |