Exemplo n.º 1
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-elastic', 'css/elastic.css');
yit_register_slider_script($slider_type, 'jquery-eislideshow', 'js/jquery.eislideshow.js');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = true;
// add image size
yit_add_image_size('thumb-slider-elastic', 150, 59, true);
// add support to slide
yit_add_slide_support($slider_type, 'title, subtitle, link');
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Width', 'yit'), 'id' => 'width', 'type' => 'number', 'desc' => __('Select the width of the slider, in base of the images that you want to add (Set 0 if you want it full width).', 'yit'), 'min' => 0, 'max' => 2000, 'std' => 0), array('name' => __('Height', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of the slider, in base of the images that you want to add.', 'yit'), 'std' => 338, 'min' => 200, 'max' => 2000), array('name' => __('Autoplay', 'yit'), 'id' => 'autoplay', 'type' => 'onoff', 'desc' => __('Select if you want that the slider change the slide automatically.', 'yit'), 'std' => 1), array('name' => __('Animation', 'yit'), 'id' => 'animation', 'type' => 'select', 'options' => array('sides' => __('Sides', 'yit'), 'center' => __('Center', 'yit')), 'desc' => __('Animation types -> "sides" : new slides will slide in from left / right; "center": new slides will appear in the center.', 'yit'), 'std' => 'sides'), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8)));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'title-font', 'type' => 'typography', 'name' => __('Title', 'yit'), 'desc' => __('Configure the title.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 40, 'unit' => 'px', 'family' => 'Playfair Display', 'style' => 'italic', 'color' => '#000000'), 'style' => array('selectors' => '.slider-%s .ei-title h2, .slider-%s .ei-title h2 a', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'subtitle-font', 'type' => 'typography', 'name' => __('Subitle', 'yit'), 'desc' => __('Configure the subtitle.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 40, 'unit' => 'px', 'family' => 'Open Sans Condensed:300', 'style' => 'regular', 'color' => '#4D4C4C'), 'style' => array('selectors' => '.slider-%s .ei-title h3, .slider-%s .ei-title h3 a', 'properties' => 'font-size, font-family, color, font-style, font-weight'))));
Exemplo n.º 2
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-thumbnail', 'css/thumbnails.css');
yit_register_slider_script($slider_type, 'jquery-thumbnail', 'js/jquery.aw-showcase.js');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = true;
// add image size
yit_add_image_size('thumb-slider-thumbnails', 226, 100, true);
// add support to slide
yit_add_slide_support($slider_type, 'title, subtitle');
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Effect', 'yit'), 'id' => 'effect', 'type' => 'select', 'desc' => __('Select the effect you want for slides transiction.', 'yit'), 'options' => array('vslide' => 'vslide', 'hslide' => 'hslide', 'fade' => 'fade'), 'std' => 'fade'), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8), array('name' => __('Content width', 'yit'), 'id' => 'width', 'type' => 'number', 'desc' => __('Select the width of content (set 0 for full width feature).', 'yit'), 'min' => 0, 'max' => 2000, 'std' => 0), array('name' => __('Content height', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of content (take in mind 22px of padding and border of the slider, so if you want the slider 400px height, set 378px as height.).', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 378)));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'tooltip-font', 'type' => 'typography', 'name' => __('Caption font', 'yit'), 'desc' => __('Configure the tooltip title of the slide.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 26, 'unit' => 'px', 'family' => 'Lato', 'style' => 'bold', 'color' => '#585555'), 'style' => array('selectors' => '.slider-%s.slider div.showcase-text h2', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'extra-tooltip-font', 'type' => 'typography', 'name' => __('Tooltip text font', 'yit'), 'desc' => __('Configure the font of the text in the slide.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Lato', 'style' => 'regular', 'color' => '#6e6e6e'), 'style' => array('selectors' => '.slider-%s.slider div.showcase-text p', 'properties' => 'font-size, font-family, color, font-style, font-weight'))));
Exemplo n.º 3
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-polaroid', 'css/polaroid.css');
yit_register_slider_script($slider_type, 'jquery-transform', 'js/jquery.transform-0.8.0.min.js');
yit_register_slider_script($slider_type, 'jquery-preloader', 'js/jquery.preloader.js');
yit_register_slider_script($slider_type, 'jquery-polaroid', 'js/jquery.polaroid.js');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = false;
// add support to slide
yit_add_slide_support($slider_type, 'title, content', array(array('name' => __('Content alignment', 'yit'), 'id' => 'content_align', 'type' => 'select', 'options' => array('left' => __('Left', 'yit'), 'right' => __('Right', 'yit')), 'desc' => __('Select where you want the content. The image automatically will be aligned in the opposite side.', 'yit'), 'std' => 'right'), array('name' => __('Full background', 'yit'), 'id' => 'is_full', 'type' => 'onoff', 'desc' => __('Set YES here if you want the background in full width, when you have a content inside the slide.', 'yit'), 'std' => 0)));
// thumbnails image size
add_image_size('slider-polaroid-thumb', 150, 150, true);
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Width content', 'yit'), 'id' => 'width', 'type' => 'number', 'desc' => __('Select the width of container (select 0 if you want to have the same width of site container).', 'yit'), 'min' => 0, 'max' => 2000, 'std' => 0), array('name' => __('Height content', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of container.', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 400), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8), array('type' => 'sep'), array('id' => 'responsive_mode', 'name' => __('Responsive mode', 'yit'), 'desc' => __('Select some other responsive slider or static image to replace to this slider, when you are in responsive.', 'yit'), 'type' => 'responsivesliders'), array('id' => 'responsive_image', 'name' => __('Responsive Image', 'yit'), 'desc' => __('Upload here an image, if you have defined the "Static Image" in the option above.', 'yit'), 'type' => 'upload')));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'title-font', 'type' => 'typography', 'name' => __('Title', 'yit'), 'desc' => __('Configure the title.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 24, 'unit' => 'px', 'family' => 'Open Sans', 'style' => 'extra-bold', 'color' => '#e5f99a'), 'style' => array('selectors' => '.slider-%s.slider .slide-content h2, .slider-%s.slider .slide-content h2, .text-polaroid h2', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'paragraphs-font', 'type' => 'typography', 'name' => __('Paragraphs', 'yit'), 'desc' => __('Configure the paragraphs.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Open Sans', 'style' => 'regular', 'color' => '#ffffff'), 'style' => array('selectors' => '.slider-%s.slider .slide-content p, .slider-%s.slider .slide-content p, .text-polaroid p', 'properties' => 'font-size, font-family, color, font-style, font-weight'))));
Exemplo n.º 4
0
/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
include 'layerslider.php';
// add the check in case you use the [button]
add_filter('yit_sc_button_include_content', create_function('$to_check', '$to_check[] = serialize( get_option("layerslider-slides") ); return $to_check;'));
// add the layer slider in the sample data
add_filter('yit_sample_data_options', create_function('$options', '$options[] = "layerslider-slides"; return $options;'));
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = true;
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('type' => 'simple-text', 'desc' => sprintf(__('Configure the slider in <a href="%s">LayerSlider</a> page and then select below the slider to use for this slider.', 'yit'), admin_url('admin.php?page=layerslider'))), array('id' => 'layer_slider', 'name' => __('Select the slider', 'yit'), 'desc' => __('Select the slider you want to show when you want to show this slider.', 'yit'), 'type' => 'select', 'options' => layerslider_get_sliders())));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'p-font', 'type' => 'typography', 'name' => __('p', 'yit'), 'desc' => __('Configure the font for the "p" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#585555'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer p', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'a-font', 'type' => 'typography', 'name' => __('Links', 'yit'), 'desc' => __('Configure the color for the links.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#c97e08'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer a', 'properties' => 'color')), array('id' => 'a-hover-font', 'type' => 'typography', 'name' => __('Links hover', 'yit'), 'desc' => __('Configure the color for the links, when mouse over.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer a:hover', 'properties' => 'color')), array('id' => 'h1-font', 'type' => 'typography', 'name' => __('h1', 'yit'), 'desc' => __('Configure the font for the "h1" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 34, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h1', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'h2-font', 'type' => 'typography', 'name' => __('h2', 'yit'), 'desc' => __('Configure the font for the "h2" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 30, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h2', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'h3-font', 'type' => 'typography', 'name' => __('h3', 'yit'), 'desc' => __('Configure the font for the "h3" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 26, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#c97e08'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h3', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'h4-font', 'type' => 'typography', 'name' => __('h4', 'yit'), 'desc' => __('Configure the font for the "h4" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 22, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h1', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'h5-font', 'type' => 'typography', 'name' => __('h5', 'yit'), 'desc' => __('Configure the font for the "h5" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 18, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h5', 'properties' => 'font-size, font-family, font-style, font-weight, color')), array('id' => 'h6-font', 'type' => 'typography', 'name' => __('h6', 'yit'), 'desc' => __('Configure the font for the "h6" elements.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 14, 'unit' => 'px', 'family' => 'Rokkitt', 'style' => 'regular', 'color' => '#2E2D2D'), 'style' => array('selectors' => '#slider-%s.layer-slider .ls-layer h6', 'properties' => 'font-size, font-family, font-style, font-weight, color'))));
// add the script js to hide the second tab, if is selected the Layer slider in the select
function yit_hide_second_tab_layersslider()
{
    ?>
    <script type="text/javascript">
        jQuery(document).ready(function($){
            if ( $('#<?php 
    echo yit_get_model('cpt_unlimited')->metabox_name;
    ?>
_slider_type').val() == 'layer-slider' )
                $('a[href="#item-edit"]').parent().remove();
        });
    </script>
    <?php 
}
Exemplo n.º 5
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-flexslider', 'css/flexslider.css');
yit_register_slider_style($slider_type, 'slider-flexslider-elegant-slider', 'css/slider.css');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = true;
// add support to slide
yit_add_slide_support($slider_type, 'title, content-editor, link');
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Width content', 'yit'), 'id' => 'width', 'type' => 'number', 'desc' => __('Select the width of container (leave 0 to get all container width).', 'yit'), 'min' => 0, 'max' => 2000, 'std' => 0), array('name' => __('Height content', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of container.', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 400), array('name' => __('Effect', 'yit'), 'id' => 'effect', 'type' => 'select', 'options' => array('fade' => 'Fade', 'slide' => 'Slide'), 'desc' => __('The effect used to change slide.', 'yit'), 'std' => 'fade'), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8), array('name' => __('Content tooltip position', 'yit'), 'id' => 'caption_position', 'type' => 'select', 'desc' => __('Define the position of the tooltip of the text.', 'yit'), 'options' => array('top' => __('Top', 'yit'), 'bottom' => __('Bottom', 'yit'), 'left' => __('Left', 'yit'), 'right' => __('Right', 'yit')), 'std' => 'right'), array('name' => __('Caption speed (s)', 'yit'), 'id' => 'caption_speed', 'type' => 'slider', 'desc' => __('The speed animation of caption.', 'yit'), 'min' => 0.1, 'max' => 10, 'step' => 0.1, 'std' => 0.4)));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'title-font', 'type' => 'typography', 'name' => __('Title', 'yit'), 'desc' => __('Configure the title.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 17, 'unit' => 'px', 'family' => 'Open Sans', 'style' => 'bold', 'color' => '#ffffff'), 'style' => array('selectors' => '.slider-%s.slider ul li .slider-caption h2, .slider-%s.slider ul li .slider-caption h2 a', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'paragraphs-font', 'type' => 'typography', 'name' => __('Paragraphs', 'yit'), 'desc' => __('Configure the paragraphs.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Open Sans', 'style' => 'regular', 'color' => '#ffffff'), 'style' => array('selectors' => '.slider-%s.slider ul li .slider-caption p', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'special-font', 'type' => 'typography', 'name' => __('[special_font]', 'yit'), 'desc' => __('Configure the [special_font] text.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 24, 'unit' => 'px', 'family' => 'Shadows Into Light', 'style' => 'regular', 'color' => '#ffffff'), 'style' => array('selectors' => '.slider-%s.slider ul li .slider-caption .special-font', 'properties' => 'font-size, font-family, color, font-style, font-weight'))));
Exemplo n.º 6
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-thumbnail', 'css/thumbnails.css');
yit_register_slider_script($slider_type, 'jquery-thumbnail', 'js/jquery.aw-showcase.js');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = true;
// add image size
add_image_size('thumb-slider-thumbnails', 60, 60, true);
// add support to slide
yit_add_slide_support($slider_type, 'link', array(array('name' => __('Caption', 'yit'), 'id' => 'caption', 'type' => 'text', 'desc' => __('Define here the text to use in the caption of the slide.', 'yit'), 'std' => ''), array('type' => 'simple-text', 'desc' => '<b>' . __('Add Tooltip', 'yit') . '</b>'), array('name' => __('Tooltip Text', 'yit'), 'id' => 'tooltip_text', 'type' => 'textarea', 'desc' => __('Select the text to show inside the tooltip.', 'yit'), 'std' => ''), array('name' => __('Image', 'yit'), 'id' => 'tooltip_image', 'type' => 'upload', 'desc' => __('You can add here an image to show above the text inside the tooltip (optional)', 'yit'), 'std' => ''), array('name' => __('URL', 'yit'), 'id' => 'tooltip_url', 'type' => 'text', 'desc' => __('Define here the URL where the tooltip have to point.', 'yit'), 'std' => ''), array('name' => __('Coords X', 'yit'), 'id' => 'tooltip_x', 'type' => 'number', 'desc' => __('Define here the position, from the left, where place the tooltip.', 'yit'), 'std' => '20'), array('name' => __('Coords Y', 'yit'), 'id' => 'tooltip_y', 'type' => 'number', 'desc' => __('Define here the position, from the top, where place the tooltip.', 'yit'), 'std' => '20')));
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Effect', 'yit'), 'id' => 'effect', 'type' => 'select', 'desc' => __('Select the effect you want for slides transiction.', 'yit'), 'options' => array('vslide' => 'vslide', 'hslide' => 'hslide', 'fade' => 'fade'), 'std' => 'fade'), array('name' => __('How to show the title', 'yit'), 'id' => 'show_caption', 'type' => 'select', 'desc' => __('Define how to show the title in the slide.', 'yit'), 'options' => array('show' => __('Show always', 'yit'), 'onload' => __('Show on load', 'yit'), 'onhover' => __('Show on hover', 'yit')), 'std' => 'onload'), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8), array('name' => __('Content width', 'yit'), 'id' => 'width', 'type' => 'number', 'desc' => __('Select the width of content (take in mind 22px of padding and border of the slider, so if you want the slider 1200px width, set 1178px as width.).', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 1178), array('name' => __('Content height', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of content (take in mind 22px of padding and border of the slider, so if you want the slider 400px height, set 378px as height.).', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 378), array('type' => 'sep')));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'tooltip-font', 'type' => 'typography', 'name' => __('Caption font', 'yit'), 'desc' => __('Configure the tooltip text in hover of the slide.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 13, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#585555'), 'style' => array('selectors' => '#slider-%s.slider.thumbnails .showcase-caption p', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'extra-tooltip-font', 'type' => 'typography', 'name' => __('Tooltip text font', 'yit'), 'desc' => __('Configure the font of the additional tooltip that you add inside the slide in a custom position.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 12, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#000'), 'style' => array('selectors' => '#slider-%s.slider.thumbnails div.showcase-tooltip', 'properties' => 'font-size, font-family, color, font-style, font-weight'))));
Exemplo n.º 7
0
yit_slider_typography_options( $slider_type, array(
    array(
        'id'   => 'title-font',
        'type' => 'typography',
        'name' => __( 'Title', 'yit' ),
        'desc' => __( 'Configure the title.', 'yit' ),
        'min'  => 1,
        'max'  => 72,
        'std'  => array(
            'size'   => 17,
            'unit'   => 'px',
            'family' => 'Open Sans',
            'style'  => 'regular',
            'color'  => '#aa620d' 
        ),
        'style' => array(
			'selectors' => '.slider-%s.slider .usquare_module_wrapper h2',
			'properties' => 'font-size, font-family, color, font-style, font-weight'
		)
    ),
    array(
        'id'   => 'paragraphs-font',
        'type' => 'typography',
        'name' => __( 'Paragraphs', 'yit' ),
        'desc' => __( 'Configure the paragraphs.', 'yit' ),
        'min'  => 1,
        'max'  => 72,
        'std'  => array(
            'size'   => 11,
            'unit'   => 'px',
            'family' => 'Open Sans',
            'style'  => 'regular',
            'color'  => '#676768' 
        ),
        'style' => array(
			'selectors' => '.slider-%s.slider .usquare_module_wrapper span, .slider-%s.slider .usquare_block_extended, .slider-%s.slider .usquare_block_extended .usquare_about',
			'properties' => 'font-size, font-family, color, font-style, font-weight'
		)
    )
));              
Exemplo n.º 8
0
/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-cycle', 'css/cycle.css');
yit_register_slider_style($slider_type, 'slider-cycle-ie', 'css/cycle-ie.css');
yit_register_slider_script($slider_type, 'jquery-cycle', 'js/jquery.anythingslider.js');
// set here if the slider is reponsive or not
$this->responsive_sliders[$slider_type] = false;
// add support to slide
yit_add_slide_support($slider_type, 'title, content-editor, link', array(array('name' => __('Background Color', 'yit'), 'id' => 'background_color', 'type' => 'colorpicker', 'desc' => __('Select the background color for this slide. It changes also the text color automatically, in base of this color.', 'yit'), 'std' => ''), array('name' => __('Position Image', 'yit'), 'id' => 'position_image', 'type' => 'text-array', 'desc' => __('Select the position of image (leave empty to put it to the top left of the slider container).', 'yit'), 'fields' => array('top' => __('Top', 'yit'), 'right' => __('Right', 'yit'), 'bottom' => __('Bottom', 'yit'), 'left' => __('Left', 'yit')), 'size' => 40, 'std' => ''), array('name' => __('Position Text', 'yit'), 'id' => 'position_text', 'type' => 'text-array', 'desc' => __('Select the position of the text (leave empty to put it to the top left of the slider container).', 'yit'), 'fields' => array('top' => __('Top', 'yit'), 'right' => __('Right', 'yit'), 'bottom' => __('Bottom', 'yit'), 'left' => __('Left', 'yit')), 'size' => 40, 'std' => '')));
// add the slider fields for the admin
yit_add_slider_config($slider_type, array(array('name' => __('Height', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of slider.', 'yit'), 'min' => 50, 'max' => 700, 'std' => 485), array("name" => __("Next & Prev navigation", 'yit'), "desc" => __("Choose if you want to show Next & Prev arrows", 'yit'), "id" => 'directionNav', "type" => "onoff", "std" => 1), array("name" => __("Next & Prev only on hover", 'yit'), "desc" => __("Choose if you want to show Next & Prev arrows only on hover", 'yit'), "id" => 'directionNavHide', "type" => "onoff", "std" => 1), array("name" => __("Autoplay", 'yit'), "desc" => __("Choose if you want to start automatically the slider transitions", 'yit'), "id" => 'autoplay', "type" => "onoff", "std" => 1), array("name" => __("Enable Widget Area", 'yit'), "desc" => __("Choose if you want to enable or disable the widget area below the slider", 'yit'), "id" => 'enable_widget_area', "type" => "onoff", "std" => 1), array("name" => __("Widget area", 'yit'), "desc" => sprintf(__("Choose the sidebar use for the 'Widget area' to use in the slider. Create a new one in <a href=\"%s\">Sidebars</a>.", 'yit'), admin_url('admin.php?page=yit_panel_sidebars')), "id" => 'sidebar', "type" => "sidebarlist", "std" => ''), array('name' => __('Pause between slides (s)', 'yit'), 'id' => 'interval', 'type' => 'slider', 'desc' => __('Select the delay between slides, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 3), array('name' => __('Animation speed (s)', 'yit'), 'id' => 'speed', 'type' => 'slider', 'desc' => __('The speed of the animation between two slide, expressed in seconds.', 'yit'), 'min' => 0.1, 'max' => 20, 'step' => 0.1, 'std' => 0.8), array('name' => __('Text color for dark background', 'yit'), 'id' => 'light_color', 'type' => 'colorpicker', 'desc' => __('A light color for the text in a slide with the background of the slide is dark.', 'yit'), 'std' => '#fff'), array('name' => __('Text color for light background', 'yit'), 'id' => 'dark_color', 'type' => 'colorpicker', 'desc' => __('A dark color for the text in a slide with the background of the slide is light.', 'yit'), 'std' => '#030303'), array('type' => 'sep'), array('id' => 'responsive_mode', 'name' => __('Responsive mode', 'yit'), 'desc' => __('Select some other responsive slider or static image to replace to this slider, when you are in responsive.', 'yit'), 'type' => 'responsivesliders'), array('id' => 'responsive_image', 'name' => __('Responsive Image', 'yit'), 'desc' => __('Upload here an image, if you have defined the "Static Image" in the option above.', 'yit'), 'type' => 'upload')));
// add the slider fields for the admin
yit_slider_typography_options($slider_type, array(array('id' => 'title-font', 'type' => 'typography', 'name' => __('Title', 'yit'), 'desc' => __('Configure the title.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 48, 'unit' => 'px', 'family' => 'Oswald', 'style' => 'regular', 'color' => '#ffffff'), 'style' => array('selectors' => '#slider-%s.slider_cycle .slide-title h2, #slider-%s.slider_cycle .slide-title h2 span', 'properties' => 'font-size, font-family, font-style, font-weight')), array('id' => 'title-font-highlight', 'type' => 'typography', 'name' => __('Title highlight', 'yit'), 'desc' => __('Configure the highlight of the title (that is the text inside the brackets).', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 48, 'unit' => 'px', 'family' => 'Oswald', 'style' => 'regular', 'color' => '#ea7206'), 'style' => array('selectors' => '#slider-%s.slider_cycle .slide-title h2 span', 'properties' => 'font-size, font-family, color, font-style, font-weight')), array('id' => 'paragraphs-font', 'type' => 'typography', 'name' => __('Paragraphs', 'yit'), 'desc' => __('Configure the paragraphs.', 'yit'), 'min' => 1, 'max' => 72, 'std' => array('size' => 14, 'unit' => 'px', 'family' => 'Droid Sans', 'style' => 'regular', 'color' => '#ffffff'), 'style' => array('selectors' => '#slider-%s.slider_cycle .slide-content p', 'properties' => 'font-size, font-family, font-style, font-weight'))));
/**
 * Return the absolute position of an object
 *
 * @since 1.0
 */
function yit_slide_get_style($style)
{
    $return = '';
    foreach ($style as $p => $v) {
        $v = is_numeric($v) ? $v . 'px' : $v;
        if ($v != '') {
            $return .= $p . ':' . $v . ';';
        }
    }
    return $return;