From c079d1d39b132ea4fd039a5803e91797e2ce10e1 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 24 Jan 2019 11:16:25 -0500 Subject: [PATCH 1/2] i18n: Use placeholder for minimum WordPress version notice --- gutenberg.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gutenberg.php b/gutenberg.php index 7e019de8b8a252..5a5f3a74fcb81b 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -146,7 +146,8 @@ function is_gutenberg_page() { */ function gutenberg_wordpress_version_notice() { echo '

'; - _e( 'Gutenberg requires WordPress 5.0.0 or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ); + /* translators: %s: Minimum required version */ + echo sprintf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.0.0' ); echo '

'; deactivate_plugins( array( 'gutenberg/gutenberg.php' ) ); From e996e57a1fee7a06d1158fec8ad555158ba2bc92 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 24 Jan 2019 11:46:15 -0500 Subject: [PATCH 2/2] Collapse echo sprintf to printf Co-Authored-By: aduth --- gutenberg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg.php b/gutenberg.php index 5a5f3a74fcb81b..902e76675851b8 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -147,7 +147,7 @@ function is_gutenberg_page() { function gutenberg_wordpress_version_notice() { echo '

'; /* translators: %s: Minimum required version */ - echo sprintf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.0.0' ); + printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.0.0' ); echo '

'; deactivate_plugins( array( 'gutenberg/gutenberg.php' ) );