コード例 #1
0
 /**
  * Add the custom sections used in our implementation of the page builder.
  */
 public function add_builder_sections()
 {
     ttfmake_add_section('wsuwpsingle', 'Single', get_template_directory_uri() . '/inc/builder/sections/css/images/blank.png', 'A single column layout.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 200, 'builder-templates/');
     ttfmake_add_section('wsuwphalves', 'Halves', get_template_directory_uri() . '/inc/builder-custom/images/halves.png', 'Two column layout with equal size columns.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 500, 'builder-templates/');
     ttfmake_add_section('wsuwpsidebarleft', 'Sidebar Left', get_template_directory_uri() . '/inc/builder-custom/images/side-left.png', 'Two column layout with the right side larger than the left.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 300, 'builder-templates/');
     ttfmake_add_section('wsuwpsidebarright', 'Sidebar Right', get_template_directory_uri() . '/inc/builder-custom/images/side-right.png', 'Two column layout with the left side larger than the right.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 400, 'builder-templates/');
     ttfmake_add_section('wsuwpthirds', 'Thirds', get_template_directory_uri() . '/inc/builder-custom/images/thirds.png', 'Three column layout, choose between thirds and triptych.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 600, 'builder-templates');
     ttfmake_add_section('wsuwpquarters', 'Quarters', get_template_directory_uri() . '/inc/builder-custom/images/quarters.png', 'Four column layout, all equal sizes.', array($this, 'save_columns'), 'admin/columns', 'front-end/columns', 700, 'builder-templates');
     ttfmake_add_section('wsuwpheader', 'H1 Header', get_template_directory_uri() . '/inc/builder-custom/images/h1.png', 'An H1 element to provide a page title or other top level header.', array($this, 'save_header'), 'admin/h1-header', 'front-end/h1-header', 100, 'builder-templates');
     ttfmake_add_section('banner', _x('Banner', 'section name', 'make'), get_template_directory_uri() . '/inc/builder/sections/css/images/banner.png', __('Display multiple types of content in a banner or a slider.', 'make'), array($this, 'save_banner'), 'admin/banner', 'front-end/banner', 800, 'builder-templates');
 }
コード例 #2
0
 /**
  * Register the gallery section.
  *
  * @since  1.0.0.
  *
  * @return void
  */
 public function register_gallery_section()
 {
     ttfmake_add_section('gallery', _x('Gallery', 'section name', 'make'), get_template_directory_uri() . '/inc/builder/sections/css/images/gallery.png', __('Display your images in various grid combinations.', 'make'), array($this, 'save_gallery'), 'sections/builder-templates/gallery', 'sections/front-end-templates/gallery', 400, 'inc/builder/');
 }
コード例 #3
0
 /**
  * Register the gallery section.
  *
  * @since  1.0.0.
  *
  * @return void
  */
 public function register_gallery_section()
 {
     ttfmake_add_section('gallery', _x('Gallery', 'section name', 'make'), get_template_directory_uri() . '/inc/builder/sections/css/images/gallery.png', __('Display your images in various grid combinations.', 'make'), array($this, 'save_gallery'), 'sections/builder-templates/gallery', 'sections/front-end-templates/gallery', 400, 'inc/builder/', array(100 => array('type' => 'section_title', 'name' => 'title', 'label' => __('Enter section title', 'make'), 'class' => 'ttfmake-configuration-title ttfmake-section-header-title-input'), 200 => array('type' => 'select', 'name' => 'columns', 'label' => __('Columns', 'make'), 'class' => 'ttfmake-gallery-columns', 'default' => 3, 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4)), 300 => array('type' => 'select', 'name' => 'aspect', 'label' => __('Aspect ratio', 'make'), 'default' => 'square', 'options' => array('square' => __('Square', 'make'), 'landscape' => __('Landscape', 'make'), 'portrait' => __('Portrait', 'make'), 'none' => __('None', 'make'))), 400 => array('type' => 'select', 'name' => 'captions', 'label' => __('Caption style', 'make'), 'default' => 'reveal', 'options' => array('reveal' => __('Reveal', 'make'), 'overlay' => __('Overlay', 'make'), 'none' => __('None', 'make'))), 500 => array('type' => 'select', 'name' => 'caption-color', 'label' => __('Caption color', 'make'), 'default' => 'light', 'options' => array('light' => __('Light', 'make'), 'dark' => __('Dark', 'make'))), 600 => array('type' => 'image', 'name' => 'background-image', 'label' => __('Background image', 'make'), 'class' => 'ttfmake-configuration-media'), 700 => array('type' => 'checkbox', 'label' => __('Darken background to improve readability', 'make'), 'name' => 'darken', 'default' => 0), 800 => array('type' => 'select', 'name' => 'background-style', 'label' => __('Background style', 'make'), 'default' => 'tile', 'options' => array('tile' => __('Tile', 'make'), 'cover' => __('Cover', 'make'))), 900 => array('type' => 'color', 'label' => __('Background color', 'make'), 'name' => 'background-color', 'class' => 'ttfmake-gallery-background-color ttfmake-configuration-color-picker', 'default' => '')));
 }