WordPress.org

Make WordPress Core

Changeset 45050


Ignore:
Timestamp:
03/28/2019 03:10:24 PM (8 months ago)
Author:
SergeyBiryukov
Message:

Site Health: Use a consistent wording and response code for capability checks.

Props mukesh27 for initial patch.
Fixes #46691.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-health-info.php

    r45044 r45050  
    1111
    1212if ( ! current_user_can( 'install_plugins' ) ) {
    13     wp_die( __( 'Sorry, you do not have permission to access the debug data.' ), '', array( 'reponse' => 401 ) );
     13    wp_die( __( 'Sorry, you are not allowed to access the debug data.' ), '', 403 );
    1414}
    1515
  • trunk/src/wp-admin/site-health.php

    r45049 r45050  
    1616
    1717if ( ! current_user_can( 'install_plugins' ) ) {
    18     wp_die( __( 'Sorry, you do not have permission to access site health information.' ), '', array( 'reponse' => 401 ) );
     18    wp_die( __( 'Sorry, you are not allowed to access site health information.' ), '', 403 );
    1919}
    2020
Note: See TracChangeset for help on using the changeset viewer.