1

Topic: [Resolved] preg_replace( ... chunk_split(...)...) problem

Have to say that i love the plugin and the flexibility it offers ...but

there's a small but annoying bug with the line:

$text = preg_replace('#(\S{' . $chunk . ',})#eiu', "chunk_split('$1', $chunk, ' ')", $text);

in the function trim_comment_excerpt() ( in class-bwp-recent-comments.php )

it sets the $text to an empty string if there's a strange character in $text ... even when there's no long word in there (i've only been using the irish french characters á, ó, é so i don't know the extent of the problem)

the work around is to set the option "With long words, this plugin should" to "Let the style handle the overflow", but it was kinda annoying until i tracked down the problem.

sorry, but i'm not good enough to know the most elegant solution at the minute sad

2

Re: [Resolved] preg_replace( ... chunk_split(...)...) problem

Hi, thank you for using BWP RC. This is actually a limitation of the function used to split long words (chunk_split). I'm working on a new version of this plugin and it should be released next week (with this issue fixed, of course) smile.

http://betterwp.net/ - A Better WordPress world for everyone!
Useful links: Forum Rules | WordPress Plugins | WordPress Tips | In-depth WordPress Tutorials