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. git-svn-id: https://develop.svn.wordpress.org/trunk@43667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
456e243224
commit
53264d2463
@ -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 <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 {
|
||||
$errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user