mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Automatically remove extra hyphens in SEO title
This commit is contained in:
parent
fc86ae24de
commit
18fb48e457
1 changed files with 3 additions and 2 deletions
|
|
@ -773,9 +773,10 @@ class Context
|
|||
}
|
||||
if (count($vars))
|
||||
{
|
||||
$title = trim(trim(preg_replace_callback('/\\$(\w+)/', function($matches) use($vars) {
|
||||
$title = trim(preg_replace_callback('/\\$(\w+)/', function($matches) use($vars) {
|
||||
return isset($vars[strtolower($matches[1])]) ? $vars[strtolower($matches[1])] : $matches[0];
|
||||
}, $title), ' -'));
|
||||
}, $title));
|
||||
$title = preg_replace('/(-\s+)+-/', '-', trim($title, ' -'));
|
||||
}
|
||||
self::$_instance->browser_title = $title;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue