From 7df18f4a690f8c09c21aa86e6dc6dcc5590944d3 Mon Sep 17 00:00:00 2001 From: Eduardo Pittol Date: Mon, 28 Oct 2024 11:09:59 -0300 Subject: [PATCH] Fix l10n import/export tool buttons actions --- admin/views/tool-import-export.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/views/tool-import-export.php b/admin/views/tool-import-export.php index d2e0fd84866..4ee8a3bfb4f 100644 --- a/admin/views/tool-import-export.php +++ b/admin/views/tool-import-export.php @@ -21,7 +21,7 @@ * Yoast SEO that we can import stuff for that plugin. */ // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable so no need to sanitize. -if ( isset( $_POST['import_external'] ) && wp_unslash( $_POST['import_external'] ) === 'Import' ) { +if ( isset( $_POST['import_external'] ) && wp_unslash( $_POST['import_external'] ) === __( 'Import', 'wordpress-seo' ) ) { check_admin_referer( 'wpseo-import-plugins' ); if ( isset( $_POST['import_external_plugin'] ) && is_string( $_POST['import_external_plugin'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are using the variable as a class name. @@ -32,7 +32,7 @@ } } // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable so no need to sanitize. -elseif ( isset( $_POST['clean_external'] ) && wp_unslash( $_POST['clean_external'] ) === 'Clean up' ) { +elseif ( isset( $_POST['clean_external'] ) && wp_unslash( $_POST['clean_external'] ) === __( 'Clean up', 'wordpress-seo' ) ) { check_admin_referer( 'wpseo-clean-plugins' ); if ( isset( $_POST['clean_external_plugin'] ) && is_string( $_POST['clean_external_plugin'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are using the variable as a class name.