function register() { // Init Post Type $post = new SpyropressCustomPostType('Page'); $menus = wp_get_nav_menus(); $menu_options = array(); if (isset($menus) && count($menus) > 0) { foreach ($menus as $menu) { $menu_options[$menu->term_id] = $menu->name; } } // Add Meta Boxes $meta_fields['options'] = array(array('label' => __('Slider', 'spyropress'), 'type' => 'heading', 'slug' => 'options'), array('label' => __('OnePage Navigation Menu', 'spyropress'), 'id' => 'onepage_menu', 'type' => 'select', 'class' => 'page_template one-page-php', 'options' => $menu_options), array('label' => __('Slider', 'spyropress'), 'type' => 'sub_heading'), array('label' => __('Slider Type', 'spyropress'), 'id' => 'slider', 'type' => 'select', 'class' => 'enable_changer', 'options' => array('nivo' => __('Nivo Slider', 'spyropress'), 'rev' => __('Revolution Slider', 'spyropress'))), array('label' => __('Nivo Slider', 'spyropress'), 'id' => 'nivo_slider', 'type' => 'select', 'class' => 'slider nivo', 'options' => spyropress_get_sliders())); if (class_exists('RevSlider')) { $slider = new RevSlider(); $arrSliders = $slider->getArrSlidersShort(); $meta_fields['options'][] = array('label' => __('Revolution Slider', 'spyropress'), 'id' => 'rev_slider', 'type' => 'select', 'class' => 'slider rev', 'options' => $arrSliders); $meta_fields['options'][] = array('label' => __('Revolution Slider Skin', 'spyropress'), 'id' => 'rev_slider_skin', 'type' => 'select', 'class' => 'slider rev', 'options' => array('dark' => __('Dark', 'spyropress'), 'light' => __('Light', 'spyropress'), 'full' => __('FullScreen', 'spyropress'), 'dark dark-video' => __('Video - Dark', 'spyropress'), 'light dark-light' => __('Video - Light', 'spyropress')), 'std' => 'dark'); } $meta_fields['options'][] = array('label' => __('Header', 'spyropress'), 'type' => 'sub_heading'); $meta_fields['options'][] = array('label' => __('Header Type', 'spyropress'), 'id' => 'top_header', 'type' => 'select', 'class' => 'enable_changer', 'options' => array('none' => __('None', 'spyropress'), 'default' => __('Default', 'spyropress'), 'custom' => __('Custom Header', 'spyropress')), 'std' => 'default'); $meta_fields['options'][] = array('label' => __('Custom Header Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'class' => 'top_header custom', 'desc' => __('Either use Bucket or Content', 'spyropress'), 'options' => spyropress_get_buckets()); $meta_fields['options'][] = array('label' => __('Custom Header Content', 'spyropress'), 'id' => 'header_content', 'type' => 'editor', 'desc' => __('Either use Bucket or Content', 'spyropress'), 'class' => 'top_header custom'); $meta_fields['options'][] = array('label' => __('Custom Header Background', 'spyropress'), 'id' => 'background', 'type' => 'background', 'class' => 'top_header custom'); $meta_fields['options'][] = array('label' => __('Top Border color', 'spyropress'), 'id' => 'border_top', 'type' => 'colorpicker', 'class' => 'top_header custom'); $meta_fields['options'][] = array('label' => __('Bottom Border color', 'spyropress'), 'id' => 'border_bottom', 'type' => 'colorpicker', 'class' => 'top_header custom'); $meta_fields['options'][] = array('label' => __('Layout', 'spyropress'), 'type' => 'sub_heading'); $meta_fields['options'][] = array('label' => __('Layout Type', 'spyropress'), 'id' => 'layout_type', 'type' => 'select', 'options' => array('full' => __('Full Width', 'spyropress'), 'left' => __('Left Sidebar', 'spyropress'), 'right' => __('Right Sidebar', 'spyropress')), 'std' => 'full'); $post->add_meta_box('page_options', __('Page Options', 'spyropress'), $meta_fields, '_page_options', false, 'normal', 'high'); }
public function __construct() { // Widget variable settings. $this->cssclass = ''; $this->description = __('Accordion Builder.', 'spyropress'); $this->id_base = 'accordion'; $this->name = __('Accordions', 'spyropress'); // Fields $this->fields = array(array('label' => __('Style', 'spyropress'), 'id' => 'style', 'type' => 'select', 'options' => array('secundary' => 'Secundary')), array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Animation', 'spyropress'), 'id' => 'animation', 'type' => 'select', 'options' => spyropress_get_options_animation()), array('label' => __('Active', 'spyropress'), 'id' => 'is_active', 'type' => 'checkbox', 'options' => array(1 => __('Disable first slide active effect on page load', 'spyropress'))), array('label' => __('Accordion', 'spyropress'), 'id' => 'accordions', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Icon', 'spyropress'), 'id' => 'icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons(), 'desc' => __('See the <a target="_blank" href="http://fontawesome.io/icons/">icons here</a>.', 'spyropress')), array('label' => __('Accordion Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use complex html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); }
public function __construct() { $this->path = dirname(__FILE__); // Widget variable settings $this->description = __('Tab Builder.', 'spyropress'); $this->id_base = 'tab'; $this->name = __('Tabs', 'spyropress'); // Fields $this->fields = array(array('label' => __('Tab Position', 'spyropress'), 'id' => 'tab_position', 'type' => 'select', 'options' => array('top' => __('Top', 'spyropress'), 'bottom' => __('Bottom', 'spyropress'), 'vertical' => __('Vertical', 'spyropress'))), array('label' => __('Tab Alignment', 'spyropress'), 'id' => 'tab_align', 'type' => 'select', 'options' => array('left' => __('Left', 'spyropress'), 'right' => __('Right', 'spyropress'), 'justified' => __('Justified', 'spyropress'))), array('label' => __('Tab', 'spyropress'), 'id' => 'tabs', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Icon', 'spyropress'), 'id' => 'icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons(), 'desc' => __('See the <a target="_blank" href="http://fontawesome.io/icons/">icons here</a>.', 'spyropress')), array('label' => __('Tab Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); }
public function __construct() { // Widget variable settings. $this->cssclass = 'module-bucket'; $this->description = __('A list of partial layouts created using Template Builder.', 'spyropress'); $this->id_base = 'spyropress_bucket'; $this->name = __('Bucket', 'spyropress'); // Fields $this->fields = array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Buckets', 'spyropress'), 'desc' => __('Partial Layout created using Template Builder.', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'options' => spyropress_get_buckets())); $this->create_widget(); }
public function __construct() { $this->path = dirname(__FILE__); // Widget variable settings $this->description = __('Toggle Content Builder', 'spyropress'); $this->id_base = 'toggle'; $this->cssclass = 'toogle'; $this->name = __('Toggle Content', 'spyropress'); // Fields $this->templates['one'] = array('label' => __('One Toggle at a Time', 'spyropress')); $this->fields = array(array('label' => __('Styles', 'spyropress'), 'id' => 'template', 'type' => 'select', 'options' => $this->get_option_templates()), array('label' => __('Toggles', 'spyropress'), 'id' => 'toggles', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); }