예제 #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
<?php

/**
 * Install all sidebars
 *
 * @package photolab
 */
$config_sidebars = array(array('name' => __('Sidebar', 'photolab'), 'id' => 'sidebar-1', 'description' => __('Allowed only on static pages', 'photolab'), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'), array('name' => __('Sidebar second', 'photolab'), 'id' => 'sidebar-2', 'description' => __('Allowed only on static pages', 'photolab'), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'), array('name' => __('Footer Widget Area', 'photolab'), 'id' => 'footer', 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s ' . Footer_Settings_Model::get_columns_css_class() . ' col-sm-6">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
return Utils::array_push_values($config_sidebars, Sidebar_Settings_Model::get_sidebars_options());
예제 #3
0
<?php

/**
 *
 * Template Name: Page with right sidebar
 *
 * @package photolab
 */
echo View::make('pages/page', array('sidebar_right' => Sidebar_Settings_Model::get_mode_right(), 'breadcrumbs' => General_Site_Settings_Model::breadcrumbs(), 'sidebar_side_type' => 'right'));
예제 #4
0
 /**
  * Render Meta Box content.
  *
  * @param WP_Post $post The post object.
  */
 public function render_meta_box_content($post)
 {
     // Add an nonce field so we can check for it later.
     wp_nonce_field('sidebars', 'sidebars_nonce');
     echo View::make('blocks/sidebars-metabox', array('left_select' => View::make('blocks/select', array('current_value' => self::get_sidebar_left($post->ID), 'attributes' => Utils::array_join(array('name' => 'sidebar_left', 'id' => 'sidebar_left')), 'values' => Sidebar_Settings_Model::get_sidebars_for_select())), 'right_select' => View::make('blocks/select', array('current_value' => self::get_sidebar_right($post->ID), 'attributes' => Utils::array_join(array('name' => 'sidebar_right', 'id' => 'sidebar_right')), 'values' => Sidebar_Settings_Model::get_sidebars_for_select()))));
 }