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


PHP RevSliderOperations::getCleanFontImport方法代码示例

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


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

示例1: RevSliderOperations

    if ($isWpmlExists && $useWpml == "on") {
        $wpmlActive = true;
        $parentSlide = $slide->getParentSlide();
        $arrChildLangs = $parentSlide->getArrChildrenLangs();
    }
}
//<!--  load good font -->
$operations = new RevSliderOperations();
$googleFont = $slider->getParam("google_font", array());
if (!empty($googleFont)) {
    if (is_array($googleFont)) {
        foreach ($googleFont as $key => $font) {
            echo RevSliderOperations::getCleanFontImport($font);
        }
    } else {
        echo RevSliderOperations::getCleanFontImport($googleFont);
    }
}
if ($slide->isStaticSlide() || $slider->isSlidesFromPosts()) {
    //insert sliderid for preview
    ?>
<input type="hidden" id="sliderid" value="<?php 
    echo $slider->getID();
    ?>
" /><?php 
}
require self::getPathTemplate('template-selector');
?>


<div class="wrap settings_wrap">
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:31,代码来源:slide-editor.php

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


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