mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
Support custom delimiter in Context::addBrowserTitle() and Context::prependBrowserTitle()
This commit is contained in:
parent
a2160d8787
commit
e54c50e39f
1 changed files with 6 additions and 4 deletions
|
|
@ -719,9 +719,10 @@ class Context
|
|||
* Append string to browser title
|
||||
*
|
||||
* @param string $title Browser title to be appended
|
||||
* @param string $delimiter
|
||||
* @return void
|
||||
*/
|
||||
public static function addBrowserTitle($title)
|
||||
public static function addBrowserTitle($title, $delimiter = ' - ')
|
||||
{
|
||||
if(!$title)
|
||||
{
|
||||
|
|
@ -729,7 +730,7 @@ class Context
|
|||
}
|
||||
if(self::$_instance->browser_title)
|
||||
{
|
||||
self::$_instance->browser_title .= ' - ' . $title;
|
||||
self::$_instance->browser_title .= $delimiter . $title;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -741,9 +742,10 @@ class Context
|
|||
* Prepend string to browser title
|
||||
*
|
||||
* @param string $title Browser title to be prepended
|
||||
* @param string $delimiter
|
||||
* @return void
|
||||
*/
|
||||
public static function prependBrowserTitle($title)
|
||||
public static function prependBrowserTitle($title, $delimiter = ' - ')
|
||||
{
|
||||
if(!$title)
|
||||
{
|
||||
|
|
@ -751,7 +753,7 @@ class Context
|
|||
}
|
||||
if(self::$_instance->browser_title)
|
||||
{
|
||||
self::$_instance->browser_title = $title . ' - ' . self::$_instance->browser_title;
|
||||
self::$_instance->browser_title = $title . $delimiter . self::$_instance->browser_title;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue