'widget_revslider', 'description' => __('Displays a revolution slider on the page') ); parent::__construct('rev-slider-widget', __('Revolution Slider'), $widget_ops); } /** * * the form */ public function form($instance) { $slider = new RevSlider(); $arrSliders = $slider->getArrSlidersShort(); if(empty($arrSliders)) echo __("No sliders found, Please create a slider"); else{ $field = "rev_slider"; $fieldPages = "rev_slider_pages"; $fieldCheck = "rev_slider_homepage"; $sliderID = UniteFunctionsRev::getVal($instance, $field); $homepage = UniteFunctionsRev::getVal($instance, $fieldCheck); $pagesValue = UniteFunctionsRev::getVal($instance, $fieldPages); $fieldID = $this->get_field_id( $field ); $fieldName = $this->get_field_name( $field ); $select = UniteFunctionsRev::getHTMLSelect($arrSliders,$sliderID,'name="'.$fieldName.'" id="'.$fieldID.'"',true); $fieldID_check = $this->get_field_id( $fieldCheck ); $fieldName_check = $this->get_field_name( $fieldCheck ); $checked = ""; if($homepage == "on") $checked = "checked='checked'"; $fieldPages_ID = $this->get_field_id( $fieldPages ); $fieldPages_Name = $this->get_field_name( $fieldPages ); ?> Choose Slider:
>