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


PHP RevSliderOperations::getArrFontFamilys方法代码示例

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


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

示例1: RevSliderNavigation

<?php

/**
 * @package   Revolution Slider
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.revolution.themepunch.com/
 * @copyright 2015 ThemePunch
 */
if (!defined('ABSPATH')) {
    exit;
}
$nav = new RevSliderNavigation();
$navigation = intval(RevSliderBase::getGetVar('navigation', 0));
$navigs = $nav->get_all_navigations();
$rsopr = new RevSliderOperations();
$font_families = $rsopr->getArrFontFamilys();
?>
<div class='wrap'>
	<div class="clear_both"></div>

	<div class="title_line nobgnopd" style="margin-bottom: 20px !important;">
		<div class="icon32" id="icon-options-general"></div>
		<div class="view_title">
			<?php 
_e('Navigation Editor', REVSLIDER_TEXTDOMAIN);
?>
		</div>
	</div>
	
	<div class="setting_box navig" style="margin-bottom: 20px;">
		<h3><span class="setting-step-number">1</span><span style="max-width: 400px;"><?php 
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:navigation-editor.php

示例2: getUsedFonts

 /**
  * get all used fonts in the current Slide
  * @since: 5.1.0
  */
 public function getUsedFonts($full = false)
 {
     $this->validateInited();
     $op = new RevSliderOperations();
     $fonts = array();
     $all_fonts = $op->getArrFontFamilys();
     if (!empty($this->arrLayers)) {
         foreach ($this->arrLayers as $key => $layer) {
             $def = (array) RevSliderFunctions::getVal($layer, 'deformation', array());
             $font = RevSliderFunctions::getVal($def, 'font-family', '');
             $static = (array) RevSliderFunctions::getVal($layer, 'static_styles', array());
             foreach ($all_fonts as $f) {
                 if (strtolower(str_replace(array('"', "'", ' '), '', $f['label'])) == strtolower(str_replace(array('"', "'", ' '), '', $font)) && $f['type'] == 'googlefont') {
                     if (!isset($fonts[$f['label']])) {
                         $fonts[$f['label']] = array('variants' => array(), 'subsets' => array());
                     }
                     if ($full) {
                         //if full, add all.
                         //switch the variants around here!
                         $mv = array();
                         if (!empty($f['variants'])) {
                             foreach ($f['variants'] as $fvk => $fvv) {
                                 $mv[$fvv] = $fvv;
                             }
                         }
                         $fonts[$f['label']] = array('variants' => $mv, 'subsets' => $f['subsets']);
                     } else {
                         //Otherwise add only current font-weight plus italic or not
                         $fw = (array) RevSliderFunctions::getVal($static, 'font-weight', '400');
                         $fs = RevSliderFunctions::getVal($def, 'font-style', '');
                         if ($fs == 'italic') {
                             foreach ($fw as $mf => $w) {
                                 //we check if italic is available at all for the font!
                                 if ($w == '400') {
                                     if (array_search('italic', $f['variants']) !== false) {
                                         $fw[$mf] = 'italic';
                                     }
                                 } else {
                                     if (array_search($w . 'italic', $f['variants']) !== false) {
                                         $fw[$mf] = $w . 'italic';
                                     }
                                 }
                             }
                         }
                         foreach ($fw as $mf => $w) {
                             $fonts[$f['label']]['variants'][$w] = true;
                         }
                         $fonts[$f['label']]['subsets'] = $f['subsets'];
                         //subsets always get added, needs to be done then by the Slider Settings
                     }
                     break;
                 }
             }
         }
     }
     return apply_filters('revslider_slide_getUsedFonts', $fonts, $this);
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:61,代码来源:slide.class.php

示例3: array

$sliderTemplate = $slider->getParam("template", "false");
//set slide delay
$sliderDelay = $slider->getParam("delay", "9000");
$slideDelay = $slide->getParam("delay", "");
if (empty($slideDelay)) {
    $slideDelay = $sliderDelay;
}
//add tools.min.js
wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', array(), RevSliderGlobals::SLIDER_REVISION);
$arrLayers = $slide->getLayers();
//set Layer settings
$cssContent = $operations->getCaptionsContent();
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
//$arrCaptionClassesSorted = $operations->getArrCaptionClasses($cssContent);
$arrCaptionClassesSorted = RevSliderCssParser::get_captions_sorted();
$arrFontFamily = $operations->getArrFontFamilys($slider);
$arrCSS = $operations->getCaptionsContentArray();
$arrButtonClasses = $operations->getButtonClasses();
$arrAnim = $operations->getFullCustomAnimations();
$arrAnimDefaultIn = $operations->getArrAnimations(false);
$arrAnimDefaultOut = $operations->getArrEndAnimations(false);
$arrAnimDefault = array_merge($arrAnimDefaultIn, $arrAnimDefaultOut);
//set various parameters needed for the page
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$imageUrl = $slide->getImageUrl();
$imageID = $slide->getImageID();
$slider_type = $slider->getParam('source_type', 'gallery');
/**
 * Get Slider params which will be used as default on Slides
 * @since: 5.0
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:slide-editor.php

示例4:

							ph_html = '<div class="placeholder-single-wrapper '+m["nav-type"]+'"><input type="checkbox" name="ph-'+cur_edit_type+'-'+navtype+'-'+m['handle']+'-'+deftype+'-def" data-isfor="'+isfor+'" class="tp-moderncheckbox placeholder-checkbox custom-preset-val triggernavstyle" data-unchecked="off" ';															
						
						ph_html+= (m['default'][deftype] == undefined || m['default'][deftype] == 'off') ? '>' : ' checked="checked">';
						ph_html+= '<span class="label placeholder-label triggernavstyle">'+ph_title+'</span>';

						switch(m['type']){
							case 'color':																
								ph_html+= '<input type="text" name="ph-'+cur_edit_type+'-'+navtype+'-'+m['handle']+'-color" class="triggernavstyle alpha-color-field custom-preset-val" id="'+isfor+'" value="'+m['data']['color']+'">';																
							break;
							case 'color-rgba':																
								ph_html+= '<input type="text" name="ph-'+cur_edit_type+'-'+navtype+'-'+m['handle']+'-color-rgba" class="triggernavstyle alpha-color-field custom-preset-val" id="'+isfor+'" value="'+m['data']['color-rgba']+'">';																
							break;
							case 'font-family':								
								ph_html+= '<select style="width:112px" name="ph-'+cur_edit_type+'-'+navtype+'-'+m['handle']+'-font_family" class="triggernavstyle custom-preset-val" id="'+isfor+'">';
								<?php 
$font_families = $operations->getArrFontFamilys();
foreach ($font_families as $handle => $name) {
    if ($name['label'] == 'Dont Show Me') {
        continue;
    }
    ?>
									ph_html+= '<option value="<?php 
    echo esc_attr($name['label']);
    ?>
"';
									if(m['data']['font_family'] == '<?php 
    echo esc_attr($name['label']);
    ?>
'){
										ph_html+= ' selected="selected"';
									}
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:31,代码来源:slider-main-options.php


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