diff --git wp-admin/network/settings.php wp-admin/network/settings.php
index 2a26b48..9f0cad2 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'] ) ) { |
| 474 | 476 | </tr> |
| 475 | 477 | </table> |
| 476 | 478 | |
| | 479 | <h2><?php _e( 'Privacy Settings' ); ?></h2> |
| | 480 | <table id="menu" class="form-table"> |
| | 481 | <tr> |
| | 482 | <th scope="row"><?php _e( 'Privacy policy permissions' ); ?></th> |
| | 483 | <?php |
| | 484 | if ( ! get_site_option( 'privacy_permissions' ) ) { |
| | 485 | update_site_option( 'privacy_permissions', 'super_admin' ); |
| | 486 | } |
| | 487 | $privacy_permissions = get_site_option( 'privacy_permissions' ); |
| | 488 | ?> |
| | 489 | <td> |
| | 490 | <fieldset> |
| | 491 | <legend class="screen-reader-text"><?php _e( 'Privacy policy permisisons' ); ?></legend> |
| | 492 | <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 /> |
| | 493 | <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 /> |
| | 494 | </fieldset> |
| | 495 | </td> |
| | 496 | </tr> |
| | 497 | </table> |
| | 498 | |
| 477 | 499 | <?php |
| 478 | 500 | /** |
| 479 | 501 | * Fires at the end of the Network Settings form, before the submit button. |
diff --git wp-includes/capabilities.php wp-includes/capabilities.php
index f48cb58..e142f4e 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. |