mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-24 21:32:51 +02:00
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
This commit is contained in:
parent
20d3238eaa
commit
85281d1da3
@ -479,7 +479,15 @@ if ( isset( $_GET['error'] ) ) :
|
|||||||
if ( isset( $_GET['main'] ) ) {
|
if ( isset( $_GET['main'] ) ) {
|
||||||
$errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
|
$errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
|
||||||
} elseif ( isset( $_GET['charsout'] ) ) {
|
} elseif ( isset( $_GET['charsout'] ) ) {
|
||||||
$errmsg = sprintf( __( 'The plugin generated %d characters of <strong>unexpected output</strong> 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 <strong>unexpected output</strong> during activation.',
|
||||||
|
'The plugin generated %d characters of <strong>unexpected output</strong> 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 {
|
} else {
|
||||||
$errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
|
$errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user