本文整理汇总了PHP中RevSliderFunctions::jsonEncodeForClientSide方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderFunctions::jsonEncodeForClientSide方法的具体用法?PHP RevSliderFunctions::jsonEncodeForClientSide怎么用?PHP RevSliderFunctions::jsonEncodeForClientSide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderFunctions
的用法示例。
在下文中一共展示了RevSliderFunctions::jsonEncodeForClientSide方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _e
<div class="tp-arrows tp-rightarrow"></div>
</div>
<div class="rs-bullets-preview"></div>
<div class="rs-thumbs-preview"></div>
<div class="rs-tabs-preview"></div>
</div>
<a class="button-primary revgreen" id="rs-save-navigation-style" href="javascript:void(0);"><i class="rs-icon-save-light"></i><?php
_e('Save All Changes', REVSLIDER_TEXTDOMAIN);
?>
</a>
<script type="text/javascript">
var rs_navigations = jQuery.parseJSON(<?php
echo RevSliderFunctions::jsonEncodeForClientSide($navigs);
?>
) || new Array();
jQuery(document).ready(function(){
var rs_current_editing = false;
var cur_edit_type = false;
var latest_nav_id = 0;
var global_navigation_template = wp.template( "rs-navigation-wrap" );
var global_navigation_template_header = wp.template( "rs-navigation-header-wrap" );
rs_add_all_navigation_entries();
function rs_add_navigation_header(title, type){
var data = { title: title, type: type };
示例2: onAjaxAction
//.........这里部分代码省略.........
RevSliderFunctions::throwError(__('Could not save Slide as Template', 'revslider'));
exit;
}
//get HTML for template section
ob_start();
$rs_disable_template_script = true;
//disable the script output of template selector file
include RS_PLUGIN_PATH . 'admin/views/templates/template-selector.php';
$html = ob_get_contents();
ob_clean();
ob_end_clean();
self::ajaxResponseSuccess(__('Slide added to Templates', 'revslider'), array('HTML' => $html));
exit;
break;
break;
case "get_static_css":
$contentCSS = $operations->getStaticCss();
self::ajaxResponseData($contentCSS);
break;
case "get_dynamic_css":
$contentCSS = $operations->getDynamicCss();
self::ajaxResponseData($contentCSS);
break;
case "insert_captions_css":
$arrCaptions = $operations->insertCaptionsContentData($data);
if ($arrCaptions !== false) {
$db = new RevSliderDB();
$styles = $db->fetch(RevSliderGlobals::$table_css);
$styles = RevSliderCssParser::parseDbArrayToCss($styles, "\n");
$styles = RevSliderCssParser::compress_css($styles);
$custom_css = RevSliderOperations::getStaticCss();
$custom_css = RevSliderCssParser::compress_css($custom_css);
$arrCSS = $operations->getCaptionsContentArray();
$arrCssStyles = RevSliderFunctions::jsonEncodeForClientSide($arrCSS);
$arrCssStyles = $arrCSS;
self::ajaxResponseSuccess(__("CSS saved", 'revslider'), array("arrCaptions" => $arrCaptions, 'compressed_css' => $styles . $custom_css, 'initstyles' => $arrCssStyles));
}
RevSliderFunctions::throwError(__('CSS could not be saved', 'revslider'));
exit;
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
if ($arrCaptions !== false) {
$db = new RevSliderDB();
$styles = $db->fetch(RevSliderGlobals::$table_css);
$styles = RevSliderCssParser::parseDbArrayToCss($styles, "\n");
$styles = RevSliderCssParser::compress_css($styles);
$custom_css = RevSliderOperations::getStaticCss();
$custom_css = RevSliderCssParser::compress_css($custom_css);
$arrCSS = $operations->getCaptionsContentArray();
$arrCssStyles = RevSliderFunctions::jsonEncodeForClientSide($arrCSS);
$arrCssStyles = $arrCSS;
self::ajaxResponseSuccess(__("CSS saved", 'revslider'), array("arrCaptions" => $arrCaptions, 'compressed_css' => $styles . $custom_css, 'initstyles' => $arrCssStyles));
}
RevSliderFunctions::throwError(__('CSS could not be saved', 'revslider'));
exit;
break;
case "update_captions_advanced_css":
$arrCaptions = $operations->updateAdvancedCssData($data);
if ($arrCaptions !== false) {
$db = new RevSliderDB();
$styles = $db->fetch(RevSliderGlobals::$table_css);
$styles = RevSliderCssParser::parseDbArrayToCss($styles, "\n");
$styles = RevSliderCssParser::compress_css($styles);
$custom_css = RevSliderOperations::getStaticCss();
$custom_css = RevSliderCssParser::compress_css($custom_css);
示例3: changeNavStyle
if (e.closest('#nav_bullets_subs').length>0)
navtype = 'bullets';
else
if (e.closest('#nav_tabs_subs').length>0)
navtype = 'tabs';
else
if (e.closest('#nav_thumbnails_subs').length>0)
navtype = 'thumbs';
var s = changeNavStyle(navtype,jQuery(this));
if (s!=undefined)
cont.html("Suggested Size:"+s.w+" x "+s.h+"px");
else cont.hide();
})
var rs_navigations = jQuery.parseJSON(<?php
echo RevSliderFunctions::jsonEncodeForClientSide($arr_navigations);
?>
);
var googlef_template_container = wp.template( "rs-preset-googlefont" );
jQuery('#add_new_google_font').click(function(){
var content = googlef_template_container({'value':''});
jQuery('#rs-google-fonts').append(content);
});
jQuery('body').on('click', '.rs-google-remove-field', function(){
jQuery(this).parent().remove();
});
示例4: array
</div>
<?php
if ($slide->isStaticSlide()) {
$slideID = $slide->getID();
}
$mslide_list = array();
if (!empty($arrSlidesWPML)) {
foreach ($arrSlidesWPML as $arwmpl) {
if ($arwmpl['id'] == $slideID) {
continue;
}
$mslide_list[] = array($arwmpl['id'] => $arwmpl['title']);
}
}
$mslide_list = RevSliderFunctions::jsonEncodeForClientSide($mslide_list);
?>
<script type="text/javascript">
var g_patternViewSlide = '<?php
echo $patternViewSlide;
?>
';
var g_messageDeleteSlide = "<?php
_e("Delete this slide?", REVSLIDER_TEXTDOMAIN);
?>
";
jQuery(document).ready(function(){
RevSliderAdmin.initEditSlideView(<?php
echo $slideID;
示例5: array
<?php
if (!defined('ABSPATH')) {
exit;
}
//get taxonomies with cats
$postTypesWithCats = RevSliderOperations::getPostTypesWithCatsForClient();
$jsonTaxWithCats = RevSliderFunctions::jsonEncodeForClientSide($postTypesWithCats);
//check existing slider data:
$sliderID = self::getGetVar('id');
$arrFieldsParams = array();
if (!empty($sliderID)) {
$slider = new RevSlider();
$slider->initByID($sliderID);
//get setting fields
$settingsFields = $slider->getSettingsFields();
$arrFieldsMain = $settingsFields['main'];
$arrFieldsParams = $settingsFields['params'];
$linksEditSlides = self::getViewUrl(RevSliderAdmin::VIEW_SLIDE, 'id=new&slider=' . intval($sliderID));
require self::getPathTemplate('edit-slider');
} else {
require self::getPathTemplate('create-slider');
}
示例6: add_tiny_mce_shortcode_dialog
//.........这里部分代码省略.........
?>
" data-slideralias="<?php
echo esc_attr($values['slideralias']);
?>
">
<span class="mini-transparent mini-as-bg"></span>
<div class="rs-slider-modify-container <?php
echo $values['bg_extraClass'];
?>
" <?php
echo $values['bg_fullstyle'];
?>
></div>
<i class="slide-link-forward eg-icon-forward"></i>
<span class="rs-slider-modify-title">#<?php
echo $values['sliderid'] . ' ' . $values['slidertitle'];
?>
</span>
</li>
<?php
break;
}
}
}
?>
<span style="clear:both;width:100%;display:block"></span>
</ul>
<span style="clear:both;width:100%;display:block"></span>
<script type="text/javascript">
var rev_sliders_info = jQuery.parseJSON(<?php
echo RevSliderFunctions::jsonEncodeForClientSide($sliders_info);
?>
);
</script>
</div>
<div class="revslider-stepnavigator">
<span class="revslider-currentstep"><strong><?php
_e('STEP 1', 'revslider');
?>
</strong><?php
_e('Select / Create Slider', 'revslider');
?>
</span>
<span class="revslider-step-actions-wrapper">
<a href="javascript:void(0);" class="button-primary nonclickable" id="rs-modify-predefined-slider"><span class="dashicons dashicons-admin-generic"></span><?php
_e('Quick Modify Slider', 'revslider');
?>
</a>
<a href="javascript:void(0);" class="button-primary nonclickable" id="rs-add-predefined-slider"><span class="dashicons dashicons-migrate"></span><?php
_e('Add Selected Slider', 'revslider');
?>
</a>
</span>
<span style="clear:both;width:100%;display:block"></span>
</div>
</div>
<!-- STEP 1.5 -->
<div id="revslider-tiny-dialog-step-1-5" style="display: none;">
<p class="revslider-quicktitle"></p>
<div id="revslider-tiny-settings-wrap" class="revslider-quick-inner-wrapper" style="padding-right:0px;padding-bottom:0px;">
<ul class="rs-mod-slides-wrapper">