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


PHP RevSliderNavigation类代码示例

本文整理汇总了PHP中RevSliderNavigation的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderNavigation类的具体用法?PHP RevSliderNavigation怎么用?PHP RevSliderNavigation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: RevSliderNavigation

<?php

/**
 * @package   Revolution Slider
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.revolution.themepunch.com/
 * @copyright 2015 ThemePunch
 */
if (!defined('ABSPATH')) {
    exit;
}
$nav = new RevSliderNavigation();
$navigation = intval(RevSliderBase::getGetVar('navigation', 0));
$navigs = $nav->get_all_navigations();
$rsopr = new RevSliderOperations();
$font_families = $rsopr->getArrFontFamilys();
?>
<div class='wrap'>
	<div class="clear_both"></div>

	<div class="title_line nobgnopd" style="margin-bottom: 20px !important;">
		<div class="icon32" id="icon-options-general"></div>
		<div class="view_title">
			<?php 
_e('Navigation Editor', REVSLIDER_TEXTDOMAIN);
?>
		</div>
	</div>
	
	<div class="setting_box navig" style="margin-bottom: 20px;">
		<h3><span class="setting-step-number">1</span><span style="max-width: 400px;"><?php 
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:navigation-editor.php

示例2: onAjaxAction


//.........这里部分代码省略.........
                     $return = ThemePunch_Newsletter::subscribe($data['email']);
                     if ($return !== false) {
                         if (!isset($return['status']) || $return['status'] === 'error') {
                             $error = isset($return['message']) && !empty($return['message']) ? $return['message'] : __('Invalid Email', 'revslider');
                             self::ajaxResponseError($error);
                         } else {
                             self::ajaxResponseSuccess(__("Success! Please check your Emails to finish the subscription", 'revslider'), $return);
                         }
                     } else {
                         self::ajaxResponseError(__('Invalid Email/Could not connect to the Newsletter server', 'revslider'));
                     }
                 } else {
                     self::ajaxResponseError(__('No Email given', 'revslider'));
                 }
                 break;
             case "unsubscribe_to_newsletter":
                 if (isset($data['email']) && !empty($data['email'])) {
                     $return = ThemePunch_Newsletter::unsubscribe($data['email']);
                     if ($return !== false) {
                         if (!isset($return['status']) || $return['status'] === 'error') {
                             $error = isset($return['message']) && !empty($return['message']) ? $return['message'] : __('Invalid Email', 'revslider');
                             self::ajaxResponseError($error);
                         } else {
                             self::ajaxResponseSuccess(__("Success! Please check your Emails to finish the process", 'revslider'), $return);
                         }
                     } else {
                         self::ajaxResponseError(__('Invalid Email/Could not connect to the Newsletter server', 'revslider'));
                     }
                 } else {
                     self::ajaxResponseError(__('No Email given', 'revslider'));
                 }
                 break;
             case 'change_specific_navigation':
                 $nav = new RevSliderNavigation();
                 $found = false;
                 $navigations = $nav->get_all_navigations();
                 foreach ($navigations as $navig) {
                     if ($data['id'] == $navig['id']) {
                         $found = true;
                         break;
                     }
                 }
                 if ($found) {
                     $nav->create_update_navigation($data, $data['id']);
                 } else {
                     $nav->create_update_navigation($data);
                 }
                 self::ajaxResponseSuccess(__('Navigation saved/updated', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 break;
             case 'change_navigations':
                 $nav = new RevSliderNavigation();
                 $nav->create_update_full_navigation($data);
                 self::ajaxResponseSuccess(__('Navigations updated', 'revslider'), array('navs' => $nav->get_all_navigations()));
                 break;
             case 'delete_navigation':
                 $nav = new RevSliderNavigation();
                 if (isset($data) && intval($data) > 0) {
                     $return = $nav->delete_navigation($data);
                     if ($return !== true) {
                         self::ajaxResponseError($return);
                     } else {
                         self::ajaxResponseSuccess(__('Navigation deleted', 'revslider'), array('navs' => $nav->get_all_navigations()));
                     }
                 }
                 self::ajaxResponseError(__('Wrong ID given', 'revslider'));
                 break;
开发者ID:zruiz,项目名称:NG,代码行数:67,代码来源:revslider-admin.class.php

示例3: RevSliderOperations

<?php

/**
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/
 * @copyright 2015 ThemePunch
 */
if (!defined('ABSPATH')) {
    exit;
}
$operations = new RevSliderOperations();
$rs_nav = new RevSliderNavigation();
$arrValues = $operations->getGeneralSettingsValues();
$arr_navigations = $rs_nav->get_all_navigations();
$transitions = $operations->getArrTransition();
$_width = isset($arrValues['width']) ? $arrValues['width'] : 1240;
$_width_notebook = isset($arrValues['width_notebook']) ? $arrValues['width_notebook'] : 1024;
$_width_tablet = isset($arrValues['width_tablet']) ? $arrValues['width_tablet'] : 778;
$_width_mobile = isset($arrValues['width_mobile']) ? $arrValues['width_mobile'] : 480;
if (!isset($is_edit)) {
    $is_edit = false;
}
if (!isset($linksEditSlides)) {
    $linksEditSlides = '';
}
?>
<div class="wrap settings_wrap">
	<div class="clear_both"></div>

	<div class="title_line" style="margin-bottom:0px !important">
		<div id="icon-options-general" class="icon32"></div>
开发者ID:johnmanlove,项目名称:Galveston_Island,代码行数:31,代码来源:slider-main-options.php

示例4: add_custom_navigation_css

    public function add_custom_navigation_css($slides)
    {
        $rs_nav = new RevSliderNavigation();
        $all_navs = $rs_nav->get_all_navigations();
        $slider_type = $this->slider->getParam('slider-type');
        $enable_arrows = $this->slider->getParam('enable_arrows', 'off');
        $enable_bullets = $this->slider->getParam('enable_bullets', 'off');
        $enable_tabs = $this->slider->getParam('enable_tabs', 'off');
        $enable_thumbnails = $this->slider->getParam('enable_thumbnails', 'off');
        if ($slider_type !== 'hero' && ($enable_arrows == 'on' || $enable_bullets == 'on' || $enable_tabs == 'on' || $enable_thumbnails == 'on')) {
            if (!empty($slides)) {
                foreach ($slides as $slide) {
                    $navigation_arrow_style = $this->slider->getParam('navigation_arrow_style', 'round');
                    $navigation_bullets_style = $this->slider->getParam('navigation_bullets_style', 'round');
                    $tabs_style = $this->slider->getParam('tabs_style', 'round');
                    $thumbnails_style = $this->slider->getParam('thumbnails_style', 'round');
                    if (!empty($all_navs)) {
                        foreach ($all_navs as $cur_nav) {
                            //get modifications out, wrap the class with slide class to be specific
                            if ($enable_arrows == 'on' && $cur_nav['handle'] == $navigation_arrow_style) {
                                $this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['arrows'], $cur_nav['handle'], 'arrows', $cur_nav['settings'], $slide, $this) . "\n";
                            }
                            if ($enable_bullets == 'on' && $cur_nav['handle'] == $navigation_bullets_style) {
                                $this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['bullets'], $cur_nav['handle'], 'bullets', $cur_nav['settings'], $slide, $this) . "\n";
                            }
                            if ($enable_tabs == 'on' && $cur_nav['handle'] == $tabs_style) {
                                $this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['tabs'], $cur_nav['handle'], 'tabs', $cur_nav['settings'], $slide, $this) . "\n";
                            }
                            if ($enable_thumbnails == 'on' && $cur_nav['handle'] == $thumbnails_style) {
                                $this->rev_custom_navigation_css .= $rs_nav->add_placeholder_sub_modifications($cur_nav['css']['thumbs'], $cur_nav['handle'], 'thumbs', $cur_nav['settings'], $slide, $this) . "\n";
                            }
                        }
                    }
                }
                if ($this->markup_export === true) {
                    echo '<!-- STYLE -->';
                }
                if (!is_admin()) {
                    echo '<script>var htmlDiv = document.getElementById("rs-plugin-settings-inline-css"); var htmlDivCss="';
                } else {
                    echo "<style>";
                }
                if (!is_admin()) {
                    echo addslashes(RevSliderCssParser::compress_css($this->rev_custom_navigation_css)) . '";
						if(htmlDiv) {
							htmlDiv.innerHTML = htmlDiv.innerHTML + htmlDivCss;
						}else{
							var htmlDiv = document.createElement("div");
							htmlDiv.innerHTML = "<style>" + htmlDivCss + "</style>";
							document.getElementsByTagName("head")[0].appendChild(htmlDiv.childNodes[0]);
						}
					</script>' . "\n";
                } else {
                    echo $this->rev_custom_navigation_css . '</style>';
                }
                if ($this->markup_export === true) {
                    echo '<!-- /STYLE -->';
                }
            }
        }
    }
开发者ID:surreal8,项目名称:wptheme,代码行数:61,代码来源:output.class.php

示例5: putJS


//.........这里部分代码省略.........
tpj.noConflict();<?php 
        }
        ?>

			var revapi<?php 
        echo $sliderID;
        ?>
;
			<?php 
        echo 'tpj(document).ready(function() {' . "\n";
        echo '				if(tpj("#' . $this->sliderHtmlID . '").revolution == undefined){' . "\n";
        echo '					revslider_showDoubleJqueryError("#' . $this->sliderHtmlID . '");' . "\n";
        echo '				}else{' . "\n";
        echo '					revapi' . $sliderID . ' = tpj("#' . $this->sliderHtmlID . '").show().revolution({' . "\n";
        if ($do_delay > 0) {
            echo '						startDelay: ' . esc_attr($do_delay) . ',' . "\n";
        }
        echo '						sliderType:"' . esc_attr($slider_type) . '",' . "\n";
        echo '						jsFileLocation:"' . esc_attr(RS_PLUGIN_URL . 'public/assets/js/') . '",' . "\n";
        if ($optFullScreen == 'on') {
            $sl_layout = 'fullscreen';
        } elseif ($optFullWidth == 'on') {
            $sl_layout = 'fullwidth';
        } else {
            $sl_layout = 'auto';
        }
        echo '						sliderLayout:"' . $sl_layout . '",' . "\n";
        echo '						dottedOverlay:"' . esc_attr($this->slider->getParam("background_dotted_overlay", "none")) . '",' . "\n";
        echo '						delay:' . esc_attr($this->slider->getParam("delay", "9000", RevSlider::FORCE_NUMERIC)) . ',' . "\n";
        $enable_arrows = $this->slider->getParam('enable_arrows', 'off');
        $enable_bullets = $this->slider->getParam('enable_bullets', 'off');
        $enable_tabs = $this->slider->getParam('enable_tabs', 'off');
        $enable_thumbnails = $this->slider->getParam('enable_thumbnails', 'off');
        $rs_nav = new RevSliderNavigation();
        $all_navs = $rs_nav->get_all_navigations();
        $touch_enabled = $this->slider->getParam('touchenabled', 'on');
        $keyboard_enabled = $this->slider->getParam('keyboard_navigation', 'off');
        $keyboard_direction = $this->slider->getParam('keyboard_direction', 'horizontal');
        $mousescroll_enabled = $this->slider->getParam('mousescroll_navigation', 'off');
        //no navigation if we are hero
        if ($slider_type !== 'hero' && ($enable_arrows == 'on' || $enable_bullets == 'on' || $enable_tabs == 'on' || $enable_thumbnails == 'on' || $touch_enabled == 'on' || $keyboard_enabled == 'on' || $mousescroll_enabled == 'on')) {
            echo '						navigation: {' . "\n";
            echo '							keyboardNavigation:"' . esc_attr($keyboard_enabled) . '",' . "\n";
            echo '							keyboard_direction: "' . esc_attr($keyboard_direction) . '",' . "\n";
            echo '							mouseScrollNavigation:"' . esc_attr($mousescroll_enabled) . '",' . "\n";
            if ($slider_type !== 'hero') {
                echo '							onHoverStop:"' . esc_attr($this->slider->getParam("stop_on_hover", "on")) . '",' . "\n";
            }
            $add_comma = false;
            if ($touch_enabled == 'on') {
                $add_comma = true;
                echo '							touch:{' . "\n";
                echo '								touchenabled:"' . esc_attr($touch_enabled) . '",' . "\n";
                echo '								swipe_threshold: ' . esc_attr($swipe_velocity) . ',' . "\n";
                echo '								swipe_min_touches: ' . esc_attr($swipe_min_touches) . ',' . "\n";
                echo '								swipe_direction: "' . esc_attr($swipe_direction) . '",' . "\n";
                echo '								drag_block_vertical: ';
                echo $drag_block_vertical == 'true' ? 'true' : 'false';
                echo "\n";
                echo '							}' . "\n";
            }
            if ($enable_arrows == 'on') {
                $navigation_arrow_style = $this->slider->getParam('navigation_arrow_style', 'round');
                $arrows_always_on = $this->slider->getParam('arrows_always_on', 'true') == 'true' ? 'true' : 'false';
                $hide_arrows_on_mobile = $this->slider->getParam('hide_arrows_on_mobile', 'off') == 'on' ? 'true' : 'false';
                $hide_arrows_over = $this->slider->getParam('hide_arrows_over', 'off') == 'on' ? 'true' : 'false';
开发者ID:silverbux,项目名称:smartmag-magazine-wordpress,代码行数:67,代码来源:output.class.php

示例6: exportSlider


//.........这里部分代码省略.........
                         }
                     }
                     if (isset($layer['type']) && $layer['type'] == 'svg') {
                         if (isset($layer['svg']) && isset($layer['svg']->src)) {
                             $usedSVG[$layer['svg']->src] = true;
                         }
                     }
                 }
             }
         }
     }
     $arrSliderExport = array("params" => $sliderParams, "slides" => $arrSlides);
     if (!empty($arrStaticSlide)) {
         $arrSliderExport['static_slides'] = $arrStaticSlide;
     }
     $strExport = serialize($arrSliderExport);
     //$strExportAnim = serialize(RevSliderOperations::getFullCustomAnimations());
     $exportname = !empty($this->alias) ? $this->alias . '.zip' : "slider_export.zip";
     //add navigations if not default animation
     if (isset($sliderParams['navigation_arrow_style'])) {
         $usedNavigations[$sliderParams['navigation_arrow_style']] = true;
     }
     if (isset($sliderParams['navigation_bullets_style'])) {
         $usedNavigations[$sliderParams['navigation_bullets_style']] = true;
     }
     if (isset($sliderParams['thumbnails_style'])) {
         $usedNavigations[$sliderParams['thumbnails_style']] = true;
     }
     if (isset($sliderParams['tabs_style'])) {
         $usedNavigations[$sliderParams['tabs_style']] = true;
     }
     $navs = false;
     if (!empty($usedNavigations)) {
         $navs = RevSliderNavigation::export_navigation($usedNavigations);
         if ($navs !== false) {
             $navs = serialize($navs);
         }
     }
     $styles = '';
     if (!empty($usedCaptions)) {
         $captions = array();
         foreach ($usedCaptions as $class => $val) {
             $cap = RevSliderOperations::getCaptionsContentArray($class);
             //set also advanced styles here...
             if (!empty($cap)) {
                 $captions[] = $cap;
             }
         }
         $styles = RevSliderCssParser::parseArrayToCss($captions, "\n", true);
     }
     $animations = '';
     if (!empty($usedAnimations)) {
         $animation = array();
         foreach ($usedAnimations as $anim => $val) {
             $anima = RevSliderOperations::getFullCustomAnimationByID($anim);
             if ($anima !== false) {
                 $animation[] = $anima;
             }
         }
         if (!empty($animation)) {
             $animations = serialize($animation);
         }
     }
     $usedImages = array_merge($usedImages, $usedVideos);
     $usepcl = false;
     if (class_exists('ZipArchive')) {
开发者ID:ksan5835,项目名称:maadithottam,代码行数:67,代码来源:slider.class.php


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