fixing data-filter to support hebrew

a friend of mine bought this plugin ” Final Tiles WordPress Gallery”

https://codecanyon.net/item/final-tiles-wordpress-gallery/5189351

there is a data-filter problem to show hebrew names as it dosen’t convert it as english with the – instead of space

so to fix it we eed to go to final-tiles-gallery/lib file name “gallery-class.php”

on line 232: instead of



static public function slugify($text)
{
$text = preg_replace('~[^\\pL\d]+~u', '-', $text);
$text = trim($text, '-');
if(function_exists("iconv"))
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
$text = strtolower($text);
$text = preg_replace('~[^-\w]+~', '', $text);

if (empty($text))
{
return 'n-a';
}

return $text;
}


replace it with



static public function slugify($text)
{
$text = trim($text, '-');
$text = strtolower($text);
$text = preg_replace('/[[:space:]]+/', '-', $text);

if (empty($text))
{
return 'n-a';
}

return $text;
}


and

Advertisements

Leave a Reply :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s