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


PHP RevSliderFunctions::getVal方法代码示例

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


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

示例1: getMetaQuery

 /**
  * 
  * get meta query for filtering woocommerce posts. 
  */
 public static function getMetaQuery($args)
 {
     $regPriceFrom = RevSliderFunctions::getVal($args, self::ARG_REGULAR_PRICE_FROM);
     $regPriceTo = RevSliderFunctions::getVal($args, self::ARG_REGULAR_PRICE_TO);
     $salePriceFrom = RevSliderFunctions::getVal($args, self::ARG_SALE_PRICE_FROM);
     $salePriceTo = RevSliderFunctions::getVal($args, self::ARG_SALE_PRICE_TO);
     $inStockOnly = RevSliderFunctions::getVal($args, self::ARG_IN_STOCK_ONLY);
     $featuredOnly = RevSliderFunctions::getVal($args, self::ARG_FEATURED_ONLY);
     $arrQueries = array();
     //get regular price array
     if (!empty($regPriceFrom) || !empty($regPriceTo)) {
         $arrQueries[] = self::getPriceQuery($regPriceFrom, $regPriceTo, self::META_REGULAR_PRICE);
     }
     //get sale price array
     if (!empty($salePriceFrom) || !empty($salePriceTo)) {
         $arrQueries[] = self::getPriceQuery($salePriceFrom, $salePriceTo, self::META_SALE_PRICE);
     }
     if ($inStockOnly == "on") {
         $query = array('key' => self::META_STOCK_STATUS, 'value' => "instock");
         $arrQueries[] = $query;
     }
     if ($featuredOnly == "on") {
         $query = array('key' => self::META_FEATURED, 'value' => "yes");
         $arrQueries[] = $query;
     }
     $query = array();
     if (!empty($arrQueries)) {
         $query = array("meta_query" => $arrQueries);
     }
     return $query;
 }
开发者ID:Makenrro,项目名称:repos,代码行数:35,代码来源:woocommerce.class.php

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

示例3:

			</span>
		</div>
	</form>
	<!-- END OF AMAZING TOOLBAR -->
	<?php 
$slidertype = $slider->getParam("slider_type", "fullwidth");
$style .= ' margin: 0 auto;';
$tempwidth_jq = $maxbgwidth;
if ($slidertype == 'fullwidth' || $slidertype == 'fullscreen') {
    $style_wrapper .= ' width: 100%;';
    $maxbgwidth = "";
} else {
    $style_wrapper .= $style;
}
$hor_lines = RevSliderFunctions::getVal($settings, "hor_lines", "");
$ver_lines = RevSliderFunctions::getVal($settings, "ver_lines", "");
?>
	<script>
		var __slidertype  = "<?php 
echo $slidertype;
?>
";
	</script>
	<div id="thelayer-editor-wrapper">
		<!-- THE EDITOR PART -->
		<div id="horlinie"><div id="horlinetext">0</div></div>
		<div id="verlinie"><div id="verlinetext">0</div></div>
		<div id="hor-css-linear">
			<ul class="linear-texts"></ul>
			<div class="helplines-offsetcontainer">
				<?php 
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:31,代码来源:slide-stage.php

示例4: onAjaxAction


//.........这里部分代码省略.........
                 $urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
                 $responseText = __("Slide Created, redirecting...", 'revslider');
                 self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
                 break;
             case 'copy_slide_to_slider':
                 $slideID = isset($data['redirect_id']) ? $data['redirect_id'] : -1;
                 if ($slideID === -1) {
                     RevSliderFunctions::throwError(__('Missing redirect ID!', 'revslider'));
                 }
                 $return = $slider->copySlideToSlider($data);
                 if ($return !== true) {
                     RevSliderFunctions::throwError($return);
                 }
                 $urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
                 $responseText = __("Slide copied to current Slider, redirecting...", 'revslider');
                 self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
                 break;
             case "update_slide":
                 $slide->updateSlideFromData($data);
                 self::ajaxResponseSuccess(__("Slide updated", 'revslider'));
                 break;
             case "update_static_slide":
                 $slide->updateStaticSlideFromData($data);
                 self::ajaxResponseSuccess(__("Static Global Layers updated", 'revslider'));
                 break;
             case "delete_slide":
             case "delete_slide_stay":
                 $isPost = $slide->deleteSlideFromData($data);
                 if ($isPost) {
                     $message = __("Post deleted", 'revslider');
                 } else {
                     $message = __("Slide deleted", 'revslider');
                 }
                 $sliderID = RevSliderFunctions::getVal($data, "sliderID");
                 if ($action == 'delete_slide_stay') {
                     self::ajaxResponseSuccess($message);
                 } else {
                     self::ajaxResponseSuccessRedirect($message, self::getViewUrl(self::VIEW_SLIDE, "id=new&slider={$sliderID}"));
                 }
                 break;
             case "duplicate_slide":
             case "duplicate_slide_stay":
                 $return = $slider->duplicateSlideFromData($data);
                 if ($action == 'duplicate_slide_stay') {
                     self::ajaxResponseSuccess(__("Slide duplicated", 'revslider'), array('id' => $return[1]));
                 } else {
                     self::ajaxResponseSuccessRedirect(__("Slide duplicated", 'revslider'), self::getViewUrl(self::VIEW_SLIDE, "id=new&slider=" . $return[0]));
                 }
                 break;
             case "copy_move_slide":
             case "copy_move_slide_stay":
                 $sliderID = $slider->copyMoveSlideFromData($data);
                 if ($action == 'copy_move_slide_stay') {
                     self::ajaxResponseSuccess(__("Success!", 'revslider'));
                 } else {
                     self::ajaxResponseSuccessRedirect(__("Success! Refreshing page...", 'revslider'), self::getViewUrl(self::VIEW_SLIDE, "id=new&slider={$sliderID}"));
                 }
                 break;
             case "add_slide_to_template":
                 $template = new RevSliderTemplate();
                 if (!isset($data['slideID']) || intval($data['slideID']) == 0) {
                     RevSliderFunctions::throwError(__('No valid Slide ID given', 'revslider'));
                     exit;
                 }
                 if (!isset($data['title']) || strlen(trim($data['title'])) < 3) {
                     RevSliderFunctions::throwError(__('No valid title given', 'revslider'));
开发者ID:zruiz,项目名称:NG,代码行数:67,代码来源:revslider-admin.class.php

示例5: widget

 /**
  * 
  * widget output
  */
 public function widget($args, $instance)
 {
     $sliderID = RevSliderFunctions::getVal($instance, "rev_slider");
     $title = RevSliderFunctions::getVal($instance, "rev_slider_title");
     $homepageCheck = RevSliderFunctions::getVal($instance, "rev_slider_homepage");
     $homepage = "";
     if ($homepageCheck == "on") {
         $homepage = "homepage";
     }
     $pages = RevSliderFunctions::getVal($instance, "rev_slider_pages");
     if (!empty($pages)) {
         if (!empty($homepage)) {
             $homepage .= ",";
         }
         $homepage .= $pages;
     }
     if (empty($sliderID)) {
         return false;
     }
     //widget output
     $beforeWidget = RevSliderFunctions::getVal($args, "before_widget");
     $afterWidget = RevSliderFunctions::getVal($args, "after_widget");
     $beforeTitle = RevSliderFunctions::getVal($args, "before_title");
     $afterTitle = RevSliderFunctions::getVal($args, "after_title");
     echo $beforeWidget;
     if (!empty($title)) {
         echo $beforeTitle . $title . $afterTitle;
     }
     RevSliderOutput::putSlider($sliderID, $homepage);
     add_action('wp_head', array($this, 'writeCSS'));
     echo $afterWidget;
 }
开发者ID:jfbelisle,项目名称:magexpress,代码行数:36,代码来源:widget.class.php

示例6: 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:vicpril,项目名称:rep_bidqa,代码行数:15,代码来源:revslider-front.class.php

示例7: googlef_template_container

);								
				
				
				var googlef_template_container = wp.template( "rs-preset-googlefont" );
				
				jQuery('#add_new_google_font').click(function(){
					var content = googlef_template_container({'value':''});
					jQuery('#rs-google-fonts').append(content);
				});
				
				jQuery('body').on('click', '.rs-google-remove-field', function(){
					jQuery(this).parent().remove();
				});
				
				<?php 
$google_font = RevSliderFunctions::getVal($arrFieldsParams, 'google_font', array());
if (!empty($google_font) && is_array($google_font)) {
    foreach ($google_font as $gfont) {
        ?>
						jQuery('#rs-google-fonts').append(googlef_template_container({'value':'<?php 
        echo esc_attr($gfont);
        ?>
'}));
						<?php 
    }
}
?>
				/*
				
				var data = {};
				data['value'] = key;
开发者ID:johnmanlove,项目名称:Galveston_Island,代码行数:31,代码来源:slider-main-options.php

示例8: onAddMetaBoxContent

 /**
  * 
  * on add metabox content
  */
 public static function onAddMetaBoxContent($post, $boxData)
 {
     $postID = $post->ID;
     $boxID = RevSliderFunctions::getVal($boxData, "id");
     $index = str_replace('mymetabox_revslider_', "", $boxID);
     $arrMetabox = self::$arrMetaBoxes[$index];
     //draw element
     $drawFunction = RevSliderFunctions::getVal($arrMetabox, "draw_function");
     if (!empty($drawFunction)) {
         call_user_func($drawFunction);
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:16,代码来源:base-admin.class.php

示例9: get_slider_speed


//.........这里部分代码省略.........
                                                                //add only the largest video of the three here as each browser loads only one file and we can add here the biggest
                                                            } else {
                                                                $infos['id'] = 'external';
                                                            }
                                                        } else {
                                                            $infos['id'] = 'external';
                                                        }
                                                        $used_videos[$url] = $infos;
                                                    }
                                                    $video_size += $max_video_size;
                                                }
                                                break;
                                            case 'youtube':
                                                $infos['id'] = 'external';
                                                if (!isset($layer['video_data']->id) || empty($layer['video_data']->id)) {
                                                    continue;
                                                }
                                                $used_videos[$do_ssl . '//www.youtube.com/watch?v=' . $layer['video_data']->id] = $infos;
                                                break;
                                            case 'vimeo':
                                                if (!isset($layer['video_data']->id) || empty($layer['video_data']->id)) {
                                                    continue;
                                                }
                                                $infos['id'] = 'external';
                                                $used_videos[$do_ssl . '//vimeo.com/' . $layer['video_data']->id] = $infos;
                                                break;
                                        }
                                    }
                                }
                                break;
                        }
                        //check captions for actions
                        if (isset($layer['layer_action']) && !empty($layer['layer_action'])) {
                            $a_action = RevSliderFunctions::cleanStdClassToArray(RevSliderFunctions::getVal($layer['layer_action'], 'action', array()));
                            $a_link_type = RevSliderFunctions::cleanStdClassToArray(RevSliderFunctions::getVal($layer['layer_action'], 'link_type', array()));
                            if (!empty($a_action)) {
                                foreach ($a_action as $num => $action) {
                                    if ($using_actions == true) {
                                        break;
                                    }
                                    if ($action !== 'link') {
                                        $using_actions = true;
                                    } else {
                                        //check if jQuery or a tag
                                        if ($a_link_type[$num] == 'jquery') {
                                            $using_actions = true;
                                        }
                                    }
                                }
                            }
                        }
                        if (isset($layer['style']) && $layer['style'] != '') {
                            $used_captions[$layer['style']] = true;
                        }
                    }
                }
            }
        }
        $total_size += $img_size;
        $img_counter = 0;
        $issues = "";
        //$total_size += $video_size;
        ?>

		<span class="tp-clearfix" style="height:15px"></span>
		<hr>
开发者ID:hathbanger,项目名称:squab,代码行数:67,代码来源:operations.class.php

示例10: getCategoriesHtmlList

 /**
  * get categories list, copy the code from default wp functions
  */
 public static function getCategoriesHtmlList($catIDs, $strTax = null)
 {
     global $wp_rewrite;
     //$catList = get_the_category_list( ",", "", $postID );
     $categories = self::getCategoriesByIDs($catIDs, $strTax);
     $arrErrors = RevSliderFunctions::getVal($categories, "errors");
     if (!empty($arrErrors)) {
         foreach ($arrErrors as $key => $arr) {
             $strErrors = implode($arr, ",");
         }
         RevSliderFunctions::throwError("getCategoriesHtmlList error: " . $strErrors);
     }
     $rel = is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ? 'rel="category tag"' : 'rel="category"';
     $separator = ',';
     $thelist = '';
     $i = 0;
     foreach ($categories as $category) {
         if (is_object($category)) {
             $category = (array) $category;
         }
         if (0 < $i) {
             $thelist .= $separator;
         }
         $catID = $category["term_id"];
         $link = get_category_link($catID);
         $catName = $category["name"];
         if (!empty($link)) {
             $thelist .= '<a href="' . esc_url($link) . '" title="' . esc_attr(sprintf(__("View all posts in %s", 'revslider'), $category["name"])) . '" ' . $rel . '>' . $catName . '</a>';
         } else {
             $thelist .= $catName;
         }
         ++$i;
     }
     return $thelist;
 }
开发者ID:iq007,项目名称:MadScape,代码行数:38,代码来源:functions-wordpress.class.php

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

示例12: _e

						<span style="position:absolute; top:13px;left:0px; text-align: center">
							<span class="setting_text_3"><?php 
    _e("Show Layers from Slide:", REVSLIDER_TEXTDOMAIN);
    ?>
</span>
							<select name="rev_show_the_slides">
								<option value="none">---</option>
								<?php 
    foreach ($all_slides as $c_slide) {
        $c_params = $c_slide->getParams();
        ?>
									<option value="<?php 
        echo $c_slide->getID();
        ?>
"><?php 
        echo stripslashes(RevSliderFunctions::getVal($c_params, 'title', 'Slide')) . ' (ID: ' . $c_slide->getID() . ')';
        ?>
</option>
									<?php 
    }
    ?>
							</select>
						</span>
					
					<?php 
}
?>
			</li>
			<?php 
$slidecounter = 0;
foreach ($arrSlides as $t_slide) {
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:slide-selector.php

示例13: foreach

    foreach ($arrSlideLinkLayers as $link_handle => $link_name) {
        $sel = $link_handle == $slide_link ? ' selected="selected"' : '';
        echo '<option value="' . $link_handle . '"' . $sel . '>' . $link_name . '</option>';
    }
}
?>
						</select>
						<span class="description"><?php 
_e('Call Slide Action', 'revslider');
?>
</span>
					</p>
					<!-- Link POSITION -->
					<p>
						<?php 
$link_pos = RevSliderFunctions::getVal($slideParams, 'link_pos', 'front');
?>
						<label><?php 
_e("Link Sensibility:", 'revslider');
?>
</label>
						<span style="display:inline-block; width:200px; margin-right:20px;">
							<input type="radio" id="link_pos_1" value="front" name="link_pos"<?php 
checked($link_pos, 'front');
?>
><span style="line-height:30px; vertical-align: middle; margin:0px 20px 0px 10px;"><?php 
_e('Front', 'revslider');
?>
</span>
							<input type="radio" id="link_pos_2" value="back" name="link_pos"<?php 
checked($link_pos, 'back');
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:31,代码来源:slide-general-settings.php

示例14: resetSlideSettings

 public function resetSlideSettings($data)
 {
     $sliderID = RevSliderFunctions::getVal($data, "sliderid");
     $this->initByID($sliderID);
     $arrSildes = $this->getSlides();
     foreach ($arrSildes as $slide) {
         $slide->reset_slide_values($data);
     }
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:9,代码来源:slider.class.php

示例15: replaceCssClass

 /**
  * replace all css classes in all layers
  * @since: 5.0
  */
 public function replaceCssClass($css_from, $css_to)
 {
     $this->validateInited();
     $isUpdated = false;
     if (!empty($this->arrLayers)) {
         foreach ($this->arrLayers as $key => $layer) {
             $caption = RevSliderFunctions::getVal($layer, 'style');
             if ($caption == $css_from) {
                 $this->arrLayers[$key]['style'] = $css_to;
                 $isUpdated = true;
             }
         }
     }
     if ($isUpdated == true) {
         $this->updateLayersInDB();
     }
 }
开发者ID:hathbanger,项目名称:squab,代码行数:21,代码来源:slide.class.php


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