WordPress.org

Make WordPress Core

Changeset 43155


Ignore:
Timestamp:
05/03/2018 07:30:49 PM (3 years ago)
Author:
azaozz
Message:

Privacy: rename manage_privacy_policy to manage_privacy_options.

Props desrosj.
FIxes #43935.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/menu.php

    r43147 r43155  
    271271    $submenu['options-general.php'][30] = array( __( 'Media' ), 'manage_options', 'options-media.php' );
    272272    $submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' );
    273     $submenu['options-general.php'][45] = array( __( 'Privacy' ), 'manage_privacy_policy', 'privacy.php' );
     273    $submenu['options-general.php'][45] = array( __( 'Privacy' ), 'manage_privacy_options', 'privacy.php' );
    274274
    275275$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
  • trunk/src/wp-admin/privacy.php

    r43147 r43155  
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( ! current_user_can( 'manage_privacy_policy' ) ) {
     12if ( ! current_user_can( 'manage_privacy_options' ) ) {
    1313    wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) );
    1414}
     
    201201                    <input type="hidden" name="action" value="create-privacy-page" />
    202202                    <span>
    203                         <?php _e( 'Or create a new page:' ); ?> 
     203                        <?php _e( 'Or create a new page:' ); ?>
    204204                    </span>
    205205                    <?php
  • trunk/src/wp-includes/capabilities.php

    r43147 r43155  
    558558        case 'export_others_personal_data':
    559559        case 'erase_others_personal_data':
    560         case 'manage_privacy_policy':
     560        case 'manage_privacy_options':
    561561            $caps[] = is_multisite() ? 'manage_network' : 'manage_options';
    562562            break;
  • trunk/tests/phpunit/tests/user/capabilities.php

    r43147 r43155  
    240240            'export_others_personal_data' => array( 'administrator' ),
    241241            'erase_others_personal_data'  => array( 'administrator' ),
    242             'manage_privacy_policy'       => array( 'administrator' ),
     242            'manage_privacy_options'      => array( 'administrator' ),
    243243
    244244            'edit_categories'        => array( 'administrator', 'editor' ),
     
    275275            'export_others_personal_data' => array( '' ),
    276276            'erase_others_personal_data'  => array( '' ),
    277             'manage_privacy_policy'       => array(),
     277            'manage_privacy_options'       => array(),
    278278
    279279            'customize'              => array( 'administrator' ),
Note: See TracChangeset for help on using the changeset viewer.