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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David Baumwald
2021-05-19 18:09:27 +00:00
parent 862452984e
commit 07ce792fd6
5 changed files with 7 additions and 7 deletions
@@ -208,7 +208,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
return false;
}
echo '<h2 class="update-from-upload-heading">' . esc_html( __( 'This plugin is already installed.' ) ) . '</h2>';
echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This plugin is already installed.' ) . '</h2>';
$this->is_downgrading = version_compare( $current_plugin_data['Version'], $new_plugin_data['Version'], '>' );
@@ -256,7 +256,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
$install_actions = array();
$can_update = true;
$blocked_message = '<p>' . esc_html( __( 'The plugin cannot be updated due to the following:' ) ) . '</p>';
$blocked_message = '<p>' . esc_html__( 'The plugin cannot be updated due to the following:' ) . '</p>';
$blocked_message .= '<ul class="ul-disc">';
$requires_php = isset( $new_plugin_data['RequiresPHP'] ) ? $new_plugin_data['RequiresPHP'] : null;
@@ -221,7 +221,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
return false;
}
echo '<h2 class="update-from-upload-heading">' . esc_html( __( 'This theme is already installed.' ) ) . '</h2>';
echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This theme is already installed.' ) . '</h2>';
// Check errors for current theme.
if ( is_wp_error( $current_theme_data->errors() ) ) {
@@ -291,7 +291,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
$install_actions = array();
$can_update = true;
$blocked_message = '<p>' . esc_html( __( 'The theme cannot be updated due to the following:' ) ) . '</p>';
$blocked_message = '<p>' . esc_html__( 'The theme cannot be updated due to the following:' ) . '</p>';
$blocked_message .= '<ul class="ul-disc">';
$requires_php = isset( $new_theme_data['RequiresPHP'] ) ? $new_theme_data['RequiresPHP'] : null;
@@ -236,7 +236,7 @@ class WP_Application_Passwords_List_Table extends WP_List_Table {
case 'revoke':
printf(
'<input type="submit" class="button delete" value="%1$s" aria-label="%2$s">',
esc_attr( __( 'Revoke' ) ),
esc_attr__( 'Revoke' ),
/* translators: %s: the application password's given name. */
esc_attr( sprintf( __( 'Revoke "%s"' ), '{{ data.name }}' ) )
);