Let Editors Edit the Privacy Policy Page
WordPress only lets administrators edit the privacy policy page. This allows editors to update it too.
Opens WPIDE on
Code
add_filter( 'map_meta_cap', function ( $caps, $cap, $user_id, $args ) {
if ( ! in_array( $cap, array( 'edit_post', 'edit_page', 'delete_post', 'delete_page' ), true ) || empty( $args[0] ) ) {
return $caps;
}
$privacy_page = (int) get_option( 'wp_page_for_privacy_policy' );
if ( $privacy_page && (int) $args[0] === $privacy_page && in_array( 'manage_privacy_options', $caps, true ) && user_can( $user_id, 'edit_others_pages' ) ) {
$caps = array_diff( $caps, array( 'manage_privacy_options' ) );
$caps[] = 'edit_others_pages';
}
return array_values( $caps );
}, 20, 4 );
Notes
The Settings > Privacy screen itself stays administrator-only.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.