示例#1
0
文件: config.php 项目: zgomotos/Bazar
<?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'))));
示例#2
0
文件: config.php 项目: zgomotos/Bazar
<?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'))));
示例#3
0
文件: config.php 项目: jayeshnair/ctp
<?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'))));
示例#4
0
文件: config.php 项目: zgomotos/Bazar
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
global $yit;
yit_register_slider_style($slider_type, 'slider-flash', 'css/flash.css');
yit_register_slider_script($slider_type, 'swfobject');
// 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');
// 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 (default is 1170).', 'yit'), 'min' => 0, 'max' => 2000, 'std' => 1170), array('name' => __('Height content', 'yit'), 'id' => 'height', 'type' => 'number', 'desc' => __('Select the height of container.', 'yit'), 'min' => 10, 'max' => 2000, 'std' => 395), 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'), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Transitions', 'yit') . '</b>'), array("name" => __('Pieces', 'yit'), "desc" => __('Number of pieces to which the image is sliced', 'yit'), "id" => "Pieces", "type" => "slider", "min" => 0, "max" => 40, "std" => 9), array("name" => __('Time', 'yit'), "desc" => __('Time for one cube to turn (expressed in seconds).', 'yit'), "id" => "Time", "type" => "slider", "min" => 0, "max" => 5, "step" => 0.1, "std" => 1), array("name" => __('Transition', 'yit'), "desc" => __('Transition type of the Tweener class', 'yit'), "id" => "Transition", "type" => "select", "options" => $yit->getConfigEasings(), "std" => "easeInOutBack"), array("name" => __('Depth Offset', 'yit'), "desc" => __('The offset during transition on the z-axis. Value between 100 and 1000 are recommended.', 'yit'), "id" => "DepthOffset", "type" => "slider", "min" => 100, "max" => 1000, "step" => 50, "std" => 300), array("name" => __('Cube Distance', 'yit'), "desc" => __('The distance between the cubes during transition. Values between 5 and 50 are recommended.', 'yit'), "id" => "CubeDistance", "type" => "slider", "min" => 5, "max" => 50, "std" => 30), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('General Configuration', 'yit') . '</b>'), array("name" => __('Loader Color', 'yit'), "desc" => __('Color of the cubes before the first image appears, also the color of the back sides of the cube, which become visible at some transition types', 'yit'), "id" => "LoaderColor", "type" => "colorpicker", "std" => "#333333"), array("name" => __('Inner Side Color', 'yit'), "desc" => __('Color of the inner sides of the cube when sliced', 'yit'), "id" => "InnerSideColor", "type" => "colorpicker", "std" => "#222222"), array("name" => __('Autoplay', 'yit'), "desc" => __('Number of seconds from one transition to another, if not stopped. Set to 0 to disable autoplay', 'yit'), "id" => "Autoplay", "type" => "slider", "min" => 0, "max" => 20, "label" => "s", "std" => 4), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Shadow', 'yit') . '</b>'), array("name" => __('Side Shadow Alpha', 'yit'), "desc" => __('Sides get darker when moved away from the front. This is the degree of darkness - 0 == no change, 1 == 100&#37; black.', 'yit'), "id" => "SideShadowAlpha", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.1, "std" => 0.8), array("name" => __('Drop Shadow Alpha', 'yit'), "desc" => __('Alpha of the drop shadow - 0 == no shadow, 1 == opaque', 'yit'), "id" => "DropShadowAlpha", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.1, "std" => 0.7), array("name" => __('Drop Shadow Distance', 'yit'), "desc" => __('Distance of the shadow from the bottom of the image', 'yit'), "id" => "DropShadowDistance", "type" => "slider", "min" => 0, "max" => 100, "std" => 25), array("name" => __('Drop Shadow Scale', 'yit'), "desc" => __('As the shadow is blurred, it appears wider that the actual image, when not resized. Thus it\'s a good idea to make it slightly smaller. - 1 would be no resizing at all.', 'yit'), "id" => "DropShadowScale", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.05, "std" => 0.95), array("name" => __('Drop Shadow Blur X', 'yit'), "desc" => __('Blur of the drop shadow on the x-axis', 'yit'), "id" => "DropShadowBlurX", "type" => "slider", "min" => 0, "max" => 200, "std" => 40), array("name" => __('Drop Shadow Blur Y', 'yit'), "desc" => __('Blur of the drop shadow on the y-axis', 'yit'), "id" => "DropShadowBlurY", "type" => "slider", "min" => 0, "max" => 200, "std" => 4), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Menu', 'yit') . '</b>'), array("name" => __('Menu Distance X', 'yit'), "desc" => __('Distance between two menu items (from center to center).', 'yit'), "id" => "MenuDistanceX", "type" => "slider", "min" => 0, "max" => 400, "std" => 20), array("name" => __('Menu Distance Y', 'yit'), "desc" => __('Distance of the menu from the bottom of the image.', 'yit'), "id" => "MenuDistanceY", "type" => "slider", "min" => 0, "max" => 400, "std" => 50), array("name" => __('Menu Color Inactive Item', 'yit'), "desc" => __('Color of an inactive menu item.', 'yit'), "id" => "MenuColor1", "type" => "colorpicker", "std" => "#999999"), array("name" => __('Menu Color Active Item', 'yit'), "desc" => __('Color of an active menu item.', 'yit'), "id" => "MenuColor2", "type" => "colorpicker", "std" => "#333333"), array("name" => __('Menu Color Inner Circle od Active Item', 'yit'), "desc" => __('Color of the inner circle of an active menu item. Should equal the background color of the whole thing.', 'yit'), "id" => "MenuColor3", "type" => "colorpicker", "std" => "#FFFFFF"), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Controls', 'yit') . '</b>'), array("name" => __('Control Size', 'yit'), "desc" => __('Size of the controls, which appear on rollover (play, stop, info, link)', 'yit'), "id" => "ControlSize", "type" => "slider", "min" => 0, "max" => 400, "step" => 10, "std" => 100), array("name" => __('Control Distance', 'yit'), "desc" => __('Distance between the controls (from the borders).', 'yit'), "id" => "ControlDistance", "type" => "slider", "min" => 0, "max" => 100, "std" => 20), array("name" => __('Bg Color', 'yit'), "desc" => __('Background color of the controls', 'yit'), "id" => "ControlColor1", "type" => "colorpicker", "std" => "#222222"), array("name" => __('Font Color', 'yit'), "desc" => __('Font color of the controls', 'yit'), "id" => "ControlColor2", "type" => "colorpicker", "std" => "#FFFFFF"), array("name" => __('Control Alpha', 'yit'), "desc" => __('Alpha of a control, when mouse is not over', 'yit'), "id" => "ControlAlpha", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.05, "std" => 0.8), array("name" => __('Control Alpha Hover status', 'yit'), "desc" => __('Alpha of a control, when mouse is hover.', 'yit'), "id" => "ControlAlphaOver", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.05, "std" => 0.95), array("name" => __('Control X', 'yit'), "desc" => __('X-position of the point, which aligns the controls (measured from [0,0] of the image)', 'yit'), "id" => "ControlsX", "type" => "slider", "min" => 0, "max" => 1170, "step" => 10, "std" => 585), array("name" => __('Control Y', 'yit'), "desc" => __('Y-position of the point, which aligns the controls (measured from [0,0] of the image)', 'yit'), "id" => "ControlsY", "type" => "slider", "min" => 0, "max" => 350, "step" => 10, "std" => 240), array("name" => __('Controls Align', 'yit'), "desc" => __('Type of alignment from the point [controlsX, controlsY]', 'yit'), "id" => "ControlsAlign", "type" => "select", "options" => array('center' => __('center', 'yit'), 'left' => __('left', 'yit'), 'right' => __('right', 'yit')), "std" => 'center'), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Tooltip', 'yit') . '</b>'), array("name" => __('Tooltip Height', 'yit'), "desc" => __('Height of the tooltip surface in the menu', 'yit'), "id" => "TooltipHeight", "type" => "slider", "min" => 0, "max" => 200, "std" => 30), array("name" => __('Tooltip Color', 'yit'), "desc" => __('Color of the tooltip surface in the menu', 'yit'), "id" => "TooltipColor", "type" => "colorpicker", "std" => "#222222"), array("name" => __('Tooltip Text Y', 'yit'), "desc" => __('Y-distance of the tooltip text field from the top of the tooltip', 'yit'), "id" => "TooltipTextY", "type" => "slider", "min" => 0, "max" => 200, "std" => 5), array("name" => __('Tooltip Text Color', 'yit'), "desc" => __('Color of the tooltip text', 'yit'), "id" => "TooltipTextColor", "type" => "colorpicker", "std" => "#FFFFFF"), array("name" => __('Tooltip Margin Left', 'yit'), "desc" => __('Margin of the text to the left end of the tooltip', 'yit'), "id" => "TooltipMarginLeft", "type" => "slider", "min" => 0, "max" => 50, "std" => 5), array("name" => __('Tooltip Margin Right', 'yit'), "desc" => __('Margin of the text to the right end of the tooltip', 'yit'), "id" => "TooltipMarginRight", "type" => "slider", "min" => 0, "max" => 50, "std" => 7), array("name" => __('Tooltip Text Sharpness', 'yit'), "desc" => __('Sharpness of the tooltip text (-400 to 400)', 'yit'), "id" => "TooltipTextSharpness", "type" => "slider", "min" => -400, "max" => 400, "step" => 10, "std" => 50), array("name" => __('Tooltip Text Thickness', 'yit'), "desc" => __('Thickness of the tooltip text (-400 to 400)', 'yit'), "id" => "TooltipTextThickness", "type" => "slider", "min" => -400, "max" => 400, "step" => 10, "std" => -100), array('type' => 'sep'), array('type' => 'simple-text', 'desc' => '<b>' . __('Info box', 'yit') . '</b>'), array("name" => __('Info Width', 'yit'), "desc" => __('The width of the info text field', 'yit'), "id" => "InfoWidth", "type" => "slider", "min" => 0, "max" => 1170, "step" => 20, "std" => 400), array("name" => __('Info Background', 'yit'), "desc" => __('The background color of the info text field', 'yit'), "id" => "InfoBackground", "type" => "colorpicker", "std" => "#FFFFFF"), array("name" => __('Info Background Alpha', 'yit'), "desc" => __('The alpha of the background of the info text, the image shines through, when smaller than 1', 'yit'), "id" => "InfoBackgroundAlpha", "type" => "slider", "min" => 0, "max" => 1, "step" => 0.05, "std" => 0.95), array("name" => __('Info Margin', 'yit'), "desc" => __('The margin of the text field in the info section to all sides', 'yit'), "id" => "InfoMargin", "type" => "slider", "min" => 0, "max" => 100, "std" => 15), array("name" => __('Info Text Sharpness', 'yit'), "desc" => __('Sharpness of the Info text (-400 to 400)', 'yit'), "id" => "InfoTextSharpness", "type" => "slider", "min" => -400, "max" => 400, "step" => 10, "std" => 0), array("name" => __('Info Text Thickness', 'yit'), "desc" => __('Thickness of the Info text (-400 to 400)', 'yit'), "id" => "InfoTextThickness", "type" => "slider", "min" => -400, "max" => 400, "step" => 10, "std" => 0)));
示例#5
0
文件: config.php 项目: jayeshnair/ctp
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
yit_register_slider_style($slider_type, 'slider-rotating', 'css/slider-rotating.css');
yit_register_slider_script($slider_type, 'slider-rotating', 'js/jquery.RotateImageMenu.js');
// 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, '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 (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' => __('Slider Title', 'yit'), 'desc' => __("The title that appears above slides (leave empty if you don't want this title).", 'yit'), 'id' => 'slider_title', 'type' => 'text', 'std' => ''), array('name' => __('Number of panel', 'yit'), 'desc' => __('Number of panels for each slide.', 'yit'), 'id' => 'n_panels', 'type' => 'slider', 'min' => 2, 'max' => 5, 'step' => 1, 'std' => 4), 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' => 7), 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.2), array('name' => __('Header background color', 'yit'), 'id' => 'header-background', 'type' => 'colorpicker', 'desc' => __('The color of background if the slider is set in header (empty if you want transparent)', 'yit'), 'std' => '')));
示例#6
0
<?php

/**
 * @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 . ';';
        }
    }