Example #1
0
$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
$arrSortDir = UniteFunctionsWPRev::getArrSortDirection();
$sliderMainSettings->addRadio("posts_sort_direction", $arrSortDir, __("Sort Direction", REVSLIDER_TEXTDOMAIN), RevSlider::DEFAULT_POST_SORTDIR);
//max posts for slider
$arrParams = array("class" => "small", "unit" => "posts");
$sliderMainSettings->addTextBox("max_slider_posts", "30", __("Max Posts Per Slider", REVSLIDER_TEXTDOMAIN), $arrParams);
//exerpt limit
$arrParams = array("class" => "small", "unit" => "words");
$sliderMainSettings->addTextBox("excerpt_limit", "55", __("Limit The Excerpt To", REVSLIDER_TEXTDOMAIN), $arrParams);
//slider template
$sliderMainSettings->addhr();
$slider1 = new RevSlider();
$arrSlidersTemplates = $slider1->getArrSlidersShort(null, RevSlider::SLIDER_TYPE_TEMPLATE);
$sliderMainSettings->addSelect("slider_template_id", $arrSlidersTemplates, __("Template Slider", REVSLIDER_TEXTDOMAIN), "", array());
$sliderMainSettings->endBulkControl();
$arrParams = array("description" => __("Type here the post IDs you want to use separated by coma. ex: 23,24,25", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addTextBox("posts_list", "", __("Specific Posts List", REVSLIDER_TEXTDOMAIN), $arrParams);