本文整理汇总了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>';
}
示例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
}
示例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
}
示例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);
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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'))));
}
示例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;
}
示例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;
}
}
示例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'));
}
示例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'));
}
}
}
示例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
}