WordPress.org

Make WordPress Core

Ticket #33684: 33684.2.diff

File 33684.2.diff, 1.6 KB (added by kraftbj, 4 years ago)

add translation functions

  • src/wp-includes/class-wp-customize-manager.php

     
    218218                if ( is_admin() && ! $doing_ajax_or_is_customized ) {
    219219                        auth_redirect();
    220220                } elseif ( $doing_ajax_or_is_customized && ! is_user_logged_in() ) {
    221                         $this->wp_die( 0, 'You must be logged in to complete this action.' );
     221                        $this->wp_die( 0, __( 'You must be logged in to complete this action.' ) );
    222222                }
    223223
    224224                show_admin_bar( false );
    225225
    226226                if ( ! current_user_can( 'customize' ) ) {
    227                         $this->wp_die( -1, 'You are not allowed to customize the appearance of this site.' );
     227                        $this->wp_die( -1, __( 'You are not allowed to customize the appearance of this site.' ) );
    228228                }
    229229
    230230                $this->original_stylesheet = get_stylesheet();
     
    238238                        // If the requested theme is not the active theme and the user doesn't have the
    239239                        // switch_themes cap, bail.
    240240                        if ( ! current_user_can( 'switch_themes' ) ) {
    241                                 $this->wp_die( -1, 'You are not allowed to edit theme options on this site.' );
     241                                $this->wp_die( -1, __( 'You are not allowed to edit theme options on this site.' ) );
    242242                        }
    243243
    244244                        // If the theme has errors while loading, bail.
     
    248248
    249249                        // If the theme isn't allowed per multisite settings, bail.
    250250                        if ( ! $this->theme()->is_allowed() ) {
    251                                 $this->wp_die( -1, 'The requested theme does not exist.' );
     251                                $this->wp_die( -1, __( 'The requested theme does not exist.' ) );
    252252                        }
    253253                }
    254254