예제 #1
0
 /**
  * get HTML page header depending on current required files meta
  * and dojo required components
  * 
  * @return string header tag contents (without the header tag itself)
  */
 function theme_head()
 {
     $CI =& get_instance();
     $head = theme_meta() . theme_title() . theme_css();
     if (!$CI->config->item('js_at_foot')) {
         $head .= theme_js() . theme_dojo();
     }
     return $head;
 }
예제 #2
0
파일: Theme.php 프로젝트: linhntaim/katniss
 /**
  * @param string|array $titles
  * @param string $separator
  * @return string
  */
 public function title($titles = '', $use_root = true, $separator = '»')
 {
     if (!empty($titles)) {
         $separator = ' ' . trim($separator) . ' ';
         $titles = (array) $titles;
         if ($use_root) {
             array_unshift($titles, $this->titleRoot);
         }
         $this->title = implode($separator, $titles);
         add_filter('open_graph_tags_before_render', new CallableObject(function ($data) {
             $data['og:title'] = theme_title();
             return $data;
         }));
     }
     return $this->title;
 }