diff --git src/wp-admin/network/settings.php src/wp-admin/network/settings.php
index d03f36d..9ca545e 100644
|
|
if ( $_POST ) { |
75 | 75 | 'registrationnotification' => 'no', |
76 | 76 | 'upload_space_check_disabled' => 1, |
77 | 77 | 'add_new_users' => 0, |
| 78 | 'privacy_permissions' => 1, |
78 | 79 | ); |
79 | 80 | foreach ( $checked_options as $option_name => $option_unchecked_value ) { |
80 | 81 | if ( ! isset( $_POST[ $option_name ] ) ) { |
… |
… |
if ( $_POST ) { |
106 | 107 | 'WPLANG', |
107 | 108 | 'new_admin_email', |
108 | 109 | 'first_comment_email', |
| 110 | 'privacy_permissions', |
109 | 111 | ); |
110 | 112 | |
111 | 113 | // Handle translation installation. |
… |
… |
if ( isset( $_GET['updated'] ) ) { |
491 | 493 | endif; |
492 | 494 | ?> |
493 | 495 | |
| 496 | <h2><?php _e( 'Privacy Settings' ); ?></h2> |
| 497 | <table id="menu" class="form-table"> |
| 498 | <tr> |
| 499 | <th scope="row"><?php _e( 'Privacy policy permissions' ); ?></th> |
| 500 | <?php |
| 501 | if ( ! get_site_option( 'privacy_permissions' ) ) { |
| 502 | update_site_option( 'privacy_permissions', 'super_admin' ); |
| 503 | } |
| 504 | $privacy_permissions = get_site_option( 'privacy_permissions' ); |
| 505 | ?> |
| 506 | <td> |
| 507 | <fieldset> |
| 508 | <legend class="screen-reader-text"><?php _e( 'Privacy policy permisisons' ); ?></legend> |
| 509 | <label><input name="privacy_permissions" type="radio" id="privacy-super-admins" value="super_admin"<?php checked( $privacy_permissions, "super_admin" ); ?> /> <?php _e( 'Only allow Super Admins to edit the privacy policy page' ); ?></label><br /> |
| 510 | <label><input name="privacy_permissions" type="radio" id="privacy-admins" value="admin"<?php checked( $privacy_permissions, "admin" ); ?> /> <?php _e( 'Admins can edit their own sites\'s privacy policy page'); ?></label><br /> |
| 511 | </fieldset> |
| 512 | </td> |
| 513 | </tr> |
| 514 | </table> |
| 515 | |
494 | 516 | <?php |
495 | 517 | /** |
496 | 518 | * Fires at the end of the Network Settings form, before the submit button. |
diff --git src/wp-includes/capabilities.php src/wp-includes/capabilities.php
index e3c28a1..19ee735 100644
|
|
function map_meta_cap( $cap, $user_id, ...$args ) { |
583 | 583 | case 'export_others_personal_data': |
584 | 584 | case 'erase_others_personal_data': |
585 | 585 | case 'manage_privacy_options': |
586 | | $caps[] = is_multisite() ? 'manage_network' : 'manage_options'; |
| 586 | if (is_multisite() && get_site_option( 'privacy_permissions' ) == "admin" && 'manage_options'){ |
| 587 | $caps[] = 'manage_options'; |
| 588 | } elseif ( is_multisite() ){ |
| 589 | $caps[] = 'manage_network'; |
| 590 | } else { |
| 591 | $caps[] = 'manage_options'; |
| 592 | } |
587 | 593 | break; |
588 | 594 | default: |
589 | 595 | // Handle meta capabilities for custom post types. |