本文整理匯總了PHP中seo::keywords方法的典型用法代碼示例。如果您正苦於以下問題:PHP seo::keywords方法的具體用法?PHP seo::keywords怎麽用?PHP seo::keywords使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類seo
的用法示例。
在下文中一共展示了seo::keywords方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: after
/**
* Fill in default values for our properties before rendering the output.
*/
public function after()
{
parent::after();
if ($this->auto_render === TRUE) {
// Add custom CSS if enabld and front controller
if (is_subclass_of($this, 'Auth_Controller') === FALSE and ($custom_css = Theme::get_custom_css()) !== FALSE) {
Theme::$styles = array_merge(Theme::$styles, array($custom_css => 'screen'));
}
//cookie consent
if (Core::config('general.cookie_consent') == 1) {
Theme::$styles = array_merge(Theme::$styles, array('css/jquery.cookiebar.css' => 'screen'));
$this->template->scripts['footer'][] = 'js/jquery.cookiebar.js';
$this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'cookieconsent'));
}
//adblock detection
if (Core::config('general.adblock') == 1) {
Theme::$styles = array_merge(Theme::$styles, array('css/adi.js/jquery.adi.css' => 'screen'));
Theme::$scripts['footer'][] = 'js/advertisement.js';
Theme::$scripts['footer'][] = 'js/jquery.adi.js';
$this->template->scripts['footer'][] = Route::url('default', array('controller' => 'jslocalization', 'action' => 'adi'));
}
// Add defaults to template variables.
$this->template->styles = array_merge_recursive(Theme::$styles, $this->template->styles);
$this->template->scripts = array_reverse(array_merge_recursive(Theme::$scripts, $this->template->scripts));
//in case theres no description given
if ($this->template->meta_description == '') {
$this->template->meta_description = $this->template->title;
}
//title concatenate the site name
if ($this->template->title != '') {
$this->template->title .= ' - ';
}
$this->template->title .= core::config('general.site_name');
//auto generate keywords and description from content
seo::$charset = Kohana::$charset;
$this->template->title = seo::text($this->template->title, 70);
//not meta keywords given
//remember keywords are useless :( http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html
if ($this->template->meta_keywords == '') {
$this->template->meta_keywords = seo::keywords($this->template->meta_description);
}
$this->template->meta_description = seo::text($this->template->meta_description);
}
$this->response->body($this->template->render());
}