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


PHP RevSliderOutput::putErrorMessage方法代码示例

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


在下文中一共展示了RevSliderOutput::putErrorMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: putRevSlider

 /**
  *
  * put rev slider on the page.
  * the data can be slider ID or slider alias.
  */
 function putRevSlider($data, $putIn = "")
 {
     $operations = new RevOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
     $strPutIn = UniteFunctionsRev::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)";
         $option2Name = "Pages to include RevSlider libraries";
         $output->putErrorMessage(__("If you want to use the PHP function \"putRevSlider\" in your code please make sure to check \" ", REVSLIDER_TEXTDOMAIN) . $option1Name . __(" \" in the backend's \"General Settings\" (top right panel). <br> <br> Or add the current page to the \"", REVSLIDER_TEXTDOMAIN) . $option2Name . __("\" option box."));
         return false;
     }
     RevSliderOutput::putSlider($data, $putIn);
 }
开发者ID:epiii,项目名称:aros,代码行数:21,代码来源:revslider.php


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