mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Fix #491 no display of canonical URL on some pages
This commit is contained in:
parent
9fe37502b8
commit
3fbf94f630
3 changed files with 18 additions and 10 deletions
|
|
@ -97,6 +97,12 @@ class Context
|
|||
* @var array
|
||||
*/
|
||||
public $opengraph_metadata = array();
|
||||
|
||||
/**
|
||||
* Canonical URL
|
||||
* @var string
|
||||
*/
|
||||
public $canonical_url = '';
|
||||
|
||||
/**
|
||||
* path of Xpress Engine
|
||||
|
|
@ -2804,7 +2810,7 @@ class Context
|
|||
*/
|
||||
public static function setCanonicalURL($url)
|
||||
{
|
||||
self::addHtmlHeader(sprintf('<link rel="canonical" href="%s" />', escape($url)));
|
||||
self::$_instance->canonical_url = escape($url);
|
||||
}
|
||||
}
|
||||
/* End of file Context.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue