WordPress.org

Make WordPress Core

Ticket #44833: 44833-updated.diff

File 44833-updated.diff, 1006 bytes (added by mmuhsin, 3 years ago)

Updated error message with a consistent string.

  • src/wp-admin/includes/ajax-actions.php

     
    44524452        }
    44534453
    44544454        if ( ! current_user_can( 'export_others_personal_data' ) ) {
    4455                 wp_send_json_error( __( 'Invalid request.' ) );
     4455                wp_send_json_error( __( 'Sorry, you are not allowed to perform this action.' ) );
    44564456        }
    44574457
    44584458        check_ajax_referer( 'wp-privacy-export-personal-data-' . $request_id, 'security' );
     
    46344634
    46354635        // Both capabilities are required to avoid confusion, see `_wp_personal_data_removal_page()`.
    46364636        if ( ! current_user_can( 'erase_others_personal_data' ) || ! current_user_can( 'delete_users' ) ) {
    4637                 wp_send_json_error( __( 'Invalid request.' ) );
     4637                wp_send_json_error( __( 'Sorry, you are not allowed to perform this action.' ) );
    46384638        }
    46394639
    46404640        check_ajax_referer( 'wp-privacy-erase-personal-data-' . $request_id, 'security' );