示例#1
0
 /**
  * Main data for view
  *
  * @return array
  */
 public static function main()
 {
     return array('TDU' => get_template_directory_uri(), 'search_form' => View::make('blocks/search-form'), 'sidebar_side_type' => Sidebar_Settings_Model::get_sidebar_side_type(), 'wp_query' => Utils::array_get($GLOBALS, 'wp_query', null), 'post' => Utils::array_get($GLOBALS, 'post', null), 'blog_layout_style' => Blog_Settings_Model::get_layout_style(), 'blog_content' => Misc_Model::get_blog_content(), 'read_more_button' => Misc_Model::get_blog_button(), 'columns_count' => Blog_Settings_Model::get_columns(), 'column_css_class' => Blog_Settings_Model::get_column_css_class(), 'category_list' => get_the_category_list(__(', ', 'photolab')), 'tag_list' => get_the_tag_list('', __(', ', 'photolab')), 'archive_list' => wp_get_archives(array('type' => 'monthly', 'echo' => false)), 'wp_register' => wp_register('<li>', '</li>', false), 'wp_loginout' => wp_loginout('', false), 'wp_meta' => Utils::echo_to_var(array(__CLASS__, 'wp_meta')), 'is_show_title_on_header' => Header_Settings_Model::is_show_title_on_header());
 }
示例#2
0
 /**
  * Get header css classes
  *
  * @return string css classes
  */
 public static function get_header_class()
 {
     $classes = array('page-header', 'header-type-' . rand(1, 8));
     if (!Header_Settings_Model::is_show_title_on_header()) {
         array_push($classes, 'invisibility');
     }
     if (has_post_thumbnail() or get_header_image()) {
         array_push($classes, 'with-img');
     }
     return implode(' ', $classes);
 }