Make WordPress Core

Ticket #34521: pemission-messages-on-wp-includes.patch

File pemission-messages-on-wp-includes.patch, 2.2 KB (added by ramiy, 8 years ago)
  • wp-includes/rest-api/class-wp-rest-server.php

     
    812812                                                if ( is_wp_error( $permission ) ) {
    813813                                                        $response = $permission;
    814814                                                } else if ( false === $permission || null === $permission ) {
    815                                                         $response = new WP_Error( 'rest_forbidden', __( "You don't have permission to do this." ), array( 'status' => 403 ) );
     815                                                        $response = new WP_Error( 'rest_forbidden', __( 'You are not allowed to do this.' ), array( 'status' => 403 ) );
    816816                                                }
    817817                                        }
    818818                                }
  • wp-includes/revision.php

     
    523523                $id = (int) $_GET['preview_id'];
    524524
    525525                if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
    526                         wp_die( __('You do not have permission to preview drafts.') );
     526                        wp_die( __( 'You are not allowed to preview drafts.' ) );
    527527
    528528                add_filter('the_preview', '_set_preview');
    529529        }
  • wp-includes/script-loader.php

     
    129129
    130130        $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
    131131        did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
    132                 'noPerm' => __('You do not have permission to do that.'),
     132                'noPerm' => __('You are not allowed to do that.'),
    133133                'broken' => __('An unidentified error has occurred.')
    134134        ) );
    135135
     
    476476        if ( is_admin() ) {
    477477                $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
    478478                did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
    479                         'noPerm' => __('You do not have permission to do that.'),
     479                        'noPerm' => __('You are not allowed to do that.'),
    480480                        'broken' => __('An unidentified error has occurred.')
    481481                ));
    482482