當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RevSlider::getArrSliders方法代碼示例

本文整理匯總了PHP中RevSlider::getArrSliders方法的典型用法代碼示例。如果您正苦於以下問題:PHP RevSlider::getArrSliders方法的具體用法?PHP RevSlider::getArrSliders怎麽用?PHP RevSlider::getArrSliders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RevSlider的用法示例。


在下文中一共展示了RevSlider::getArrSliders方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: zenite_contingut_stripe

function zenite_contingut_stripe($post)
{
    // Use nonce for verification
    wp_nonce_field(plugin_basename(__FILE__), 'zenite_noncename');
    // The actual fields for data entry
    echo '<label for="zenite_white">';
    _e("Show WhiteStripe?:", 'zenite');
    echo '</label> ';
    echo '<input type="checkbox" id="zenite_white" name="zenite_white" value="on"';
    if (get_post_meta($post->ID, 'zenite_whitestripe', true) == 'on') {
        echo ' checked="checked"';
    }
    echo ' /><br><br>';
    echo '<label for="zenite_slider">';
    _e("Slider:", 'zenite');
    echo '</label> ';
    echo '<select name="zenite_slider" id="zenite_slider"><option value="0">No Slider</option>';
    if (class_exists('RevSlider')) {
        $slider = new RevSlider();
        $arrSliders = $slider->getArrSliders();
        foreach ($arrSliders as $revSlider) {
            //		$revolutionslider[$revSlider->getAlias()] = $revSlider->getTitle();
            echo '<option value="' . $revSlider->getAlias() . '"';
            if (get_post_meta($post->ID, 'zenite_slider', true) == $revSlider->getAlias()) {
                echo " selected='selected'";
            }
            echo '>' . $revSlider->getTitle() . '</option>';
        }
    }
    echo '</select>';
}
開發者ID:JalpMi,項目名稱:v2contact,代碼行數:31,代碼來源:panels.php

示例2: add_eg_additional_meta_field

    /**
     * Adds custom meta field into the essential grid meta box for post/pages
     */
    public function add_eg_additional_meta_field($values)
    {
        $sld = new RevSlider();
        $sliders = $sld->getArrSliders();
        $shortcodes = array();
        if (!empty($sliders)) {
            $first = true;
            foreach ($sliders as $slider) {
                $name = $slider->getParam('shortcode', 'false');
                if ($name != 'false') {
                    $shortcodes[$slider->getID()] = $name;
                    $first = false;
                }
            }
        }
        $selected_slider = isset($values['eg_sources_revslider']) ? $values['eg_sources_revslider'] : '';
        if ($selected_slider == '') {
            $selected_slider[0] = '';
        }
        ?>

		<p>
			<strong style="font-size:14px"><?php 
        _e('Choose Revolution Slider', REVSLIDER_TEXTDOMAIN);
        ?>
</strong>
		</p>
		<p>
			<select name="eg_sources_revslider" id="eg_sources_revslider">
				<option value=""<?php 
        selected($selected_slider[0], '');
        ?>
><?php 
        _e('--- Choose Slider ---', REVSLIDER_TEXTDOMAIN);
        ?>
</option>
				<?php 
        if (!empty($shortcodes)) {
            foreach ($shortcodes as $id => $name) {
                ?>

						<option value="<?php 
                echo $id;
                ?>
"<?php 
                selected($selected_slider[0], $id);
                ?>
><?php 
                echo $name;
                ?>
</option>
						<?php 
            }
        }
        ?>

			</select>
		</p>
		<?php 
    }
開發者ID:VLabsInc,項目名稱:WordPressPlatforms,代碼行數:63,代碼來源:extension.class.php

示例3: my_print_shortcodes_in_js

    public static function my_print_shortcodes_in_js()
    {
        $sld = new RevSlider();
        $sliders = $sld->getArrSliders();
        $shortcodes = '';
        if (!empty($sliders)) {
            $first = true;
            foreach ($sliders as $slider) {
                $shortcode = $slider->getParam('shortcode', 'false');
                if ($shortcode != 'false') {
                    if (!$first) {
                        $shortcodes .= ',';
                    }
                    $shortcodes .= "'" . $shortcode . "'";
                    $first = false;
                }
            }
        }
        ?>

		<script type="text/javascript">
			var revslider_shortcodes = [<?php 
        echo $shortcodes;
        ?>
];
		</script>
		<?php 
    }
開發者ID:IDOAgency,項目名稱:PAHClinic,代碼行數:28,代碼來源:revslider_tinybox.class.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $orders = false;
     $orderst = false;
     $_ot = $this->getRequest()->getParam('ot');
     $_order = $this->getRequest()->getParam('order');
     $_type = $this->getRequest()->getParam('type');
     if ($_ot && $_order && $_type) {
         $order = array();
         switch ($_ot) {
             case 'alias':
                 $order['alias'] = $_order == 'asc' ? 'ASC' : 'DESC';
                 break;
             case 'name':
             default:
                 $order['title'] = $_order == 'asc' ? 'ASC' : 'DESC';
                 break;
         }
         if ($_type != 'reg') {
             $orderst = $order;
         } else {
             $orders = $order;
         }
     }
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSliders(false, $orders);
     $arrSlidersTemplates = $slider->getArrSliders(true, $orderst);
     $exampleID = 'slider1';
     if (!empty($arrSliders)) {
         $exampleID = $arrSliders[0]->getAlias();
     }
     $outputTemplates = false;
     $latest_version = Mage::helper('nwdrevslider')->getVersion();
     if (version_compare($latest_version, GlobalsRevSlider::SLIDER_REVISION, '>')) {
         //neue version existiert
     } else {
         //up to date
     }
     $this->assign('arrSliders', $arrSliders);
     $this->assign('arrSlidersTemplates', $arrSlidersTemplates);
     $this->assign('exampleID', $exampleID);
     $this->assign('latest_version', $latest_version);
 }
開發者ID:perseusl,項目名稱:kingdavid,代碼行數:47,代碼來源:Sliders.php

示例5: _fields

 /**
  * @return array
  */
 protected function _fields()
 {
     $RevSlider = new RevSlider();
     $sliders = $RevSlider->getArrSliders();
     $inputOptions = array();
     foreach ($sliders as $slider) {
         $inputOptions[$slider->getAlias()] = $slider->getTitle();
     }
     return array('activeRevSlider' => array('name' => __('Choose slider', 'gummfw'), 'type' => 'select', 'inputOptions' => $inputOptions));
 }
開發者ID:nikolaskarica,項目名稱:bds-alliance,代碼行數:13,代碼來源:revolution_slider.php

示例6: toOptionArray

 public function toOptionArray()
 {
     new RevSliderAdmin();
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSliders();
     $options = array();
     foreach ($arrSliders as $item) {
         $options[] = array('value' => $item->getAlias(), 'label' => $item->getAlias());
     }
     return $options;
 }
開發者ID:perseusl,項目名稱:kingdavid,代碼行數:11,代碼來源:Revslider.php

示例7: ac_get_revsliders

function ac_get_revsliders()
{
    $rev_sliders = array();
    if (ac_revslider_is_installed()) {
        $slider = new RevSlider();
        $arrSliders = $slider->getArrSliders();
        foreach ($arrSliders as $arrSlider) {
            $rev_sliders[$arrSlider->getAlias()] = $arrSlider->getTitle();
        }
    }
    return $rev_sliders;
}
開發者ID:Jhorton4,項目名稱:Bohldfeys_Portfolio,代碼行數:12,代碼來源:ac-sliders.php

示例8: x_revolution_slider_get_slider_meta

function x_revolution_slider_get_slider_meta()
{
    $rs = new RevSlider();
    $sliders = $rs->getArrSliders();
    $data = array();
    foreach ($sliders as $s) {
        $key = 'x-slider-rs-' . $s->getID();
        $data[$key]['id'] = $s->getID();
        $data[$key]['slug'] = $s->getAlias();
        $data[$key]['name'] = $s->getTitle();
        $data[$key]['source'] = 'Revolution Slider';
    }
    return $data;
}
開發者ID:skywindzz,項目名稱:blue_leopard,代碼行數:14,代碼來源:revolution-slider.php

示例9: controls

 public function controls()
 {
     $found = array();
     if (class_exists('RevSlider')) {
         $new_rev_slider = new RevSlider();
         $rev_sliders = $new_rev_slider->getArrSliders();
         foreach ($rev_sliders as $rs) {
             $found[] = array('value' => $rs->getAlias(), 'label' => $rs->getTitle());
         }
     }
     if (empty($found)) {
         $found[] = array('value' => 'none', 'label' => __('No Slider Available', csl18n()), 'disabled' => true);
     }
     $this->addControl('alias', 'select', __('Select Slider', csl18n()), __('Choose from Revolution Slider elements that have already been created.', csl18n()), $found[0]['value'], array('choices' => $found));
 }
開發者ID:nayabbukhari,項目名稱:circulocristiano,代碼行數:15,代碼來源:revolution-slider.php

示例10: addShortcodeSettings

 /**
  * Mapping settings for lean method.
  *
  * @since 4.9
  *
  * @param $tag
  *
  * @return array
  */
 public function addShortcodeSettings($tag)
 {
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSliders();
     $revsliders = array();
     if ($arrSliders) {
         foreach ($arrSliders as $slider) {
             /** @var $slider RevSlider */
             $revsliders[$slider->getTitle()] = $slider->getAlias();
         }
     } else {
         $revsliders[__('No sliders found', 'js_composer')] = 0;
     }
     // Add fixes for frontend editor to regenerate id
     return array('base' => $tag, 'name' => __('Revolution Slider', 'js_composer'), 'icon' => 'icon-wpb-revslider', 'category' => __('Content', 'js_composer'), 'description' => __('Place Revolution slider', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text used as widget title (Note: located above content element).', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Revolution Slider', 'js_composer'), 'param_name' => 'alias', 'admin_label' => true, 'value' => $revsliders, 'save_always' => true, 'description' => __('Select your Revolution Slider.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer'))));
 }
開發者ID:k2jysy,項目名稱:wedev,代碼行數:25,代碼來源:class-vc-vendor-revslider.php

示例11: appica_get_revslider_items

/**
 * Return list of Revolution Slider items
 *
 * @since 1.3.0
 *
 * @return array [alias => title]
 */
function appica_get_revslider_items()
{
    $not_found = array(0 => __('No sliders found', 'appica'));
    if (!class_exists('RevSlider', false)) {
        return $not_found;
    }
    $revslider = new RevSlider();
    $sliders = $revslider->getArrSliders();
    if ($sliders) {
        $_sliders = array();
        foreach ($sliders as $slider) {
            $_sliders[$slider->getAlias()] = $slider->getTitle();
        }
        unset($slider);
        return $_sliders;
    }
    return $not_found;
}
開發者ID:narendra-addweb,項目名稱:m1,代碼行數:25,代碼來源:options.php

示例12: virtue_all_rev_sliders_in_array

function virtue_all_rev_sliders_in_array()
{
    if (class_exists('RevSlider')) {
        $theslider = new RevSlider();
        $arrSliders = $theslider->getArrSliders();
        $arrA = array();
        $arrT = array();
        foreach ($arrSliders as $slider) {
            $arrA[] = $slider->getAlias();
            $arrT[] = $slider->getTitle();
        }
        if (!empty($arrT)) {
            $result = array_combine($arrA, $arrT);
        } else {
            $result = '';
        }
        return $result;
    }
}
開發者ID:MikeBu,項目名稱:wp-fm.com,代碼行數:19,代碼來源:options.php

示例13: pageControls

 public function pageControls()
 {
     global $post;
     $sliders = array(array('value' => '', 'label' => __('Deactivated', csl18n())));
     if (class_exists('RevSlider')) {
         $rev_slider = new RevSlider();
         $rev_sliders = $rev_slider->getArrSliders();
         foreach ($rev_sliders as $slider) {
             $sliders[] = array('value' => $slider->getAlias(), 'label' => $slider->getTitle());
         }
     }
     $default_slider = get_post_meta($post->ID, '_x_slider_above', true);
     $this->addControl('x_slider_above', 'select', __('Slider', csl18n()), __('To activate your slider, select an option from the dropdown. To deactivate your slider, set the dropdown back to "Deactivated."', csl18n()), $default_slider, array('choices' => $sliders, 'notLive' => 'settings-theme-changed'));
     $this->addControl('x_slider_above_bg_video', 'text', __('Optional Background Video', csl18n()), __('Include your video URL(s) here. If using multiple sources, separate them using the pipe character (|) and place fallbacks towards the end (i.e. .webm then .mp4 then .ogv).', csl18n()), get_post_meta($post->ID, '_x_slider_above_bg_video', true), array('notLive' => 'settings-theme-changed'));
     $this->addControl('x_slider_above_bg_video_poster', 'text', __('Video Poster Image (For Mobile)', csl18n()), __('Click the button to upload your video poster image to show on mobile devices, or enter it in manually using the text field above. Only select one image for this field. To clear, delete the image URL from the text field and save your page.', csl18n()), get_post_meta($post->ID, '_x_slider_above_bg_video_poster', true), array('notLive' => 'settings-theme-changed'));
     $this->addControl('x_slider_above_scroll_bottom_anchor_enable', 'toggle', __('Enable Scroll Bottom Anchor', csl18n()), __('Select to enable the scroll bottom anchor for your slider.', csl18n()), 'on' == get_post_meta($post->ID, '_x_slider_above_scroll_bottom_anchor_enable', true), array('notLive' => 'settings-theme-changed'));
     $alignments = array(array('value' => 'top left', 'label' => 'Top Left'), array('value' => 'top center', 'label' => 'Top Center'), array('value' => 'top right', 'label' => 'Top Right'), array('value' => 'bottom left', 'label' => 'Bottom Left'), array('value' => 'bottom center', 'label' => 'Bottom Center'), array('value' => 'bottom right', 'label' => 'Bottom Right'));
     $this->addControl('x_slider_above_scroll_bottom_anchor_alignment', 'select', __('Scroll Bottom Anchor Alignment', csl18n()), __('Select the alignment of the scroll bottom anchor for your slider.', csl18n()), get_post_meta($post->ID, '_x_slider_above_scroll_bottom_anchor_alignment', true), array('choices' => $alignments, 'notLive' => 'settings-theme-changed'));
     $this->addControl('x_slider_above_scroll_bottom_anchor_color', 'text', __('Scroll Bottom Anchor Color', csl18n()), __('Select the color of the scroll bottom anchor for your slider.', csl18n()), get_post_meta($post->ID, '_x_slider_above_scroll_bottom_anchor_color', true), array('notLive' => 'settings-theme-changed'));
     $this->addControl('x_slider_above_scroll_bottom_anchor_color_hover', 'text', __('Scroll Bottom Anchor Color Hover', csl18n()), __('Select the hover color of the scroll bottom anchor for your slider.', csl18n()), get_post_meta($post->ID, '_x_slider_above_scroll_bottom_anchor_color_hover', true), array('notLive' => 'settings-theme-changed'));
 }
開發者ID:datracka,項目名稱:datalook.io,代碼行數:21,代碼來源:slider-above.php

示例14: buildShortcode

 /**
  * @since 4.3
  */
 public function buildShortcode()
 {
     if (class_exists('RevSlider')) {
         $slider = new RevSlider();
         $arrSliders = $slider->getArrSliders();
         $revsliders = array();
         if ($arrSliders) {
             foreach ($arrSliders as $slider) {
                 /** @var $slider RevSlider */
                 $revsliders[$slider->getTitle()] = $slider->getAlias();
             }
         } else {
             $revsliders[__('No sliders found', 'js_composer')] = 0;
         }
         // add shortcode to visual composer
         $this->mapShortcode($revsliders);
         // Add fixes for frontend editor to regenerate id
         if (vc_is_frontend_ajax() || vc_is_frontend_editor()) {
             add_filter('vc_revslider_shortcode', array(&$this, 'setId'));
         }
     }
 }
開發者ID:hikaram,項目名稱:wee,代碼行數:25,代碼來源:class-vc-vendor-revslider.php

示例15: block

 function block($instance)
 {
     extract($instance);
     if ($mb == '') {
         $mb = '58';
     }
     $slider5 = new RevSlider();
     $arrSliders = $slider5->getArrSliders();
     $sliders_test = '';
     foreach ($arrSliders as $slider5t) {
         $sliders_test .= $slider5t->getAlias();
     }
     if ($sliders_test != '') {
         $slider5->initByAlias($re);
         $sliderParams = $slider5->getParams();
         $revh = $sliderParams["height"];
         $salias = '';
         foreach ($arrSliders as $slider5) {
             $salias .= $slider5->getAlias();
         }
         if ($salias != '') {
             if ($f == 'yes') {
                 echo '<div class="fullwimage rev_slider_fullw">';
                 putRevSlider($re);
                 echo '</div><div style="height:' . $revh . 'px;margin-bottom:' . $mb . 'px;" class="cl"></div>';
             } else {
                 putRevSlider($re);
             }
         }
     }
     //sliders test end
 }
開發者ID:shuramita,項目名稱:dhsd,代碼行數:32,代碼來源:cb-blocks.php


注:本文中的RevSlider::getArrSliders方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。