コード例 #1
0
			<?php 
//set "slider_main" settings
$sliderMainSettings = new UniteSettingsAdvancedRev();
$sliderMainSettings->addTextBox("title", "", __("Slider Title", REVSLIDER_TEXTDOMAIN), array("description" => __("The title of the slider. Example: Slider1", REVSLIDER_TEXTDOMAIN), "required" => "true"));
$sliderMainSettings->addTextBox("alias", "", __("Slider Alias", REVSLIDER_TEXTDOMAIN), array("description" => __("The alias that will be used for embedding the slider. Example: slider1", REVSLIDER_TEXTDOMAIN), "required" => "true"));
$sliderMainSettings->addTextBox("shortcode", "", __("Slider Shortcode", REVSLIDER_TEXTDOMAIN), array("readonly" => true, "class" => "code", "hidden" => true));
//source type
$arrSourceTypes = array("posts" => __("Posts", REVSLIDER_TEXTDOMAIN), "specific_posts" => __("Specific Posts", REVSLIDER_TEXTDOMAIN), "gallery" => __("Gallery", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addRadio("source_type", $arrSourceTypes, __("Source Type", REVSLIDER_TEXTDOMAIN), "gallery", array("hidden" => true));
$sliderMainSettings->startBulkControl("source_type", UniteSettingsRev::CONTROL_TYPE_SHOW, "posts");
//post types
$arrPostTypes = UniteFunctionsWPRev::getPostTypesAssoc(array("post"));
$arrParams = array("args" => "multiple size='5'");
$sliderMainSettings->addSelect("post_types", $arrPostTypes, __("Post Types", REVSLIDER_TEXTDOMAIN), "post", $arrParams);
//post categories
$arrParams = array("args" => "multiple size='7'");
$sliderMainSettings->addSelect("post_category", array(), __("Post Categories", REVSLIDER_TEXTDOMAIN), "", $arrParams);
//sort by
$arrSortBy = UniteFunctionsWPRev::getArrSortBy();
//events integration
if (UniteEmRev::isEventsExists()) {
    $arrEventsFilter = UniteEmRev::getArrFilterTypes();
    $sliderMainSettings->addHr();
    $sliderMainSettings->addSelect("events_filter", $arrEventsFilter, __("Filter Events By", REVSLIDER_TEXTDOMAIN), UniteEmRev::DEFAULT_FILTER);
    $sliderMainSettings->addHr();
    //add values to sortby array
    $arrEMSortBy = UniteEmRev::getArrSortBy();
    $arrSortBy = $arrSortBy + $arrEMSortBy;
}
$sliderMainSettings->addSelect("post_sortby", $arrSortBy, __("Sort Posts By", REVSLIDER_TEXTDOMAIN), RevSlider::DEFAULT_POST_SORTBY);
//sort direction
コード例 #2
0
ファイル: slide_settings.php プロジェクト: naka211/myloyal
//transition speed
$params = array("description" => __ug("The duration of the transition (Default:300, min: 100 max 2000). ", REVSLIDER_TEXTDOMAIN), "class" => "small", "datatype" => "number");
$slideSettings->addTextBox("transition_duration", "300", __ug("Transition Duration", REVSLIDER_TEXTDOMAIN), $params);
if (!isset($sliderDelay)) {
    $sliderDelay = 0;
}
//delay
$params = array("description" => __ug("A new delay value for the Slide. If no delay defined per slide, the delay defined via Options (", REVSLIDER_TEXTDOMAIN) . $sliderDelay . __ug("ms) will be used", REVSLIDER_TEXTDOMAIN), "class" => "small", "datatype" => UniteSettingsRev::DATATYPE_NUMBEROREMTY);
$slideSettings->addTextBox("delay", "", __ug("Delay", REVSLIDER_TEXTDOMAIN), $params);
$params = array("description" => __ug("", REVSLIDER_TEXTDOMAIN), "class" => "small");
$slideSettings->addRadio("save_performance", array("on" => __ug("On", REVSLIDER_TEXTDOMAIN), "off" => __ug("Off", REVSLIDER_TEXTDOMAIN)), __ug("Save Performance", REVSLIDER_TEXTDOMAIN), "off", $params);
$slideSettings->addHr("");
//-----------------------
//enable link
$slideSettings->addSelect_boolean("enable_link", __ug("Enable Link", REVSLIDER_TEXTDOMAIN), false, __ug("Enable", REVSLIDER_TEXTDOMAIN), __ug("Disable", REVSLIDER_TEXTDOMAIN));
$slideSettings->startBulkControl("enable_link", UniteSettingsRev::CONTROL_TYPE_SHOW, "true");
//link type
$slideSettings->addRadio("link_type", array("regular" => __ug("Regular", REVSLIDER_TEXTDOMAIN), "slide" => __ug("To Slide", REVSLIDER_TEXTDOMAIN)), __ug("Link Type", REVSLIDER_TEXTDOMAIN), "regular");
//link
$params = array('id' => 'rev_link', "description" => __ug("A link on the whole slide pic (use %link% or %meta:somemegatag% in template sliders to link to a post or some other meta)", REVSLIDER_TEXTDOMAIN));
$slideSettings->addTextBox("link", "", __ug("Slide Link", REVSLIDER_TEXTDOMAIN), $params);
//link target
$params = array("description" => __ug("The target of the slide link", REVSLIDER_TEXTDOMAIN));
$slideSettings->addSelect("link_open_in", array("same" => __ug("Same Window", REVSLIDER_TEXTDOMAIN), "new" => __ug("New Window")), __ug("Link Open In", REVSLIDER_TEXTDOMAIN), "same", $params);
//num_slide_link
$arrSlideLink = array();
$arrSlideLink["nothing"] = __ug("-- Not Chosen --", REVSLIDER_TEXTDOMAIN);
$arrSlideLink["next"] = __ug("-- Next Slide --", REVSLIDER_TEXTDOMAIN);
$arrSlideLink["prev"] = __ug("-- Previous Slide --", REVSLIDER_TEXTDOMAIN);
$arrSlideLinkLayers = $arrSlideLink;
$arrSlideLinkLayers["scroll_under"] = __ug("-- Scroll Below Slider --", REVSLIDER_TEXTDOMAIN);