예제 #1
0
		/**
		 *
		 * get wildcards settings object
		 * $isInsidePost it means that it's used inside the post and not template page.
		 */
		public static function getWildcardsSettings(){

			$settings = new UniteSettingsAdvancedRev();

			//add youtube, excerpt and vimeo id
			$slider = new RevSlider();
			$arrOutput = array();
			$arrOutput["default"] = "default";
			
			$arrSlides = $slider->getArrSlidersWithSlidesShort(RevSlider::SLIDER_TYPE_TEMPLATE);
			$arrOutput = $arrOutput + $arrSlides;	//union arrays
			
			$settings->addSelect("slide_template", $arrOutput, __("Choose Slide Template",REVSLIDER_TEXTDOMAIN),"default");
			
			/*
			$params = array("class"=>"textbox_small","description"=>"Overwrite the global excerpt words limit option for this post");
			$settings->addTextBox("revslider_excerpt_limit", "", "Excerpt Words Limit",$params);
			$params = array("description"=>"The youtube ID, example: 9bZkp7q19f0");
			$settings->addTextBox("youtube_id", "", "Youtube ID", $params);
			$params = array("description"=>"The youtube ID, example: 18554749");
			$settings->addTextBox("vimeo_id", "", "Vimeo ID",$params);
			*/
			
			return($settings);
		}
 public static function getWildcardsSettings()
 {
     $settings = new UniteSettingsAdvancedRev();
     $slider = new RevSlider();
     $arrOutput = array();
     $arrOutput["default"] = "default";
     $arrSlides = $slider->getArrSlidersWithSlidesShort(RevSlider::SLIDER_TYPE_TEMPLATE);
     $arrOutput = $arrOutput + $arrSlides;
     $settings->addSelect("slide_template", $arrOutput, __("Choose Slide Template", REVSLIDER_TEXTDOMAIN), "default");
     return $settings;
 }
예제 #3
0
    /**
     *  custom output function
     */
    public static function customPostFieldsOutput()
    {
        $meta = get_post_meta(get_the_ID(), 'slide_template', true);
        if ($meta == '') {
            $meta = 'default';
        }
        $slider = new RevSlider();
        $arrOutput = array();
        $arrOutput["default"] = "default";
        $arrSlides = $slider->getArrSlidersWithSlidesShort(RevSlider::SLIDER_TYPE_TEMPLATE);
        $arrOutput = $arrOutput + $arrSlides;
        //union arrays
        ?>
		<ul class="revslider_settings">
			<li id="slide_template_row">
				<div title="" class="setting_text" id="slide_template_text"><?php 
        _e('Choose Slide Template', 'revslider');
        ?>
</div>
				<div class="setting_input">
					<select name="slide_template" id="slide_template">
						<?php 
        foreach ($arrOutput as $handle => $name) {
            echo '<option ' . selected($handle, $meta) . ' value="' . $handle . '">' . $name . '</option>';
        }
        ?>
					</select>
				</div>
				<div class="clear"></div>
			</li>
		</ul>
		<?php 
    }