Ticket #43919: 43919.2.diff
File 43919.2.diff, 2.2 KB (added by , 6 years ago) |
---|
-
src/wp-admin/includes/user.php
789 789 wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy on this site.' ) ); 790 790 } 791 791 792 if ( ! apply_filters( 'wp_privacy_personal_data_export_enable', ! is_multisite() ) ) { 793 wp_die( esc_html__( 'Sorry, personal data export is disabled.' ) ); 794 } 795 792 796 _wp_personal_data_handle_actions(); 793 797 _wp_personal_data_cleanup_requests(); 794 798 … … 854 858 wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy on this site.' ) ); 855 859 } 856 860 861 if ( ! apply_filters( 'wp_privacy_personal_data_erasure_enable', ! is_multisite() ) ) { 862 wp_die( esc_html__( 'Sorry, personal data erasure is disabled.' ) ); 863 } 864 857 865 _wp_personal_data_handle_actions(); 858 866 _wp_personal_data_cleanup_requests(); 859 867 … … 917 925 * @access private 918 926 */ 919 927 function _wp_privacy_hook_requests_page() { 920 add_submenu_page( 'tools.php', __( 'Export Personal Data' ), __( 'Export Personal Data' ), 'manage_options', 'export_personal_data', '_wp_personal_data_export_page' ); 921 add_submenu_page( 'tools.php', __( 'Remove Personal Data' ), __( 'Remove Personal Data' ), 'manage_options', 'remove_personal_data', '_wp_personal_data_removal_page' ); 928 if ( apply_filters( 'wp_privacy_personal_data_export_enable', ! is_multisite() ) ) { 929 add_submenu_page( 'tools.php', __( 'Export Personal Data' ), __( 'Export Personal Data' ), 'manage_options', 'export_personal_data', '_wp_personal_data_export_page' ); 930 } 931 932 if ( apply_filters( 'wp_privacy_personal_data_erasure_enable', ! is_multisite() ) ) { 933 add_submenu_page( 'tools.php', __( 'Remove Personal Data' ), __( 'Remove Personal Data' ), 'manage_options', 'remove_personal_data', '_wp_personal_data_removal_page' ); 934 } 922 935 } 923 936 924 937 // TODO: move the following classes in new files. … … 1009 1022 } 1010 1023 1011 1024 $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} 1014 1027 WHERE post_type = %s 1015 1028 AND post_name = %s 1016 1029 GROUP BY post_status";