当前位置: 首页>>代码示例>>PHP>>正文


PHP RevSlider::getAlias方法代码示例

本文整理汇总了PHP中RevSlider::getAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlider::getAlias方法的具体用法?PHP RevSlider::getAlias怎么用?PHP RevSlider::getAlias使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RevSlider的用法示例。


在下文中一共展示了RevSlider::getAlias方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: 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

示例3: array

<?php

////////////////////////////////////////////////////////////////////////////////
// SLIDERS //
$revSliders = array();
$slider_items = array();
// Is the "Slider Revolution plugin installed?
if (class_exists('RevSlider')) {
    // Get any "Slider Revolution" sliders that are built out, if any.
    $temp_count = 0;
    $slider = new RevSlider();
    $arrSliders = $slider->getArrSliders();
    if (!empty($arrSliders)) {
        foreach ($arrSliders as $slider) {
            $title = $slider->getTitle();
            $alias = $slider->getAlias();
            $revSliders['REVSLIDER---' . $alias] = 'REVOLUTION: ' . $title;
            $temp_count++;
        }
    }
}
// Get the Espresso sliders
$slider_items = post_array('espresso-slider');
// Add Revolution sliders to the array, if any
if (!empty($revSliders)) {
    $slider_items = array_merge($slider_items, $revSliders);
    ksort($slider_items);
}
if (!empty($slider_items)) {
    $slider_choice = ECF_Field::factory('select', 'slider_choice', __('Slider to display:', 'espresso'));
    $slider_choice->add_options($slider_items);
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:31,代码来源:pages.php

示例4: previewOutputMarkup


//.........这里部分代码省略.........
                    if (!empty($match) && isset($match[0]) && !empty($match[0])) {
                        //image
                        $use_path = $path_assets;
                        $use_path_raw = $path_assets_raw;
                        $f = true;
                    }
                    if (!empty($match2) && isset($match2[0]) && !empty($match2[0])) {
                        //video
                        $use_path = $path_assets_vid;
                        $use_path_raw = $path_assets_raw_vid;
                        $f = true;
                    }
                    if ($f == false) {
                        //no file, just a location. So change the location accordingly by removing base and add ../../revolution
                        if (strpos($o, 'public/assets/js/') !== false) {
                            //this will be the jsFileLocation script part
                            $slider_html = str_replace($o, '"' . $path_js . '"', $slider_html);
                        }
                        continue;
                        //no correct file, nothing to add
                    }
                    if (isset($added[$_file])) {
                        continue;
                    }
                    $add = '';
                    $__file = '';
                    $repl_to = explode('/', $_file);
                    $repl_to = end($repl_to);
                    $remove = false;
                    if (is_file($upload_dir . $_file)) {
                        $zip->addFile($upload_dir . $_file, $use_path_raw . '/' . $repl_to);
                        $remove = true;
                    } elseif (is_file($upload_dir_multisiteless . $_file)) {
                        $zip->addFile($upload_dir_multisiteless . $_file, $use_path_raw . '/' . $repl_to);
                        $remove = true;
                    } elseif (is_file(RS_PLUGIN_PATH . $_file)) {
                        //remove admin/assets/
                        $__file = str_replace('admin/assets/images/', '', $_file);
                        $zip->addFile(RS_PLUGIN_PATH . $_file, $use_path_raw . '/' . $__file);
                        $remove = true;
                        $add = '/';
                    }
                    if ($remove == true) {
                        $added[$_file] = true;
                        //set as added
                        //replace file with new path
                        if ($add !== '') {
                            $_file = $__file;
                        }
                        //set the different path here
                        $slider_html = str_replace($o, '"' . $use_path . '/' . $repl_to . '"', $slider_html);
                    }
                }
            }
        }
        if ($export_real) {
            //only include if real export
            //add common files to the zip
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.actions.min.js', 'js/extensions/revolution.extension.actions.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.carousel.min.js', 'js/extensions/revolution.extension.carousel.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.kenburn.min.js', 'js/extensions/revolution.extension.kenburn.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.layeranimation.min.js', 'js/extensions/revolution.extension.layeranimation.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.migration.min.js', 'js/extensions/revolution.extension.migration.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.navigation.min.js', 'js/extensions/revolution.extension.navigation.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.parallax.min.js', 'js/extensions/revolution.extension.parallax.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.slideanims.min.js', 'js/extensions/revolution.extension.slideanims.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.video.min.js', 'js/extensions/revolution.extension.video.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/jquery.themepunch.enablelog.js', 'js/jquery.themepunch.enablelog.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/jquery.themepunch.revolution.min.js', 'js/jquery.themepunch.revolution.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/js/jquery.themepunch.tools.min.js', 'js/jquery.themepunch.tools.min.js');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/css/settings.css', 'css/settings.css');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css', 'fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/css/helper.css', 'fonts/pe-icon-7-stroke/css/helper.css');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.eot', 'fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.eot');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.svg', 'fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.svg');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.ttf', 'fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.ttf');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.woff', 'fonts/pe-icon-7-stroke/fonts/Pe-icon-7-stroke.woff');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/css/font-awesome.min.css', 'fonts/font-awesome/css/font-awesome.min.css');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/fonts/FontAwesome.otf', 'fonts/font-awesome/fonts/FontAwesome.otf');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/fonts/fontawesome-webfont.eot', 'fonts/font-awesome/fonts/fontawesome-webfont.eot');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/fonts/fontawesome-webfont.svg', 'fonts/font-awesome/fonts/fontawesome-webfont.svg');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/fonts/fontawesome-webfont.ttf', 'fonts/font-awesome/fonts/fontawesome-webfont.ttf');
            $zip->addFile(RS_PLUGIN_PATH . '/public/assets/fonts/font-awesome/fonts/fontawesome-webfont.woff', 'fonts/font-awesome/fonts/fontawesome-webfont.woff');
            $notice_text = "";
            $notice_text .= __('Using this data is only allowed with a valid licence of the jQuery Slider Revolution Plugin, which can be found at CodeCanyon: http://codecanyon.net/item/slider-revolution-responsive-jquery-plugin/2580848?ref=themepunch', REVSLIDER_TEXTDOMAIN);
            $zip->addFromString("NOTICE.txt", $notice_text);
            //add slider settings
        }
        $zip->addFromString("slider.html", $slider_html);
        //add slider settings
        $zip->close();
        header("Content-type: application/zip");
        header("Content-Disposition: attachment; filename=" . sanitize_title($slider->getAlias()) . ".zip");
        header("Pragma: no-cache");
        header("Expires: 0");
        readfile(RevSliderGlobals::$uploadsUrlExportZip);
        @unlink(RevSliderGlobals::$uploadsUrlExportZip);
        //delete file after sending it to user
        exit;
    }
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:101,代码来源:operations.class.php

示例5: RevSlider

				<?php 
}
?>

				<?php 
$s = '';
if (isset($_GET['s'])) {
    $s = esc_attr(strip_tags($_GET['s']));
}
if ($slide_type == 'revo' && ($slider_home == '' || $slider_home == 'none') && (is_front_page() || is_home() || $slide_home == 'yes') || $slider_home == 'revo' && $s == '' && $slide_home != 'no' || $slider_home == 'revo') {
    if (class_exists("RevSlider") && ($slide_home != 'no' || $slider_home == 'revo')) {
        $slider5 = new RevSlider();
        $arrSliders = $slider5->getArrSliders();
        $salias = '';
        foreach ($arrSliders as $slider5) {
            $salias .= $slider5->getAlias();
        }
        if ($salias != '') {
            if ($revo_type != '' && $slider_home == 'revo') {
                putRevSlider($revo_type);
            } else {
                putRevSlider($rev_slider_name);
            }
        } else {
            echo '<h1 class="confin" style="font-size:20px;font-weight:300!important;color:#FFF!important;padding-top:100px;">Configure this element in Revolution Slider Settings or disable slider</h1>';
        }
    } else {
        if ($slide_home != 'no') {
            echo '<h1 class="confin" style="font-size:20px;font-weight:300!important;color:#FFF!important;padding-top:100px;">Change slider settings or activate Revolution Slider</h1>';
        }
    }
开发者ID:shuramita,项目名称:dhsd,代码行数:31,代码来源:header.php

示例6: 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

示例7: layouts_default_content_sources

function layouts_default_content_sources()
{
    $default_content_sources = array();
    // Static Blocks
    $args = array('posts_per_page' => -1, 'post_type' => 'static_block');
    $posts = get_posts($args);
    $options_static_blocks = array();
    foreach ($posts as $key => $value) {
        $options_static_blocks[$value->ID] = $value->post_title;
    }
    $default_content_sources['Static Block'] = $options_static_blocks;
    // Sidebars
    $sidebars = $GLOBALS['wp_registered_sidebars'];
    $options_sidebars = array();
    foreach ($sidebars as $key => $value) {
        $options_sidebars[$value['id']] = $value['name'];
    }
    $default_content_sources['Sidebar'] = $options_sidebars;
    // Slide shows
    if (class_exists('RevSlider')) {
        $ss = new RevSlider();
        $arrSliders = $ss->getArrSliders();
        $options_sliders = array();
        foreach ($arrSliders as $ss) {
            // Slide data
            $id = $ss->getID();
            $title = $ss->getTitle();
            $alias = $ss->getAlias();
            // Select options
            $options_sliders['RevSlider:' . $alias] = $title;
        }
        $default_content_sources['Slide Show'] = $options_sliders;
    }
    // class_exists('RevSlider')
    return array_merge($default_content_sources);
}
开发者ID:ArnaudGuillou,项目名称:SiteESBVolley,代码行数:36,代码来源:theme-options-filters.php

示例8: load_icon


//.........这里部分代码省略.........
jQuery('#stripes_bg_schema').ddslick({
    onSelected: function(data){
	if(data.selectedIndex > 0) 
       jQuery('#stripes_bg_schema_val').val(data.selectedData.value);
    }   
});
jQuery('#stripes_bg_schema2').ddslick({
    onSelected: function(data){
	if(data.selectedIndex > 0) 
       jQuery('#stripes_bg_schema_val2').val(data.selectedData.value);
    }   
});
});

</script>
<?php 
            /*REVOLUTION SLIDER*/
            ?>
							<div class="revo hide_slider">
							<?php 
            if (in_array('revslider/revslider.php', apply_filters('active_plugins', get_option('active_plugins')))) {
                ?>
								<div class="pd5">
									<label><?php 
                _e('Slider Name', 'cb-getrends');
                ?>
 </label> <select
										name="rev_slider_name">
										<?php 
                $slider = new RevSlider();
                $arrSliders = $slider->getArrSliders();
                foreach ($arrSliders as $slider) {
                    $stitle = $slider->getTitle();
                    $salias = $slider->getAlias();
                    if ($rev_slider_name == $salias) {
                        $curest = ' selected ';
                    } else {
                        $curest = '';
                    }
                    echo '<option value=' . $salias . ' ' . $curest . '>' . $stitle . '</option>';
                }
                ?>
									</select>
								</div>
								<?php 
            }
            ?>

								<br />
								<?php 
            _e('You can configure Revolution Slider by', 'cb-getrends');
            ?>
								<b> <a href="admin.php?page=revslider">clicking here</a> </b><br />

							</div>
							<?php 
            /*REVOLUTION SLIDER END*/
            ?>


							<?php 
            /*ANYTHING SLIDER*/
            $tttra = '';
            ?>
							<div class="any hide_slider">
								<div class="pd5">
开发者ID:shuramita,项目名称:dhsd,代码行数:67,代码来源:cb-menu.php

示例9: new_meta_boxes_post


//.........这里部分代码省略.........
                $hslider4 = ' selected="selected"';
            } else {
                $hslider4 = '';
            }
            if ($home_slider == 'drag') {
                $hslider5 = ' selected="selected"';
            } else {
                $hslider5 = '';
            }
            if ($home_slider == 'full') {
                $hslider6 = ' selected="selected"';
            } else {
                $hslider6 = '';
            }
            if ($home_slider == 'revo') {
                $hslider7 = ' selected="selected"';
            } else {
                $hslider7 = '';
            }
            echo '<div class="frame round"><div class="framein round"><b>' . __('Slider', 'cb-getrends') . '</b><br/><br/>
<select name="cb4_home_slider" id="home_slider"><option value="none">' . __('None', 'cb-getrends') . '</option>
<option value="revo"' . $hslider7 . '>' . __('Revolution Slider', 'cb-getrends') . '</option>
<option value="any"' . $hslider1 . '>' . __('Anything Slider', 'cb-getrends') . '</option>
<option value="full"' . $hslider6 . '>' . __('FullScreen Slider', 'cb-getrends') . '</option>

</select><br/><br/>' . __('Slider settings can be set up in GE Trends Menu in Slider Tab.', 'cb-getrends') . '</div></div>';
            echo '<div class="frame round revo "><div class="framein round"><b>' . __('Revolution Slider Name', 'cb-getrends') . ':</b><br/><br/>';
            echo '<div ><select name="cb4_revo_type">';
            $revo_type = esc_attr(get_post_meta($post->ID, 'cb4_revo_type', 'true'));
            $slider = new RevSlider();
            $arrSliders = $slider->getArrSliders();
            foreach ($arrSliders as $slider) {
                $stitle = $slider->getTitle();
                $salias = $slider->getAlias();
                if ($revo_type == $salias) {
                    $curest = ' selected ';
                } else {
                    $curest = '';
                }
                echo '<option value=' . $salias . ' ' . $curest . '>' . $stitle . '</option>';
            }
            echo '</select></div>
</div>
</div></div>';
            echo '<script type="text/javascript">
 var ht="";
    jQuery("select#home_slider").change(function () {
          jQuery("select#home_slider option:selected").each(function () {
                ht=jQuery(this).val();
              });
          if(ht=="revo") jQuery("."+ht).show(); else jQuery(".revo").hide();

        }).change();';
            if ($home_slider == 'revo') {
                echo 'jQuery(document).ready(function(){
jQuery(".revo").show();
});';
            }
            echo '</script>';
            echo '<div class="bg_head hide_head" style="display:none;">';
            echo '<div class="frame round"><div class="framein round"><b>' . __('Background Image', 'cb-getrends') . ':</b><br/><br/>';
            echo '<input id="cb4_header_bg_image" type="text" size="36" name="cb4_header_bg_image" class="upurl input-upload" value="' . $header_bg_image . '" /><input style="cursor:pointer;" class="upload_button" type="button" value="' . __('Upload Image', 'cb-getrends') . '" /><br /><br/>' . __('Enter an URL or upload image', 'cb-getrends') . '.';
            echo '</div></div>';
            echo '<div class="frame round"><div class="framein round"><b>' . __('Header Top Padding Height', 'cb-getrends') . ':</b><br/><br/>';
            echo '<input name="cb4_header_height" type="text" value="' . $header_height . '"/>';
            echo '<br/>' . _e('without px', 'cb-getrends') . '</div></div>';
开发者ID:shuramita,项目名称:dhsd,代码行数:67,代码来源:post-page-config.php

示例10: get_external_sliders

function get_external_sliders($type)
{
    global $wpdb;
    $sliders = array();
    if ($type == 'layerslider') {
        /* SLIDER VALUES */
        if (class_exists('LS_Sliders')) {
            $layer_sliders = LS_Sliders::find(array('data' => false));
            foreach ($layer_sliders as $item) {
                $sliders = array_merge($sliders, array("layerslider_" . $item['id'] => "LayerSlider - " . $item['name']));
            }
        }
    } else {
        if ($type == 'revslider') {
            if (class_exists('RevSlider')) {
                $revo = new RevSlider();
                $revo_sliders = $revo->getArrSlidersShort();
                foreach ($revo_sliders as $rev_id => $rev_title) {
                    $s = new RevSlider();
                    $s->initByID($rev_id);
                    $alias = $s->getAlias();
                    $sliders = array_merge($sliders, array("revslider_" . $alias => "Revolution Slider - " . $rev_title));
                }
            }
        } else {
            if ($type == 'masterslider') {
                if (function_exists('get_mastersliders')) {
                    $master_sliders = get_mastersliders();
                    foreach ($master_sliders as $slider) {
                        $sliders = array_merge($sliders, array("masterslider_" . $slider['ID'] => "Master Slider - " . $slider['title']));
                    }
                }
            }
        }
    }
    return $sliders;
}
开发者ID:petersondrs,项目名称:tellura,代码行数:37,代码来源:common-functions.php


注:本文中的RevSlider::getAlias方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。