<?php

/**
 * @package   Revolution Slider
 * @author    ThemePunch <*****@*****.**>
 * @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 
Example #2
0
 /**
  * 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);
 }
Example #3
0
$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
							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"';
									}