Example #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());
 }
Example #2
0
 /**
  * Add featured label and label before blog
  */
 public function blog_labels()
 {
     global $photolab_first_sticky, $photolab_first_post, $wp_query;
     if (is_sticky() && $photolab_first_sticky) {
         return;
     } elseif (!is_sticky() && $photolab_first_post) {
         return;
     } elseif (is_sticky()) {
         $photolab_first_sticky = get_the_id();
         $label = Misc_Model::get_featured_label();
         if ($wp_query->is_home() && $wp_query->is_main_query()) {
             if ($wp_query->is_paged && $wp_query->query['paged'] > 1) {
                 return;
             }
             if ($label) {
                 echo View::make('blocks/blog-labels', array('label' => $label));
             }
         }
     } else {
         $photolab_first_post = get_the_id();
         $label = Misc_Model::get_blog_label();
         if ($wp_query->is_home() && $wp_query->is_main_query()) {
             if ($wp_query->is_paged && $wp_query->query['paged'] > 1) {
                 return;
             }
             if ($label) {
                 echo View::make('blocks/blog-labels', array('label' => $label));
             }
         }
     }
 }