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


PHP RevSliderBase::getVar方法代码示例

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


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

示例1: onAddScripts

 /**
  * 
  * a must function. you can not use it, but the function must stay there!
  */
 public static function onAddScripts()
 {
     global $wp_version;
     $slver = apply_filters('revslider_remove_version', RevSliderGlobals::SLIDER_REVISION);
     $style_pre = '';
     $style_post = '';
     if ($wp_version < 3.7) {
         $style_pre = '<style type="text/css">';
         $style_post = '</style>';
     }
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = RevSliderFunctions::getVal($arrValues, "includes_globally", "on");
     $includesFooter = RevSliderFunctions::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = RevSliderFunctions::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     $do_inclusion = apply_filters('revslider_include_libraries', false);
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off" && $do_inclusion == false) {
         $isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
         $hasShortcode = RevSliderFunctionsWP::hasShortcode("rev_slider");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     wp_enqueue_style('rs-plugin-settings', RS_PLUGIN_URL . 'public/assets/css/settings.css', array(), $slver);
     $custom_css = RevSliderOperations::getStaticCss();
     $custom_css = RevSliderCssParser::compress_css($custom_css);
     if (trim($custom_css) == '') {
         $custom_css = '#rs-demo-id {}';
     }
     wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
     $setBase = is_ssl() ? "https://" : "http://";
     wp_enqueue_script(array('jquery'));
     $waitfor = array('jquery');
     $enable_logs = RevSliderFunctions::getVal($arrValues, "enable_logs", 'off');
     if ($enable_logs == 'on') {
         wp_enqueue_script('enable-logs', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.enablelog.js', $waitfor, $slver);
         $waitfor[] = 'enable-logs';
     }
     $ft = $includesFooter == "off" ? false : true;
     wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', $waitfor, $slver, $ft);
     wp_enqueue_script('revmin', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.revolution.min.js', 'tp-tools', $slver, $ft);
     add_action('wp_head', array('RevSliderFront', 'add_meta_generator'));
     add_action("wp_footer", array('RevSliderFront', "load_icon_fonts"));
     // Async JS Loading
     $js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
     if ($js_defer != 'off') {
         add_filter('clean_url', array('RevSliderFront', 'add_defer_forscript'), 11, 1);
     }
     add_action('wp_before_admin_bar_render', array('RevSliderFront', 'add_admin_menu_nodes'));
     add_action('wp_footer', array('RevSliderFront', 'putAdminBarMenus'));
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:58,代码来源:revslider-front.class.php

示例2: get_image_attributes

 public function get_image_attributes($slider_type)
 {
     $params = $this->params;
     $bgType = RevSliderBase::getVar($params, "background_type", "transparent");
     $bgColor = RevSliderBase::getVar($params, "slide_bg_color", "transparent");
     $bgFit = RevSliderBase::getVar($params, "bg_fit", "cover");
     $bgFitX = intval(RevSliderBase::getVar($params, "bg_fit_x", "100"));
     $bgFitY = intval(RevSliderBase::getVar($params, "bg_fit_y", "100"));
     $bgPosition = RevSliderBase::getVar($params, "bg_position", "center top");
     $bgPositionX = intval(RevSliderBase::getVar($params, "bg_position_x", "0"));
     $bgPositionY = intval(RevSliderBase::getVar($params, "bg_position_y", "0"));
     $bgRepeat = RevSliderBase::getVar($params, "bg_repeat", "no-repeat");
     $bgStyle = ' ';
     if ($bgFit == 'percentage') {
         $bgStyle .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
     } else {
         $bgStyle .= "background-size: " . $bgFit . ";";
     }
     if ($bgPosition == 'percentage') {
         $bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
     } else {
         $bgStyle .= "background-position: " . $bgPosition . ";";
     }
     $bgStyle .= "background-repeat: " . $bgRepeat . ";";
     $thumb = '';
     switch ($slider_type) {
         case 'gallery':
             $imageID = RevSliderBase::getVar($params, "image_id");
             if (empty($imageID)) {
                 $thumb = RevSliderBase::getVar($params, "image");
                 $imgID = RevSliderBase::get_image_id_by_url($thumb);
                 if ($imgID !== false) {
                     $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imgID, RevSliderFunctionsWP::THUMB_MEDIUM);
                 }
             } else {
                 $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imageID, RevSliderFunctionsWP::THUMB_MEDIUM);
             }
             break;
         case 'posts':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/post.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'facebook':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/fb.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'twitter':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/tw.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'instagram':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/ig.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'flickr':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/fr.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'youtube':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/yt.png';
             $bgStyle = 'background-size: cover;';
             break;
         case 'vimeo':
             $thumb = RS_PLUGIN_URL . 'public/assets/assets/sources/vm.png';
             $bgStyle = 'background-size: cover;';
             break;
     }
     if ($thumb == '') {
         $thumb = RevSliderBase::getVar($params, "image");
     }
     $bg_fullstyle = '';
     $bg_extraClass = '';
     $data_urlImageForView = '';
     //if($bgType=="image" || $bgType=="streamvimeo" || $bgType=="streamyoutube" || $bgType=="streaminstagram" || $bgType=="html5") {
     $data_urlImageForView = $thumb;
     $bg_fullstyle = $bgStyle;
     //}
     if ($bgType == "solid") {
         $bg_fullstyle = 'background-color:' . $bgColor . ';';
     }
     if ($bgType == "trans" || $bgType == "transparent") {
         $bg_extraClass = 'mini-transparent';
     }
     return array('url' => $data_urlImageForView, 'class' => $bg_extraClass, 'style' => $bg_fullstyle);
 }
开发者ID:hathbanger,项目名称:squab,代码行数:85,代码来源:slide.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: 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

示例5:

	
	var global_grid_sizes = {
		'desktop': '<?php 
echo RevSliderBase::getVar($glval, 'width', 1230);
?>
',
		'notebook': '<?php 
echo RevSliderBase::getVar($glval, 'width_notebook', 1230);
?>
',
		'tablet': '<?php 
echo RevSliderBase::getVar($glval, 'width_tablet', 992);
?>
',
		'mobile': '<?php 
echo RevSliderBase::getVar($glval, 'width_mobile', 480);
?>
'
	};
	
</script>

<div id="div_debug"></div>

<div class='unite_error_message' id="error_message" style="display:none;"></div>

<div class='unite_success_message' id="success_message" style="display:none;"></div>

<div id="viewWrapper" class="view_wrapper<?php 
echo $wrapperClass;
?>
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:30,代码来源:master-view.php

示例6: _e

            ?>
</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

示例7: foreach

">
						<?php 
            echo '<div class="template_slider_title">' . $c_title . '</div>';
            foreach ($c_slides as $c_slide) {
                ?>
							<div class="temp_slide_single_wrapper">
							<?php 
                $mod_slide = array();
                $mod_slide['id'] = $c_slide->getID();
                $mod_slide['params'] = $c_slide->getParams();
                //$mod_slide['layers'] = $c_slide->getLayers();
                $mod_slide['settings'] = $c_slide->getSettings();
                $mod_slide['settings']['width'] = $width;
                $mod_slide['settings']['height'] = $height;
                $mod_slide["user_template"] = true;
                $title = str_replace("'", "", RevSliderBase::getVar($mod_slide['params'], 'title', 'Slide'));
                $tmpl->write_template_markup($mod_slide);
                ?>
								<div class="template_meta_line">									
									<span class="template_local"><?php 
                _e("Local Slide", "revslider");
                ?>
</span>									
								</div>	
								<div class="template_thumb_title"><?php 
                echo $title;
                ?>
</div>
							</div>
							<?php 
            }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:31,代码来源:template-selector.php

示例8: write_template_markup

    /**
     * output markup for template
     * @since: 5.0
     */
    public function write_template_markup($template, $slider_id = false)
    {
        $params = $template['params'];
        $settings = $template['settings'];
        $slide_id = $template['id'];
        $title = str_replace("'", "", RevSliderBase::getVar($params, 'title', 'Slide'));
        if ($slider_id !== false) {
            $title = '';
        }
        //remove Title if Slider
        $width = RevSliderBase::getVar($settings, "width", 1240);
        $height = RevSliderBase::getVar($settings, "height", 868);
        $bgType = RevSliderBase::getVar($params, "background_type", "transparent");
        $bgColor = RevSliderBase::getVar($params, "slide_bg_color", "transparent");
        $bgFit = RevSliderBase::getVar($params, "bg_fit", "cover");
        $bgFitX = intval(RevSliderBase::getVar($params, "bg_fit_x", "100"));
        $bgFitY = intval(RevSliderBase::getVar($params, "bg_fit_y", "100"));
        $bgPosition = RevSliderBase::getVar($params, "bg_position", "center center");
        $bgPositionX = intval(RevSliderBase::getVar($params, "bg_position_x", "0"));
        $bgPositionY = intval(RevSliderBase::getVar($params, "bg_position_y", "0"));
        $bgRepeat = RevSliderBase::getVar($params, "bg_repeat", "no-repeat");
        $bgStyle = ' ';
        if ($bgFit == 'percentage') {
            if (intval($bgFitY) == 0 || intval($bgFitX) == 0) {
                $bgStyle .= "background-size: cover;";
            } else {
                $bgStyle .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
            }
        } else {
            $bgStyle .= "background-size: " . $bgFit . ";";
        }
        if ($bgPosition == 'percentage') {
            $bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
        } else {
            $bgStyle .= "background-position: " . $bgPosition . ";";
        }
        $bgStyle .= "background-repeat: " . $bgRepeat . ";";
        if (isset($template['img'])) {
            $thumb = $this->_check_file_path($template['img'], true);
        } else {
            $imageID = RevSliderBase::getVar($params, "image_id");
            if (empty($imageID)) {
                $thumb = RevSliderBase::getVar($params, "image");
                $imgID = RevSliderBase::get_image_id_by_url($thumb);
                if ($imgID !== false) {
                    $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imgID, RevSliderFunctionsWP::THUMB_MEDIUM);
                }
            } else {
                $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imageID, RevSliderFunctionsWP::THUMB_MEDIUM);
            }
            if ($thumb == '') {
                $thumb = RevSliderBase::getVar($params, "image");
            }
        }
        $bg_fullstyle = '';
        $bg_extraClass = '';
        $data_urlImageForView = '';
        if (isset($template['img'])) {
            $data_urlImageForView = 'data-src="' . $thumb . '"';
        } else {
            if ($bgType == 'image' || $bgType == 'vimeo' || $bgType == 'youtube' || $bgType == 'html5') {
                $data_urlImageForView = 'data-src="' . $thumb . '"';
                $bg_fullstyle = ' style="' . $bgStyle . '" ';
            }
            if ($bgType == "solid") {
                $bg_fullstyle = ' style="background-color:' . $bgColor . ';" ';
            }
            if ($bgType == "trans" || $bgType == "transparent") {
                $bg_extraClass = 'mini-transparent';
            }
        }
        ?>
		<div class="template_slide_single_element" style="display:inline-block">
			<div <?php 
        echo $data_urlImageForView;
        ?>
 class="<?php 
        echo $slider_id !== false ? 'template_slider_item' : 'template_item';
        ?>
 <?php 
        echo $bg_extraClass;
        ?>
" <?php 
        echo $bg_fullstyle;
        ?>
				data-gridwidth="<?php 
        echo $width;
        ?>
"
				data-gridheight="<?php 
        echo $height;
        ?>
"
				<?php 
        if ($slider_id !== false) {
            ?>
//.........这里部分代码省略.........
开发者ID:mazykin46,项目名称:portfolio,代码行数:101,代码来源:template.class.php

示例9: write_template_markup

    /**
     * output markup for template
     * @since: 5.0
     */
    public function write_template_markup($template, $slider_id = false)
    {
        $params = $template['params'];
        $settings = $template['settings'];
        $slide_id = $template['id'];
        if ($slider_id !== false) {
            $title = '';
        }
        //remove Title if Slider
        $width = RevSliderBase::getVar($settings, "width", 1240);
        $height = RevSliderBase::getVar($settings, "height", 868);
        $bgType = RevSliderBase::getVar($params, "background_type", "transparent");
        $bgColor = RevSliderBase::getVar($params, "slide_bg_color", "transparent");
        $bgFit = RevSliderBase::getVar($params, "bg_fit", "cover");
        $bgFitX = intval(RevSliderBase::getVar($params, "bg_fit_x", "100"));
        $bgFitY = intval(RevSliderBase::getVar($params, "bg_fit_y", "100"));
        $bgPosition = RevSliderBase::getVar($params, "bg_position", "center center");
        $bgPositionX = intval(RevSliderBase::getVar($params, "bg_position_x", "0"));
        $bgPositionY = intval(RevSliderBase::getVar($params, "bg_position_y", "0"));
        $bgRepeat = RevSliderBase::getVar($params, "bg_repeat", "no-repeat");
        $bgStyle = ' ';
        if ($bgFit == 'percentage') {
            if (intval($bgFitY) == 0 || intval($bgFitX) == 0) {
                $bgStyle .= "background-size: cover;";
            } else {
                $bgStyle .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
            }
        } else {
            $bgStyle .= "background-size: " . $bgFit . ";";
        }
        if ($bgPosition == 'percentage') {
            $bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
        } else {
            $bgStyle .= "background-position: " . $bgPosition . ";";
        }
        $bgStyle .= "background-repeat: " . $bgRepeat . ";";
        if (isset($template['img'])) {
            $thumb = $this->_check_file_path($template['img'], true);
        } else {
            $imageID = RevSliderBase::getVar($params, "image_id");
            if (empty($imageID)) {
                $thumb = RevSliderBase::getVar($params, "image");
                $imgID = RevSliderBase::get_image_id_by_url($thumb);
                if ($imgID !== false) {
                    $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imgID, RevSliderFunctionsWP::THUMB_MEDIUM);
                }
            } else {
                $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imageID, RevSliderFunctionsWP::THUMB_MEDIUM);
            }
            if ($thumb == '') {
                $thumb = RevSliderBase::getVar($params, "image");
            }
        }
        $bg_fullstyle = '';
        $bg_extraClass = '';
        $data_urlImageForView = '';
        if (isset($template['img'])) {
            $data_urlImageForView = 'data-src="' . $thumb . '"';
        } else {
            if ($bgType == 'image' || $bgType == 'vimeo' || $bgType == 'youtube' || $bgType == 'html5') {
                $data_urlImageForView = 'data-src="' . $thumb . '"';
                $bg_fullstyle = ' style="' . $bgStyle . '" ';
            }
            if ($bgType == "solid") {
                $bg_fullstyle = ' style="background-color:' . $bgColor . ';" ';
            }
            if ($bgType == "trans" || $bgType == "transparent") {
                $bg_extraClass = 'mini-transparent';
            }
        }
        ?>
		<div class="template_slide_single_element" style="display:inline-block">
			<div <?php 
        echo $data_urlImageForView;
        ?>
 class="<?php 
        echo $slider_id !== false ? 'template_slider_item' : 'template_item';
        ?>
 <?php 
        echo $bg_extraClass;
        ?>
" <?php 
        echo $bg_fullstyle;
        ?>
				data-gridwidth="<?php 
        echo $width;
        ?>
"
				data-gridheight="<?php 
        echo $height;
        ?>
"
				<?php 
        if ($slider_id !== false) {
            ?>
				data-sliderid="<?php 
//.........这里部分代码省略.........
开发者ID:ksan5835,项目名称:maadithottam,代码行数:101,代码来源:template.class.php

示例10: apply_filters

$arrValues = $operations->getGeneralSettingsValues();
$role = RevSliderBase::getVar($arrValues, 'role', 'admin');
$includes_globally = RevSliderBase::getVar($arrValues, 'includes_globally', 'on');
$pages_for_includes = RevSliderBase::getVar($arrValues, 'pages_for_includes', '');
$js_to_footer = RevSliderBase::getVar($arrValues, 'js_to_footer', 'off');
$js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
$show_dev_export = RevSliderBase::getVar($arrValues, 'show_dev_export', 'off');
$change_font_loading = RevSliderBase::getVar($arrValues, 'change_font_loading', '');
$enable_logs = RevSliderBase::getVar($arrValues, 'enable_logs', 'off');
$enable_newschannel = apply_filters('revslider_set_notifications', 'on');
$enable_newschannel = RevSliderBase::getVar($arrValues, "enable_newschannel", $enable_newschannel);
$width = RevSliderBase::getVar($arrValues, 'width', 1240);
$width_notebook = RevSliderBase::getVar($arrValues, 'width_notebook', 1024);
$width_tablet = RevSliderBase::getVar($arrValues, 'width_tablet', 778);
$width_mobile = RevSliderBase::getVar($arrValues, 'width_mobile', 480);
$force_activation_box = RevSliderBase::getVar($arrValues, 'force_activation_box', 'off');
?>

<div id="dialog_general_settings" title="<?php 
_e("General Settings", 'revslider');
?>
" style="display:none;">

	<div class="settings_wrapper unite_settings_wide">
		<form name="form_general_settings" id="form_general_settings">
			<script type="text/javascript">
				g_settingsObj['form_general_settings'] = {};
			</script>
			<table class="form-table">				
				<tbody>
					<tr id="role_row" valign="top">
开发者ID:dawnthemes,项目名称:tkb,代码行数:31,代码来源:dialog-global-settings.php

示例11: write_template_markup

    /**
     * output markup for template
     * @since: 5.0
     */
    public function write_template_markup($template, $slider_id = false)
    {
        $params = $template['params'];
        $settings = $template['settings'];
        $slide_id = $template['id'];
        $title = str_replace("'", "", RevSliderBase::getVar($params, 'title', 'Slide'));
        if ($slider_id !== false) {
            $title = '';
        }
        //remove Title if Slider
        $width = RevSliderBase::getVar($settings, "width", 1240);
        $height = RevSliderBase::getVar($settings, "height", 868);
        $bgType = RevSliderBase::getVar($params, "background_type", "transparent");
        $bgColor = RevSliderBase::getVar($params, "slide_bg_color", "transparent");
        $bgFit = RevSliderBase::getVar($params, "bg_fit", "cover");
        $bgFitX = intval(RevSliderBase::getVar($params, "bg_fit_x", "100"));
        $bgFitY = intval(RevSliderBase::getVar($params, "bg_fit_y", "100"));
        $bgPosition = RevSliderBase::getVar($params, "bg_position", "center center");
        $bgPositionX = intval(RevSliderBase::getVar($params, "bg_position_x", "0"));
        $bgPositionY = intval(RevSliderBase::getVar($params, "bg_position_y", "0"));
        $bgRepeat = RevSliderBase::getVar($params, "bg_repeat", "no-repeat");
        $bgStyle = ' ';
        if ($bgFit == 'percentage') {
            if (intval($bgFitY) == 0 || intval($bgFitX) == 0) {
                $bgStyle .= "background-size: cover;";
            } else {
                $bgStyle .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
            }
        } else {
            $bgStyle .= "background-size: " . $bgFit . ";";
        }
        if ($bgPosition == 'percentage') {
            $bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
        } else {
            $bgStyle .= "background-position: " . $bgPosition . ";";
        }
        $bgStyle .= "background-repeat: " . $bgRepeat . ";";
        if (isset($template['img'])) {
            $thumb = $template['img'];
        } else {
            $imageID = RevSliderBase::getVar($params, "image_id");
            if (empty($imageID)) {
                $thumb = RevSliderBase::getVar($params, "image");
                $imgID = RevSliderBase::get_image_id_by_url($thumb);
                if ($imgID !== false) {
                    $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imgID, RevSliderFunctionsWP::THUMB_MEDIUM);
                }
            } else {
                $thumb = RevSliderFunctionsWP::getUrlAttachmentImage($imageID, RevSliderFunctionsWP::THUMB_MEDIUM);
            }
            if ($thumb == '') {
                $thumb = RevSliderBase::getVar($params, "image");
            }
        }
        $bg_fullstyle = '';
        $bg_extraClass = '';
        $data_urlImageForView = '';
        if ($bgType == 'image' || $bgType == 'vimeo' || $bgType == 'youtube' || $bgType == 'html5') {
            $data_urlImageForView = 'data-src="' . $thumb . '"';
            $bg_fullstyle = ' style="' . $bgStyle . '" ';
        }
        if ($bgType == "solid") {
            $bg_fullstyle = ' style="background-color:' . $bgColor . ';" ';
        }
        if ($bgType == "trans" || $bgType == "transparent") {
            $bg_extraClass = 'mini-transparent';
        }
        ?>
		<div <?php 
        echo $data_urlImageForView;
        ?>
 class="<?php 
        echo $slider_id !== false ? 'template_slider_item' : 'template_item';
        ?>
 <?php 
        echo $bg_extraClass;
        ?>
" <?php 
        echo $bg_fullstyle;
        ?>
			data-gridwidth="<?php 
        echo $width;
        ?>
"
			data-gridheight="<?php 
        echo $height;
        ?>
"
			<?php 
        if ($slider_id !== false) {
            ?>
			data-sliderid="<?php 
            echo $slider_id;
            ?>
"
			<?php 
//.........这里部分代码省略.........
开发者ID:scoutrul,项目名称:sys,代码行数:101,代码来源:template.class.php

示例12: RevSliderOperations

$operations = new RevSliderOperations();
$arrValues = $operations->getGeneralSettingsValues();
$role = RevSliderBase::getVar($arrValues, 'role', 'admin');
$includes_globally = RevSliderBase::getVar($arrValues, 'includes_globally', 'on');
$pages_for_includes = RevSliderBase::getVar($arrValues, 'pages_for_includes', '');
$js_to_footer = RevSliderBase::getVar($arrValues, 'js_to_footer', 'off');
$js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
$show_dev_export = RevSliderBase::getVar($arrValues, 'show_dev_export', 'off');
$change_font_loading = RevSliderBase::getVar($arrValues, 'change_font_loading', '');
$enable_logs = RevSliderBase::getVar($arrValues, 'enable_logs', 'off');
$enable_newschannel = apply_filters('revslider_set_notifications', 'on');
$enable_newschannel = RevSliderBase::getVar($arrValues, "enable_newschannel", $enable_newschannel);
$width = RevSliderBase::getVar($arrValues, 'width', 1240);
$width_notebook = RevSliderBase::getVar($arrValues, 'width_notebook', 1024);
$width_tablet = RevSliderBase::getVar($arrValues, 'width_tablet', 778);
$width_mobile = RevSliderBase::getVar($arrValues, 'width_mobile', 480);
?>

<div id="dialog_general_settings" title="<?php 
_e("General Settings", REVSLIDER_TEXTDOMAIN);
?>
" style="display:none;">

	<div class="settings_wrapper unite_settings_wide">
		<form name="form_general_settings" id="form_general_settings">
			<script type="text/javascript">
				g_settingsObj['form_general_settings'] = {};
			</script>
			<table class="form-table">				
				<tbody>
					<tr id="role_row" valign="top">
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:31,代码来源:dialog-global-settings.php


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