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


PHP RevSliderOperations::getGeneralSettingsValues方法代码示例

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


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

示例1: putRevSlider

 /**
  *
  * put rev slider on the page.
  * the data can be slider ID or slider alias.
  */
 function putRevSlider($data, $putIn = "")
 {
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = RevSliderFunctions::getVal($arrValues, "includes_globally", "on");
     $strPutIn = RevSliderFunctions::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     if ($isPutIn == false && $includesGlobally == "off") {
         $output = new RevSliderOutput();
         $option1Name = __("Include RevSlider libraries globally (all pages/posts)", 'revslider');
         $option2Name = __("Pages to include RevSlider libraries", 'revslider');
         $output->putErrorMessage(__("If you want to use the PHP function \"putRevSlider\" in your code please make sure to check \" ", 'revslider') . $option1Name . __(" \" in the backend's \"General Settings\" (top right panel). <br> <br> Or add the current page to the \"", 'revslider') . $option2Name . __("\" option box.", 'revslider'));
         return false;
     }
     ob_start();
     $slider = RevSliderOutput::putSlider($data, $putIn);
     $content = ob_get_contents();
     ob_clean();
     ob_end_clean();
     if (is_object($slider)) {
         $disable_on_mobile = @$slider->getParam("disable_on_mobile", "off");
         // Do not output Slider if we are on mobile
         if ($disable_on_mobile == 'on') {
             $mobile = strstr($_SERVER['HTTP_USER_AGENT'], 'Android') || strstr($_SERVER['HTTP_USER_AGENT'], 'webOS') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'Windows Phone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad') || wp_is_mobile() ? true : false;
             if ($mobile) {
                 return false;
             }
         }
     }
     echo $content;
 }
开发者ID:dawnthemes,项目名称:tkb,代码行数:36,代码来源:revslider.php

示例2: putJavascript

    /**
     * 
     * javascript output to footer
     */
    public static function putJavascript()
    {
        $urlPlugin = RS_PLUGIN_URL . "public/assets/";
        $operations = new RevSliderOperations();
        $arrValues = $operations->getGeneralSettingsValues();
        $js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
        if ($js_defer != 'off') {
            $js_defer = 'defer="defer"';
        } else {
            $js_defer = '';
        }
        ?>

		<script type='text/javascript' <?php 
        echo $js_defer;
        ?>
 src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.tools.min.js?rev=<?php 
        echo RevSliderGlobals::SLIDER_REVISION;
        ?>
'></script>
		<script type='text/javascript' <?php 
        echo $js_defer;
        ?>
 src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.revolution.min.js?rev=<?php 
        echo RevSliderGlobals::SLIDER_REVISION;
        ?>
'></script>
		<?php 
    }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:39,代码来源:revslider-front.class.php

示例3: add_notices

    /**
     * add notices from ThemePunch
     * @since: 4.6.8
     */
    public function add_notices()
    {
        $operations = new RevSliderOperations();
        $general_settings = $operations->getGeneralSettingsValues();
        //check permissions here
        if (!current_user_can('administrator')) {
            return true;
        }
        $enable_newschannel = RevSliderBase::getVar($general_settings, 'enable_newschannel', 'on');
        $enable_newschannel = apply_filters('revslider_set_notifications', $enable_newschannel);
        if ($enable_newschannel == 'on') {
            $nonce = wp_create_nonce("revslider_actions");
            $notices = get_option('revslider-notices', false);
            if (!empty($notices) && is_array($notices)) {
                global $revslider_screens;
                $notices_discarded = get_option('revslider-notices-dc', array());
                $screen = get_current_screen();
                foreach ($notices as $notice) {
                    if ($notice->is_global !== true && !in_array($screen->id, $revslider_screens)) {
                        continue;
                    }
                    //check if global or just on plugin related pages
                    if (!in_array($notice->code, $notices_discarded) && version_compare($notice->version, GlobalsRevSlider::SLIDER_REVISION, '>=')) {
                        $text = '<div style="text-align:right;vertical-align:middle;display:table-cell; min-width:225px;border-left:1px solid #ddd; padding-left:15px;"><a href="javascript:void(0);"  class="rs-notices-button rs-notice-' . esc_attr($notice->code) . '">' . __('Close & don\'t show again<b>X</b>', 'revslider') . '</a></div>';
                        if ($notice->disable == true) {
                            $text = '';
                        }
                        ?>
								<style>
							.rs-notices-button			{	color:#999; text-decoration: none !important; font-size:14px;font-weight: 400;}
							.rs-notices-button:hover 	{	color:#3498DB !important;}

							.rs-notices-button b 		{	font-weight:800; vertical-align:bottom;line-height:15px;font-size:10px;margin-left:10px;margin-right:10px;border:2px solid #999; display:inline-block; width:15px;height:15px; text-align: center; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%;}
							.rs-notices-button:hover b  { 	border-color:#3498DB;}
							</style>
							<div class="<?php 
                        echo $notice->color;
                        ?>
 below-h2 rs-update-notice-wrap" id="message" style="clear:both;display: block;position:relative;margin:35px 20px 25px 0px"><div style="display:table;width:100%;"><div style="vertical-align:middle;display:table-cell;min-width:100%;padding-right:15px;"><?php 
                        echo $notice->text;
                        ?>
</div><?php 
                        echo $text;
                        ?>
</div></div>

							<?php 
                    }
                }
                ?>
				<script type="text/javascript">
					jQuery('.rs-notices-button').click(function(){
						
						var notice_id = jQuery(this).attr('class').replace('rs-notices-button', '').replace('rs-notice-', '');
						
						var objData = {
										action:"revslider_ajax_action",
										client_action: 'dismiss_dynamic_notice',
										nonce:'<?php 
                echo $nonce;
                ?>
',
										data:{'id':notice_id}
										};

						jQuery.ajax({
							type:"post",
							url:ajaxurl,
							dataType: 'json',
							data:objData
						});

						jQuery(this).closest('.rs-update-notice-wrap').slideUp(200);
					});
				</script>
				<?php 
            }
        }
    }
开发者ID:zruiz,项目名称:NG,代码行数:83,代码来源:revslider-admin.class.php

示例4: get_slider_speed


//.........这里部分代码省略.........
        if ($using_videos == true) {
            $jsfiles['revolution.extension.video.min.js'] = RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.video.min.js';
        }
        if ($using_actions == true) {
            $jsfiles['revolution.extension.actions.min.js'] = RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.actions.min.js';
        }
        if ($using_layeranim == true) {
            $jsfiles['revolution.extension.layeranimation.min.js'] = RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.layeranimation.min.js';
        }
        if ($using_carousel == true) {
            $jsfiles['revolution.extension.carousel.min.js'] = RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.carousel.min.js';
        } else {
            $jsfiles['revolution.extension.slideanims.min.js'] = RS_PLUGIN_PATH . '/public/assets/js/extensions/revolution.extension.slideanims.min.js';
        }
        //get the js files
        foreach ($jsfiles as $name => $path) {
            if (file_exists($path)) {
                $fs = filesize($path);
                echo '<li class="tp-monitor-listli">';
                echo '<span class="tp-monitor-good"></span>';
                echo '<span class="tp-monitor-size">' . size_format($fs, 0) . '</span>';
                echo '<span class="tp-monitor-file">';
                echo $name;
                echo '</span>';
                echo '</li>';
                $total_size += $fs;
                $js_size += $fs;
            }
        }
        echo '</ul>';
        echo ' <span style="display:none" id="css-size-hidden">' . size_format($js_size, 2) . '</span>';
        $http = is_ssl() ? 'https' : 'http';
        $operations = new RevSliderOperations();
        $arrValues = $operations->getGeneralSettingsValues();
        $set_diff_font = RevSliderFunctions::getVal($arrValues, "change_font_loading", '');
        if ($set_diff_font !== '') {
            $font_url = $set_diff_font;
        } else {
            $font_url = $http . '://fonts.googleapis.com/css?family=';
        }
        $my_fonts = $slider->getParam('google_font', array());
        ?>
		<span class="tp-clearfix" style="height:15px"></span>
			<hr>
			<span class="tp-clearfix" style="height:25px"></span>
			
			<!-- THE Fonts PERFORMANCE MESSING -->
			<span class="tp-monitor-performance-title"><?php 
        echo __("Google Fonts Performance", REVSLIDER_TEXTDOMAIN);
        ?>
</span>
			<span class="tp-monitor-performace-wrap">
				<span id="video-performace-bar" style="width:%font_performance%%" class="tp-monitor-performance-bar mo-%font_color%-col"></span>
				<span class="tp-monitor-slow"><?php 
        echo __("Slow", REVSLIDER_TEXTDOMAIN);
        ?>
</span>
				<span class="tp-monitor-ok"><?php 
        echo __("Ok", REVSLIDER_TEXTDOMAIN);
        ?>
</span>
				<span class="tp-monitor-fast"><?php 
        echo __("Fast", REVSLIDER_TEXTDOMAIN);
        ?>
</span>
			</span>
开发者ID:hathbanger,项目名称:squab,代码行数:67,代码来源:operations.class.php

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

示例6: RevSliderOperations

<?php

if (!defined('ABSPATH')) {
    exit;
}
global $revSliderVersion;
$wrapperClass = "";
if (RevSliderGlobals::$isNewVersion == false) {
    $wrapperClass = " oldwp";
}
$nonce = wp_create_nonce("revslider_actions");
$rsop = new RevSliderOperations();
$glval = $rsop->getGeneralSettingsValues();
?>

<?php 
$waitstyle = '';
if (isset($_REQUEST['update_shop'])) {
    $waitstyle = 'display:block';
}
?>

<div id="waitaminute" style="<?php 
echo $waitstyle;
?>
">
	<div class="waitaminute-message"><i class="eg-icon-emo-coffee"></i><br><?php 
_e("Please Wait...", REVSLIDER_TEXTDOMAIN);
?>
</div>
</div>
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:master-view.php

示例7: RevSliderOperations

            _e("Order Posts", REVSLIDER_TEXTDOMAIN);
            ?>
</a>
						<?php 
        }
        ?>
					<a class="button-primary  export_slider_overview" id="export_slider_<?php 
        echo $id;
        ?>
" href="javascript:void(0);" ><i class="revicon-export"></i><?php 
        _e("Export", REVSLIDER_TEXTDOMAIN);
        ?>
</a>
					<?php 
        $operations = new RevSliderOperations();
        $general_settings = $operations->getGeneralSettingsValues();
        $show_dev_export = RevSliderBase::getVar($general_settings, 'show_dev_export', 'off');
        if ($show_dev_export == 'on') {
            ?>
						<a class="button-primary  export_slider_standalone" id="export_slider_standalone_<?php 
            echo $id;
            ?>
" href="javascript:void(0);" ><i class="revicon-export"></i><?php 
            _e("Export to HTML", REVSLIDER_TEXTDOMAIN);
            ?>
</a>
						<?php 
        }
        ?>
					<a class="button-primary  button_delete_slider" id="button_delete_<?php 
        echo $id;
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:sliders-list.php

示例8: putSliderBase

 /**
  *
  * put html slider on the html page.
  * @param $data - mixed, can be ID ot Alias.
  */
 public function putSliderBase($sliderID, $gal_ids = array(), $markup_export = false, $settings = array(), $order = array())
 {
     $this->markup_export = $markup_export;
     try {
         $slver = apply_filters('revslider_remove_version', RevSliderGlobals::SLIDER_REVISION);
         self::$sliderSerial++;
         $this->slider = new RevSlider();
         if ($sliderID !== '-99') {
             $this->slider->initByMixed($sliderID);
         } else {
             //do default
             $this->slider->initByMixed($sliderID);
         }
         //modify settings if there are any special settings given through the shortcode
         if (!empty($settings)) {
             $this->modify_settings($settings);
         }
         //modify settings for admin preview mode
         if ($this->previewMode == true) {
             $this->modifyPreviewModeSettings();
         }
         //set slider language
         $isWpmlExists = RevSliderWpml::isWpmlExists();
         $useWpml = $this->slider->getParam("use_wpml", "off");
         if ($isWpmlExists && $useWpml == "on") {
             if ($this->previewMode == false) {
                 $this->sliderLang = RevSliderFunctionsWP::getCurrentLangCode();
             }
         }
         //edit html before slider
         $htmlBeforeSlider = "";
         if ($markup_export === true) {
             $htmlBeforeSlider .= '<!-- FONT -->';
         }
         if ($this->slider->getParam("load_googlefont", "false") == "true") {
             $googleFont = $this->slider->getParam("google_font");
             if (is_array($googleFont)) {
                 foreach ($googleFont as $key => $font) {
                 }
             } else {
                 $htmlBeforeSlider .= RevSliderOperations::getCleanFontImport($googleFont);
             }
         }
         $gfonts = $this->slider->getParam("google_font", array());
         if (!empty($gfonts) && is_array($gfonts)) {
             foreach ($gfonts as $gf) {
                 $gf = str_replace(array('"', '+'), array('', ' '), $gf);
                 $htmlBeforeSlider .= RevSliderOperations::getCleanFontImport($gf);
             }
         }
         //add all google fonts of layers
         $gfsubsets = $this->slider->getParam("subsets", array());
         $gf = $this->slider->getUsedFonts(false);
         foreach ($gf as $gfk => $gfv) {
             $tcf = $gfk . ':';
             if (!empty($gfv['variants'])) {
                 $mgfirst = true;
                 foreach ($gfv['variants'] as $mgvk => $mgvv) {
                     if (!$mgfirst) {
                         $tcf .= ',';
                     }
                     $tcf .= $mgvk;
                     $mgfirst = false;
                 }
             }
             if (!empty($gfv['subsets'])) {
                 $mgfirst = true;
                 foreach ($gfv['subsets'] as $ssk => $ssv) {
                     if (array_search(esc_attr($gfk . '+' . $ssv), $gfsubsets) !== false) {
                         if ($mgfirst) {
                             $tcf .= '&subset=';
                         }
                         if (!$mgfirst) {
                             $tcf .= ',';
                         }
                         $tcf .= $ssv;
                         $mgfirst = false;
                     }
                 }
             }
             $htmlBeforeSlider .= RevSliderOperations::getCleanFontImport($tcf);
         }
         if ($markup_export === true) {
             $htmlBeforeSlider .= '<!-- /FONT -->';
         }
         //pub js to body handle
         if ($this->slider->getParam("js_to_body", "false") == "true") {
             $operations = new RevSliderOperations();
             $arrValues = $operations->getGeneralSettingsValues();
             $enable_logs = RevSliderFunctions::getVal($arrValues, "enable_logs", 'off');
             if ($markup_export === true) {
                 $htmlBeforeSlider .= '<!-- SCRIPTINCLUDE -->';
             }
             if ($enable_logs == 'on') {
                 $urlIncludeJS = RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.enablelog.js?rev=' . $slver;
//.........这里部分代码省略.........
开发者ID:surreal8,项目名称:wptheme,代码行数:101,代码来源:output.class.php

示例9: get_responsive_size

 public static function get_responsive_size($slider)
 {
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $enable_custom_size_notebook = $slider->slider->getParam('enable_custom_size_notebook', 'off');
     $enable_custom_size_tablet = $slider->slider->getParam('enable_custom_size_tablet', 'off');
     $enable_custom_size_iphone = $slider->slider->getParam('enable_custom_size_iphone', 'off');
     $adv_resp_sizes = $enable_custom_size_notebook == 'on' || $enable_custom_size_tablet == 'on' || $enable_custom_size_iphone == 'on' ? true : false;
     if ($adv_resp_sizes == true) {
         $width = $slider->slider->getParam("width", 1240, RevSlider::FORCE_NUMERIC);
         $width .= ',' . $slider->slider->getParam("width_notebook", 1024, RevSlider::FORCE_NUMERIC);
         $width .= ',' . $slider->slider->getParam("width_tablet", 778, RevSlider::FORCE_NUMERIC);
         $width .= ',' . $slider->slider->getParam("width_mobile", 480, RevSlider::FORCE_NUMERIC);
         $height = $slider->slider->getParam("height", 868, RevSlider::FORCE_NUMERIC);
         $height .= ',' . $slider->slider->getParam("height_notebook", 768, RevSlider::FORCE_NUMERIC);
         $height .= ',' . intval($slider->slider->getParam("height_tablet", 960, RevSlider::FORCE_NUMERIC));
         $height .= ',' . intval($slider->slider->getParam("height_mobile", 720, RevSlider::FORCE_NUMERIC));
         $responsive = isset($arrValues['width']) ? $arrValues['width'] : '1240';
         $def = isset($arrValues['width']) ? $arrValues['width'] : '1240';
         $responsive .= ',';
         if ($enable_custom_size_notebook == 'on') {
             $responsive .= isset($arrValues['width_notebook']) ? $arrValues['width_notebook'] : '1024';
             $def = isset($arrValues['width_notebook']) ? $arrValues['width_notebook'] : '1024';
         } else {
             $responsive .= $def;
         }
         $responsive .= ',';
         if ($enable_custom_size_tablet == 'on') {
             $responsive .= isset($arrValues['width_tablet']) ? $arrValues['width_tablet'] : '778';
             $def = isset($arrValues['width_tablet']) ? $arrValues['width_tablet'] : '778';
         } else {
             $responsive .= $def;
         }
         $responsive .= ',';
         if ($enable_custom_size_iphone == 'on') {
             $responsive .= isset($arrValues['width_mobile']) ? $arrValues['width_mobile'] : '480';
             $def = isset($arrValues['width_mobile']) ? $arrValues['width_mobile'] : '480';
         } else {
             $responsive .= $def;
         }
         return array('level' => $responsive, 'height' => $height, 'width' => $width);
     } else {
         return array('height' => $slider->slider->getParam("height", "868", RevSlider::FORCE_NUMERIC), 'width' => $slider->slider->getParam("width", "1240", RevSlider::FORCE_NUMERIC));
     }
 }
开发者ID:LuisEnVilla,项目名称:viajes400,代码行数:45,代码来源:functions.class.php

示例10: modify_punch_url

 /**
  * Change FontURL to new URL (added for chinese support since google is blocked there)
  * @since: 5.0
  */
 public static function modify_punch_url($url)
 {
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $set_diff_font = RevSliderFunctions::getVal($arrValues, "change_font_loading", '');
     if ($set_diff_font !== '') {
         return $set_diff_font;
     } else {
         return $url;
     }
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:15,代码来源:revslider-front.class.php


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