From 85281d1da3f5b128208f065961622d2080f53290 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 2 Oct 2018 19:30:23 +0000 Subject: [PATCH] Plugins: Pluralise the "unexpected output during activation" message. When a plugin is activated, it can trigger a warning message if it outputs data at that time. This error message was being run through `__()`, instead of `_n()`, so it wasn't possible to correctly pluralise the message. Props jamosova. Fixes #42355. Built from https://develop.svn.wordpress.org/trunk@43667 git-svn-id: http://core.svn.wordpress.org/trunk@43496 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 10 +++++++++- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 4d8c797b04..c80e96831f 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -479,7 +479,15 @@ if ( isset( $_GET['error'] ) ) : if ( isset( $_GET['main'] ) ) { $errmsg = __( 'You cannot delete a plugin while it is active on the main site.' ); } elseif ( isset( $_GET['charsout'] ) ) { - $errmsg = sprintf( __( 'The plugin generated %d characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), $_GET['charsout'] ); + $errmsg = sprintf( + _n( + 'The plugin generated %d character of unexpected output during activation.', + 'The plugin generated %d characters of unexpected output during activation.', + $_GET['charsout'] + ), + $_GET['charsout'] + ); + $errmsg .= ' ' . __( 'If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ); } else { $errmsg = __( 'Plugin could not be activated because it triggered a fatal error.' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3a9aa7df00..dc7f2fad74 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43666'; +$wp_version = '5.0-alpha-43667'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.