本文整理汇总了PHP中RevSlider::getParam方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlider::getParam方法的具体用法?PHP RevSlider::getParam怎么用?PHP RevSlider::getParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSlider
的用法示例。
在下文中一共展示了RevSlider::getParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: yit_add_slider_class_body
/**
* Remove Add to wishlist text option
*
*/
function yit_add_slider_class_body()
{
$slider_name = yit_slider_name();
if ($slider_name == 'none' || empty($slider_name)) {
return;
}
$slider_type = yit_slider_get_setting('slider_type', $slider_name);
$slider_width = yit_slider_get_setting('width_' . $slider_type, $slider_name);
if (in_array($slider_type, array('revolution', 'revolution-slider', 'elastic', 'thumbnails')) && $slider_width == 0) {
$is_full_width = true;
} else {
$is_full_width = false;
}
// revolution slider
if ($slider_type == 'revolution-slider' && class_exists('RevSlider')) {
$revolution = yit_slider_get_setting('slider_name_' . $slider_type, $slider_name);
$the_slider = new RevSlider();
$the_slider->initByMixed($revolution);
if (in_array($the_slider->getParam('slider_type'), array('fixed', 'responsitive'))) {
$is_full_width = false;
}
}
yit_add_body_class('header-slider-' . $slider_type);
yit_add_body_class('slider-' . ($is_full_width ? 'full-width' : 'fixed'));
}
示例2: foreach
}
if (!empty($m_slider['filter']) && is_array($m_slider['filter'])) {
foreach ($m_slider['filter'] as $f => $v) {
$m_slider['filter'][$f] = 'temp_' . $v;
}
}
$slidercat = $m_slider['cat'] == 'Revolution Base' ? " template_free " : " template_premium ";
$etikett_a = $m_slider['cat'] == 'Revolution Base' ? "Free" : "Premium";
$isnew = isset($m_slider['new_slider']) ? true : false;
$slidercat_new = $isnew ? " temp_newupdate " : "";
if (!isset($m_slider['installed']) && !isset($m_slider['is_new'])) {
$c_slider = new RevSlider();
$c_slider->initByDBData($m_slider);
$c_slides = $tmpl->getThemePunchTemplateSlides(array($m_slider));
$c_title = $c_slider->getTitle();
$width = $c_slider->getParam("width", 1240);
$height = $c_slider->getParam("height", 868);
$version_installed = $c_slider->getParam("version", '1.0.0');
if ($version_installed === '') {
$version_installed = '1.0.0';
}
$isupdate = false;
if (version_compare($version_installed, $m_slider['version'], '<')) {
$isupdate = true;
$slidercat_new = ' temp_newupdate ';
}
$m_slider['plugin_require'] = isset($m_slider['plugin_require']) ? json_decode($m_slider['plugin_require'], true) : array();
if (is_array($m_slider['plugin_require']) && !empty($m_slider['plugin_require'])) {
foreach ($m_slider['plugin_require'] as $k => $pr) {
if (!isset($plugin_list[$pr['path']])) {
if (is_plugin_active(esc_attr($pr['path']))) {
示例3: previewOutput
/**
*
* preview slider output
* if output object is null - create object
*/
public function previewOutput($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$isWpmlExists = RevSliderWpml::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
$arrLanguages = RevSliderWpml::getArrLanguages(false);
//set current lang to output
$currentLang = RevSliderFunctions::getPostGetVariable("lang");
if (empty($currentLang)) {
$currentLang = RevSliderWpml::getCurrentLang();
}
if (empty($currentLang)) {
$currentLang = $arrLanguages[0];
}
$output->setLang($currentLang);
$selectLangChoose = RevSliderFunctions::getHTMLSelect($arrLanguages, $currentLang, "id='select_langs'", true);
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RS_PLUGIN_URL . 'public/assets/';
$urlPreviewPattern = RevSliderBase::$url_ajax_actions . "&client_action=preview_slider&sliderid=" . $sliderID . "&lang=[lang]&nonce=[nonce]";
$nonce = wp_create_nonce("revslider_actions");
$setBase = is_ssl() ? "https://" : "http://";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css?rev=<?php
echo RevSliderGlobals::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
fonts/font-awesome/css/font-awesome.css?rev=<?php
echo RevSliderGlobals::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css?rev=<?php
echo RevSliderGlobals::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
$db = new RevSliderDB();
$styles = $db->fetch(RevSliderGlobals::$table_css);
$styles = RevSliderCssParser::parseDbArrayToCss($styles, "\n");
$styles = RevSliderCssParser::compress_css($styles);
echo '<style type="text/css">' . $styles . '</style>';
//.$stylesinnerlayers
$http = is_ssl() ? 'https' : 'http';
$operations = new RevSliderOperations();
$arrValues = $operations->getGeneralSettingsValues();
$set_diff_font = RevSliderFunctions::getVal($arrValues, "change_font_loading", '');
if ($set_diff_font !== '') {
$font_url = $set_diff_font;
} else {
$font_url = $http . '://fonts.googleapis.com/css?family=';
}
$custom_css = RevSliderOperations::getStaticCss();
echo '<style type="text/css">' . RevSliderCssParser::compress_css($custom_css) . '</style>';
?>
<script type='text/javascript' src='<?php
echo $setBase;
?>
code.jquery.com/jquery-latest.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.tools.min.js?rev=<?php
echo RevSliderGlobals::SLIDER_REVISION;
?>
'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js?rev=<?php
echo RevSliderGlobals::SLIDER_REVISION;
//.........这里部分代码省略.........
示例4: RevSlider
/**
* @package WordPress
* @subpackage Your Inspiration Themes
*/
if(!class_exists('RevSlider')) return;
global $is_primary;
$sliderID = $this->get('slider_name');
$the_slider = new RevSlider();
$the_slider->initByMixed($sliderID);
$slider_class = '';
$slider_class .= yit_slide_get('align') != '' ? ' align' . yit_slide_get('align') : '';
$slider_class .= ' ' . $the_slider->getParam('slider_type');
$is_fixed = false;
if ( ! $is_primary && in_array( $the_slider->getParam('slider_type'), array( 'fixed', 'responsitive' ) ) ) $is_fixed = true;
if ( $is_fixed && ! has_action( 'yit_after_header', 'yit_slider_space' ) ) add_action( 'yit_after_header', 'yit_slider_space' );
// text align
$slider_text = yit_slide_get( 'slider_text' );
if ( $is_primary && $the_slider->getParam('slider_type') == 'fullwidth' ) $slider_text = '';
if ( !empty( $slider_text ) ) $slider_class .= ' align' . ( yit_slide_get( 'slider_align' ) == 'left' ? 'right' : 'left' );
?>
<!-- START SLIDER -->
<div class="revolution-wrapper<?php if ( $the_slider->getParam('slider_type') != 'fullwidth' ) echo ' container'; ?>">
<div id="<?php echo $slider_id ?>"<?php yit_slider_class($slider_class) ?>>
示例5: isset
//$height = $sliderParams["height"];
$width = isset($sliderParams["width"]) ? $sliderParams["width"] : '';
$height = isset($sliderParams["height"]) ? $sliderParams["height"] : '';
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
$arrSlides = $slider->getSlides(false);
$numSlides = count($arrSlides);
$linksSliderSettings = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER, "id={$sliderID}");
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
//treat in case of slides from gallery
if ($slider->isSlidesFromPosts() == false) {
$templateName = "slides_gallery";
//handle wpml
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
//get langs floating menu
$urlIconDelete = self::$url_plugin . "images/icon-trash.png";
$urlIconEdit = self::$url_plugin . "images/icon-edit.png";
$urlIconPreview = self::$url_plugin . "images/preview.png";
$textDelete = ControllerModulerevslideropencart::$lang_var['Delete_Slider'];
$textEdit = ControllerModulerevslideropencart::$lang_var['Edit_Slide'];
$textPreview = ControllerModulerevslideropencart::$lang_var['Preview_Slide'];
$htmlBefore = "";
$htmlBefore .= "<li class='item_operation operation_delete'><a data-operation='delete' href='javascript:void(0)'>" . "\n";
$htmlBefore .= "<img src='" . $urlIconDelete . "'/> " . $textDelete . "\n";
$htmlBefore .= "</a></li>" . "\n";
$htmlBefore .= "<li class='item_operation operation_edit'><a data-operation='edit' href='javascript:void(0)'>" . "\n";
示例6: foreach
if (!empty($tp_template_slider)) {
foreach ($tp_template_slider as $m_slider) {
if ($m_slider['cat'] != 'Premium') {
continue;
}
if (!empty($m_slider['filter']) && is_array($m_slider['filter'])) {
foreach ($m_slider['filter'] as $f => $v) {
$m_slider['filter'][$f] = 'temp_' . $v;
}
}
if (!isset($m_slider['installed']) && !isset($m_slider['is_new'])) {
$c_slider = new RevSlider();
$c_slider->initByDBData($m_slider);
$c_slides = $tmpl->getThemePunchTemplateSlides(array($m_slider));
$c_title = $c_slider->getTitle();
$width = $c_slider->getParam("width", 1240);
$height = $c_slider->getParam("height", 868);
if (!empty($c_slides)) {
?>
<div class="template_group_wrappers <?php
if (isset($m_slider['filter'])) {
echo implode(' ', $m_slider['filter']);
}
?>
">
<?php
echo '<div class="template_slider_title">';
if (isset($m_slider['preview']) && $m_slider['preview'] !== '') {
echo '<a href="' . esc_attr($m_slider['preview']) . '" target="_blank" class="icon-preview_slider" style="margin-right:15px"></a>';
}
echo $c_title . '</div>';
示例7: RevSlide
<?php
//get input
$slideID = UniteFunctionsRev::getGetVar("id");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
//set slide delay
$sliderDelay = $slider->getParam("delay", "9000");
$slideDelay = $slide->getParam("delay", "");
if (empty($slideDelay)) {
$slideDelay = $sliderDelay;
}
require self::getSettingsFilePath("slide_settings");
require self::getSettingsFilePath("layer_settings");
$settingsLayerOutput = new UniteSettingsProductSidebarRev();
$settingsSlideOutput = new UniteSettingsRevProductRev();
$arrLayers = $slide->getLayers();
//get settings objects
$settingsLayer = self::getSettings("layer_settings");
$settingsSlide = self::getSettings("slide_settings");
$cssContent = self::getSettings("css_captions_content");
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
$arrButtonClasses = $operations->getButtonClasses();
示例8: RevSlide
//get input
$slideID = UniteFunctionsRev::getGetVar("id");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
//dmp($slideParams);exit();
$operations = new RevOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSlideNames = $slider->getArrSlideNames();
//set slide delay
$sliderDelay = $slider->getParam("delay", "9000");
$slideDelay = $slide->getParam("delay", "");
if (empty($slideDelay)) {
$slideDelay = $sliderDelay;
}
require self::getSettingsFilePath("slide_settings");
require self::getSettingsFilePath("layer_settings");
$settingsLayerOutput = new UniteSettingsProductSidebarRev();
$settingsSlideOutput = new UniteSettingsRevProductRev();
$arrLayers = $slide->getLayers();
//get settings objects
$settingsLayer = self::getSettings("layer_settings");
$settingsSlide = self::getSettings("slide_settings");
$cssContent = self::getSettings("css_captions_content");
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
$arrButtonClasses = $operations->getButtonClasses();
示例9: define
exit;
}
// Exit if accessed directly
global $is_primary;
if (!class_exists('RevSlider')) {
return;
}
if (!defined('YIT_SLIDER_USED')) {
define('YIT_SLIDER_USED', true);
}
$sliderID = $slider->get('config-slider_name');
$the_slider = new RevSlider();
$the_slider->initByMixed($sliderID);
$slider_class = '';
//$slider_class .= yit_slide_get('align') != '' ? ' align' . yit_slide_get('align') : '';
$slider_class .= ' ' . $the_slider->getParam('slider_type');
$is_fixed = false;
if (!$is_primary && in_array($the_slider->getParam('slider_type'), array('fixed', 'responsitive'))) {
$is_fixed = true;
}
// text align
//$slider_text = yit_slide_get( 'slider_text' );
//if ( ! $is_fixed ) $slider_text = '';
//if ( !empty( $slider_text ) ) $slider_class .= ' align' . ( yit_slide_get( 'slider_align' ) == 'left' ? 'right' : 'left' );
?>
<!-- START SLIDER -->
<div class="revolution-wrapper<?php
if ($is_fixed) {
echo ' container';
}
示例10: deleteSlideFromData
/**
*
* delete slide from data
*/
public function deleteSlideFromData($data)
{
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
$slider = new RevSlider();
$slider->initByID($sliderID);
if ($slider->isSlidesFromPosts()) {
$_arrPostsList = array_diff(explode(',', $slider->getParam('posts_list')), array(UniteFunctionsRev::getVal($data, "slideID")));
$slider->updateParamValue('posts_list', implode(',', $_arrPostsList));
} else {
$slideID = UniteFunctionsRev::getVal($data, "slideID");
$this->initByID($slideID);
$this->deleteChildren();
$this->deleteSlide();
}
}
示例11: count
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
$numSliders = count($arrSliders);
//set iframe parameters
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
$arrSlides = $slider->getSlides(false);
$numSlides = count($arrSlides);
$linksSliderSettings = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER, "id={$sliderID}");
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
$useStaticLayers = $slider->getParam("enable_static_layers", "off");
//treat in case of slides from gallery
if ($slider->isSlidesFromPosts() == false) {
$templateName = "slides_gallery";
//handle wpml
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
//get langs floating menu
$urlIconDelete = self::$url_plugin . "images/icon-trash.png";
$urlIconEdit = self::$url_plugin . "images/icon-edit.png";
$urlIconPreview = self::$url_plugin . "images/preview.png";
$textDelete = __ug("Delete Slide", REVSLIDER_TEXTDOMAIN);
$textEdit = __ug("Edit Slide", REVSLIDER_TEXTDOMAIN);
示例12: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$operations = new RevOperations();
$sliderID = $this->getRequest()->getParam('id');
$storeID = $this->getRequest()->getParam('store_id', 0);
if (empty($sliderID)) {
UniteFunctionsRev::throwError("Slider ID not found");
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
$numSliders = count($arrSliders);
//set iframe parameters
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
$arrSlides = $slider->getSlides(false, $storeID);
$numSlides = count($arrSlides);
$linksSliderSettings = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/' . $sliderID);
$patternViewSlide = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/[slideid]');
$useStaticLayers = $slider->getParam("enable_static_layers", "off");
//treat in case of slides from gallery
if ($slider->isSlidesFromPosts() == false) {
$templateName = "slides_gallery";
// store view
$selectStoreView = Mage::app()->getLayout()->createBlock('core/html_select')->setName('select_storeview')->setId('select_storeview')->setTitle('Store View')->setValue($storeID)->setOptions(Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true))->getHtml();
$this->assign('storeID', $storeID);
$this->assign('selectStoreView', $selectStoreView);
$this->setTemplate('nwdthemes/revslider/templates/slides_gallery.phtml');
} else {
//slides from posts
$templateName = "slides_posts";
$sourceType = $slider->getParam("source_type", "posts");
$showSortBy = $sourceType == "posts" ? true : false;
$showDelete = $sourceType == "specific_posts" ? true : false;
//get button links
$urlNewPost = $this->helper('adminhtml')->getUrl('adminhtml/catalog_product/new');
$linkNewPost = UniteFunctionsRev::getHtmlLink($urlNewPost, $this->__("<i class='revicon-pencil-1'></i>New Product"), "button_new_post", "button-primary revblue", true);
//get ordering
$arrSortBy = $this->helper('nwdrevslider')->getArrSortBy();
$sortBy = $slider->getParam("post_sortby", RevSlider::DEFAULT_POST_SORTBY);
$selectSortBy = UniteFunctionsRev::getHTMLSelect($arrSortBy, $sortBy, "id='select_sortby'", true);
$this->assign('showSortBy', $showSortBy);
$this->assign('showDelete', $showDelete);
$this->assign('selectSortBy', $selectSortBy);
$this->assign('linkNewPost', $linkNewPost);
$this->setTemplate('nwdthemes/revslider/templates/slides_posts.phtml');
}
$this->assign('sliderID', $sliderID);
$this->assign('iframeStyle', $iframeStyle);
$this->assign('patternViewSlide', $patternViewSlide);
$this->assign('selectSliders', $selectSliders);
$this->assign('linksSliderSettings', $linksSliderSettings);
$this->assign('useStaticLayers', $useStaticLayers);
$this->assign('arrSlides', $arrSlides);
$this->assign('slider', $slider);
$this->assign('numSlides', $numSlides);
$this->assign('numSliders', $numSliders);
}
示例13: define
}
// Exit if accessed directly
global $is_primary;
if (!class_exists('RevSlider')) {
return;
}
if (!defined('YIT_SLIDER_USED')) {
define('YIT_SLIDER_USED', true);
}
extract(array('slider_id' => 'slider-' . $this->index));
$sliderID = $slider->get('config-slider_name');
$the_slider = new RevSlider();
$the_slider->initByMixed($sliderID);
$slider_class = '';
//$slider_class .= yit_slide_get('align') != '' ? ' align' . yit_slide_get('align') : '';
$slider_class .= ' ' . $the_slider->getParam('slider_type');
$is_fixed = false;
if (!$is_primary && in_array($the_slider->getParam('slider_type'), array('fixed', 'responsitive')) || $slider->get('config-is_boxed') == 'yes') {
$is_fixed = true;
}
?>
<!-- START SLIDER -->
<div class="revolution-wrapper<?php
if ($is_fixed) {
echo ' container';
}
if ('yes' == yit_get_option('header-cat-dropdow-opened')) {
echo ' shop-by-category-opened';
}
?>
示例14: previewOutput
/**
*
* preview slider output
* if output object is null - create object
*/
public function previewOutput($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
$arrLanguages = UniteWpmlRev::getArrLanguages(false);
//set current lang to output
$currentLang = UniteFunctionsRev::getPostGetVariable("lang");
if (empty($currentLang)) {
$currentLang = UniteWpmlRev::getCurrentLang();
}
if (empty($currentLang)) {
$currentLang = $arrLanguages[0];
}
$output->setLang($currentLang);
$selectLangChoose = UniteFunctionsRev::getHTMLSelect($arrLanguages, $currentLang, "id='select_langs'", true);
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RevSliderAdmin::$url_plugin . "rs-plugin/";
$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&sliderid={$sliderID}&lang=[lang]";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css' type='text/css' media='all' />
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/captions.css' type='text/css' media='all' />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
if ($wpmlActive == true) {
?>
<div style="margin-bottom:10px;text-align:center;">
<?php
_e("Choose language");
?>
: <?php
echo $selectLangChoose;
?>
</div>
<script type="text/javascript">
var g_previewPattern = '<?php
echo $urlPreviewPattern;
?>
';
jQuery("#select_langs").change(function(){
var lang = this.value;
var pattern = g_previewPattern;
var urlPreview = pattern.replace("[lang]",lang);
location.href = urlPreview;
});
</script>
<?php
}
?>
<?php
$output->putSliderBase($sliderID);
?>
</body>
</html>
<?php
exit;
}
示例15: previewOutput
/**
*
* preview slider output
* if output object is null - create object
*/
public function previewOutput($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
$arrLanguages = UniteWpmlRev::getArrLanguages(false);
//set current lang to output
$currentLang = UniteFunctionsRev::getPostGetVariable("lang");
if (empty($currentLang)) {
$currentLang = UniteWpmlRev::getCurrentLang();
}
if (empty($currentLang)) {
$currentLang = $arrLanguages[0];
}
$output->setLang($currentLang);
$selectLangChoose = UniteFunctionsRev::getHTMLSelect($arrLanguages, $currentLang, "id='select_langs'", true);
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RevSliderAdmin::$url_plugin . "rs-plugin/";
$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&sliderid=" . $sliderID . "&lang=[lang]&nonce=[nonce]";
$nonce = wp_create_nonce("revslider_actions");
$setBase = is_ssl() ? "https://" : "http://";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
//check if dynamic-captions.css exists. If not, include captions.php
//if(file_exists(UniteBaseClassRev::$path_plugin."rs-plugin/css/dynamic-captions.css") == false){
?>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/captions.php?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
/*}else{
?>
<link rel='stylesheet' href='<?php echo $urlPlugin?>css/dynamic-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
<?php
}*/
$custom_css = RevOperations::getStaticCss();
echo '<style type="text/css">' . $custom_css . '</style>';
/*<!--link rel='stylesheet' href='<?php echo $urlPlugin?>css/static-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' /-->*/
?>
<script type='text/javascript' src='<?php
echo $setBase;
?>
ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.plugins.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
if ($wpmlActive == true) {
?>
<div style="margin-bottom:10px;text-align:center;">
<?php
_e("Choose language", REVSLIDER_TEXTDOMAIN);
?>
: <?php
echo $selectLangChoose;
//.........这里部分代码省略.........