WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Yet Another Related Posts Plugin] Bug in YARP 2.1.2

[Plugin: Yet Another Related Posts Plugin] Bug in YARP 2.1.2

  • Latest version of YARPP 2.1.2 works incorrectly on blogs with non ascii characters (foe ex. russian utf-8). Related posts are added to the rss feed only if a post contains english words.

    You should make some changes in ‘yarpp_extract_keywords’ function located in ‘keywords.php’ source file .

    Old code:

    if (function_exists('mb_split'))
    		$wordlist = mb_split('\s*[^\w]+\s*', strtolower($source));
    	else
    		$wordlist = split('\s*[^\w]+\s*', strtolower($source));

    New code:

    if (function_exists('mb_split'))
    	{
    		mb_regex_encoding(get_option('blog_charset'));
    		$wordlist = mb_split('\s*\W+\s*', strtolower($source));
    	}
    	else
    		$wordlist = split('\s*\W+\s*', strtolower($source));
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] Bug in YARP 2.1.2’ is closed to new replies.
Skip to toolbar