WordPress.org

Make WordPress Core

Ticket #43919: 43919.diff

File 43919.diff, 1.6 KB (added by allendav, 3 years ago)

Do not add erasure and export menu items and short circuit erasure and export pages on multisite installs

  • src/wp-admin/includes/user.php

     
    789789                wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy on this site.' ) );
    790790        }
    791791
     792        if ( is_multisite() ) {
     793                wp_die( esc_html__( 'Sorry, personal data export is not yet supported on multisite.' ) );
     794        }
     795
    792796        _wp_personal_data_handle_actions();
    793797        _wp_personal_data_cleanup_requests();
    794798
     
    854858                wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy on this site.' ) );
    855859        }
    856860
     861        if ( is_multisite() ) {
     862                wp_die( esc_html__( 'Sorry, personal data erasure is not yet supported on multisite.' ) );
     863        }
     864
    857865        _wp_personal_data_handle_actions();
    858866        _wp_personal_data_cleanup_requests();
    859867
     
    917925 * @access private
    918926 */
    919927function _wp_privacy_hook_requests_page() {
     928
     929        if ( is_multisite() ) {
     930                return;
     931        }
     932
    920933        add_submenu_page( 'tools.php', __( 'Export Personal Data' ), __( 'Export Personal Data' ), 'manage_options', 'export_personal_data', '_wp_personal_data_export_page' );
    921934        add_submenu_page( 'tools.php', __( 'Remove Personal Data' ), __( 'Remove Personal Data' ), 'manage_options', 'remove_personal_data', '_wp_personal_data_removal_page' );
    922935}
     
    10091022                }
    10101023
    10111024                $query = "
    1012                         SELECT post_status, COUNT( * ) AS num_posts 
    1013                         FROM {$wpdb->posts} 
     1025                        SELECT post_status, COUNT( * ) AS num_posts
     1026                        FROM {$wpdb->posts}
    10141027                        WHERE post_type = %s
    10151028                        AND post_name = %s
    10161029                        GROUP BY post_status";