WordPress.org

Make WordPress Core

Changeset 50931


Ignore:
Timestamp:
05/19/2021 06:09:27 PM (4 months ago)
Author:
davidbaumwald
Message:

I18N: Combine escaping and translation functions.

There are a few instances where two separate functions are used for both escaping and translating output. This change combines the two functions into the appropriate Core helper function.

Props dimadin, SergeyBiryukov.
Fixes #53153.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/customize.php

    r48420 r50931  
    243243
    244244        <div id="customize-footer-actions" class="wp-full-overlay-footer">
    245             <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr( _x( 'Hide Controls', 'label for hide controls button without length constraints' ) ); ?>">
     245            <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr_x( 'Hide Controls', 'label for hide controls button without length constraints' ); ?>">
    246246                <span class="collapse-sidebar-arrow"></span>
    247247                <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span>
  • trunk/src/wp-admin/includes/class-plugin-installer-skin.php

    r50705 r50931  
    209209        }
    210210
    211         echo '<h2 class="update-from-upload-heading">' . esc_html( __( 'This plugin is already installed.' ) ) . '</h2>';
     211        echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This plugin is already installed.' ) . '</h2>';
    212212
    213213        $this->is_downgrading = version_compare( $current_plugin_data['Version'], $new_plugin_data['Version'], '>' );
     
    257257        $can_update      = true;
    258258
    259         $blocked_message  = '<p>' . esc_html( __( 'The plugin cannot be updated due to the following:' ) ) . '</p>';
     259        $blocked_message  = '<p>' . esc_html__( 'The plugin cannot be updated due to the following:' ) . '</p>';
    260260        $blocked_message .= '<ul class="ul-disc">';
    261261
  • trunk/src/wp-admin/includes/class-theme-installer-skin.php

    r50705 r50931  
    222222        }
    223223
    224         echo '<h2 class="update-from-upload-heading">' . esc_html( __( 'This theme is already installed.' ) ) . '</h2>';
     224        echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This theme is already installed.' ) . '</h2>';
    225225
    226226        // Check errors for current theme.
     
    292292        $can_update      = true;
    293293
    294         $blocked_message  = '<p>' . esc_html( __( 'The theme cannot be updated due to the following:' ) ) . '</p>';
     294        $blocked_message  = '<p>' . esc_html__( 'The theme cannot be updated due to the following:' ) . '</p>';
    295295        $blocked_message .= '<ul class="ul-disc">';
    296296
  • trunk/src/wp-admin/includes/class-wp-application-passwords-list-table.php

    r49746 r50931  
    237237                    printf(
    238238                        '<input type="submit" class="button delete" value="%1$s" aria-label="%2$s">',
    239                         esc_attr( __( 'Revoke' ) ),
     239                        esc_attr__( 'Revoke' ),
    240240                        /* translators: %s: the application password's given name. */
    241241                        esc_attr( sprintf( __( 'Revoke "%s"' ), '{{ data.name }}' ) )
  • trunk/src/wp-admin/nav-menus.php

    r49283 r50931  
    664664?>
    665665<div class="wrap">
    666     <h1 class="wp-heading-inline"><?php echo esc_html( __( 'Menus' ) ); ?></h1>
     666    <h1 class="wp-heading-inline"><?php esc_html_e( 'Menus' ); ?></h1>
    667667    <?php
    668668    if ( current_user_can( 'customize' ) ) :
Note: See TracChangeset for help on using the changeset viewer.