WordPress.org

Make WordPress Core

Changeset 48534


Ignore:
Timestamp:
07/21/2020 02:40:43 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off.

Props ramiy.
Fixes #50721.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r48475 r48534  
    53255325        case 'plugin':
    53265326            if ( ! current_user_can( 'update_plugins' ) ) {
    5327                 $error_message = __( 'You do not have permission to modify plugins.' );
     5327                $error_message = __( 'Sorry, you are not allowed to modify plugins.' );
    53285328                wp_send_json_error( array( 'error' => $error_message ) );
    53295329            }
     
    53355335        case 'theme':
    53365336            if ( ! current_user_can( 'update_themes' ) ) {
    5337                 $error_message = __( 'You do not have permission to modify themes.' );
     5337                $error_message = __( 'Sorry, you are not allowed to modify themes.' );
    53385338                wp_send_json_error( array( 'error' => $error_message ) );
    53395339            }
Note: See TracChangeset for help on using the changeset viewer.