that is for non-admin users.
adding ampty string as 4th argument, fixed issue:
... 'https://akismet.com/wordpress/', number_format_i18n( $count,0 ), '');
I’m unable to reproduce this, running WordPress 5.8.1, Akismet 4.1.12, and PHP 8, and looking at the code, I wouldn’t expect to:
$intro = sprintf( _n(
'<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ',
'<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ',
$count
, 'akismet'), 'https://akismet.com/wordpress/', number_format_i18n( $count ) );
sprintf()
should only need a total of three arguments: the format string and two values, since there are two placeholders (%1$s and %2$s).
Is it possible that another plugin you’re running is interfering and modifying the format string via a filter? Or have you manually changed the strings being supplied to _n()
?
I know, but somehow attributed error got to this line and adding that empty string, fixed.
As admin used I do not see such issue, only with lower rights (second user).
Would you mind posting the five lines above line 361 from your copy of class.akismet-admin.php?
sure: full if/else block
if ( $count = get_option('akismet_spam_count') ) {
$intro = sprintf(
_n(
'<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ',
'<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ',
$count,
'akismet'
),
'https://akismet.com/wordpress/',
number_format_i18n( $count,0 ),
'');
} else {
$intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. ', 'akismet'), 'https://akismet.com/wordpress/' );
}