本文整理汇总了PHP中vc_is_editor函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_is_editor函数的具体用法?PHP vc_is_editor怎么用?PHP vc_is_editor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_is_editor函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: aio_front_scripts
function aio_front_scripts()
{
$isAjax = false;
$ultimate_ajax_theme = get_option('ultimate_ajax_theme');
if ($ultimate_ajax_theme == 'enable') {
$isAjax = true;
}
$dependancy = array('jquery');
$bsf_dev_mode = bsf_get_option('dev_mode');
if ($bsf_dev_mode === 'enable') {
$js_path = 'assets/js/';
$css_path = 'assets/css/';
$ext = '';
} else {
$js_path = 'assets/min-js/';
$css_path = 'assets/min-css/';
$ext = '.min';
}
$ultimate_smooth_scroll_compatible = get_option('ultimate_smooth_scroll_compatible');
// register js
wp_register_script('ultimate-script', plugins_url('assets/min-js/ultimate.min.js', __FILE__), array('jquery'), ULTIMATE_VERSION, false);
wp_register_script('ultimate-appear', plugins_url($js_path . 'jquery-appear' . $ext . '.js', __FILE__), array('jquery'), ULTIMATE_VERSION);
wp_register_script('ultimate-custom', plugins_url($js_path . 'custom' . $ext . '.js', __FILE__), array('jquery'), ULTIMATE_VERSION);
wp_register_script('ultimate-vc-params', plugins_url($js_path . 'ultimate-params' . $ext . '.js', __FILE__), array('jquery'), ULTIMATE_VERSION);
if ($ultimate_smooth_scroll_compatible === 'enable') {
$smoothScroll = 'SmoothScroll-compatible.min.js';
} else {
$smoothScroll = 'SmoothScroll.min.js';
}
wp_register_script('ultimate-smooth-scroll', plugins_url('assets/min-js/' . $smoothScroll, __FILE__), array('jquery'), ULTIMATE_VERSION, true);
wp_register_script("ultimate-modernizr", plugins_url($js_path . 'modernizr-custom' . $ext . '.js', __FILE__), array('jquery'), ULTIMATE_VERSION);
wp_register_script("ultimate-tooltip", plugins_url($js_path . 'tooltip' . $ext . '.js', __FILE__), array('jquery'), ULTIMATE_VERSION);
// register css
wp_register_style('ultimate-animate', plugins_url($css_path . 'animate' . $ext . '.css', __FILE__), array(), ULTIMATE_VERSION);
wp_register_style('ultimate-style', plugins_url($css_path . 'style' . $ext . '.css', __FILE__), array(), ULTIMATE_VERSION);
wp_register_style('ultimate-style-min', plugins_url('assets/min-css/ultimate.min.css', __FILE__), array(), ULTIMATE_VERSION);
wp_register_style('ultimate-tooltip', plugins_url($css_path . 'tooltip' . $ext . '.css', __FILE__), array(), ULTIMATE_VERSION);
$ultimate_smooth_scroll = get_option('ultimate_smooth_scroll');
if ($ultimate_smooth_scroll == "enable" || $ultimate_smooth_scroll_compatible === 'enable') {
wp_enqueue_script('ultimate-smooth-scroll');
}
if (function_exists('vc_is_editor')) {
if (vc_is_editor()) {
wp_enqueue_style('vc-fronteditor', plugins_url('assets/min-css/vc-fronteditor.min.css', __FILE__));
}
}
$fonts = get_option('smile_fonts');
if (is_array($fonts)) {
foreach ($fonts as $font => $info) {
$style_url = $info['style'];
if (strpos($style_url, 'http://') !== false) {
wp_enqueue_style('bsf-' . $font, $info['style']);
} else {
wp_enqueue_style('bsf-' . $font, trailingslashit($this->paths['fonturl']) . $info['style']);
}
}
}
$ultimate_global_scripts = bsf_get_option('ultimate_global_scripts');
if ($ultimate_global_scripts === 'enable') {
wp_enqueue_script('ultimate-modernizr');
wp_enqueue_script('jquery_ui');
wp_enqueue_script('masonry');
wp_enqueue_script('googleapis');
wp_enqueue_script('ultimate-script');
wp_enqueue_script('ultimate-modal-all');
wp_enqueue_script('jquery.shake', plugins_url($js_path . 'jparallax' . $ext . '.js', __FILE__));
wp_enqueue_script('jquery.vhparallax', plugins_url($js_path . 'vhparallax' . $ext . '.js', __FILE__));
wp_enqueue_style('ultimate-style-min');
wp_enqueue_style("ult-icons");
wp_enqueue_style('ultimate-vidcons', plugins_url('assets/fonts/vidcons.css', __FILE__));
wp_enqueue_script('jquery.ytplayer', plugins_url($js_path . 'mb-YTPlayer' . $ext . '.js', __FILE__));
$Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager();
$Ultimate_Google_Font_Manager->enqueue_selected_ultimate_google_fonts();
return false;
}
if (!is_404() && !is_search()) {
global $post;
if (!$post) {
return false;
}
$post_content = $post->post_content;
$is_element_on_page = $this->check_our_element_on_page($post_content);
if (stripos($post_content, 'font_call:')) {
preg_match_all('/font_call:(.*?)"/', $post_content, $display);
enquque_ultimate_google_fonts_optimzed($display[1]);
}
if (!$is_element_on_page) {
return false;
}
$ultimate_js = get_option('ultimate_js');
if (($ultimate_js == 'enable' || $isAjax == true) && $bsf_dev_mode != 'enable') {
if (stripos($post_content, '[swatch_container') || stripos($post_content, '[ultimate_modal')) {
wp_enqueue_script('ultimate-modernizr');
}
if (stripos($post_content, '[ultimate_exp_section') || stripos($post_content, '[info_circle')) {
wp_enqueue_script('jquery_ui');
}
if (stripos($post_content, '[icon_timeline')) {
wp_enqueue_script('masonry');
}
//.........这里部分代码省略.........
示例2: aio_front_scripts
function aio_front_scripts()
{
// register js
wp_register_script('ultimate-appear', $this->assets_js . 'jquery.appear.js', array('jquery'), '1.5', true);
wp_register_script('ultimate-custom', $this->assets_js . 'custom.js', array('jquery'), '1.5', true);
// register css
wp_register_style('ultimate-animate', $this->assets_css . 'animate.css');
wp_register_style('ultimate-style', $this->assets_css . 'style.css');
if (function_exists('vc_is_editor')) {
if (vc_is_editor()) {
wp_enqueue_style('vc-fronteditor', $this->assets_css . 'vc-fronteditor.css');
}
}
$fonts = get_option('smile_fonts');
if (is_array($fonts)) {
foreach ($fonts as $font => $info) {
$style_url = $info['style'];
if (strpos($style_url, 'http://') !== false) {
wp_enqueue_style('bsf-' . $font, $info['style']);
} else {
wp_enqueue_style('bsf-' . $font, trailingslashit($this->paths['fonturl']) . $info['style']);
}
}
}
}
示例3: aio_front_scripts
//.........这里部分代码省略.........
}
if (stripos($post_content, '[ultimate_icons') || stripos($post_content, '[single_icon')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('aio-tooltip', plugins_url('assets/min-css/tooltip.min.css', __FILE__));
}
if (stripos($post_content, '[ult_ihover')) {
wp_enqueue_style('ult_ihover_css');
}
if (stripos($post_content, '[ult_hotspot')) {
wp_enqueue_style('ult_hotspot_css');
wp_enqueue_style('ult_hotspot_tooltipster_css');
}
if (stripos($post_content, '[bsf-info-box')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('info-box-style', plugins_url('assets/min-css/info-box.min.css', __FILE__));
}
if (stripos($post_content, '[info_circle')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('info-circle', plugins_url('assets/min-css/info-circle.min.css', __FILE__));
}
if (stripos($post_content, '[ultimate_info_banner')) {
wp_enqueue_style('utl-info-banner-style');
wp_enqueue_style('ultimate-animate');
}
if (stripos($post_content, '[icon_timeline')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('aio-timeline', plugins_url('assets/min-css/timeline.min.css', __FILE__));
}
if (stripos($post_content, '[just_icon')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('aio-tooltip', plugins_url('assets/min-css/tooltip.min.css', __FILE__));
}
if (stripos($post_content, '[interactive_banner_2')) {
wp_enqueue_style('utl-ib2-style', plugins_url('assets/min-css/ib2-style.min.css', __FILE__));
}
if (stripos($post_content, '[interactive_banner')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('aio-interactive-styles', plugins_url('assets/min-css/interactive-styles.min.css', __FILE__));
}
if (stripos($post_content, '[info_list')) {
wp_enqueue_style('ultimate-animate');
}
if (stripos($post_content, '[ultimate_modal')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('ultimate-modal', plugins_url('assets/min-css/modal.min.css', __FILE__));
}
if (stripos($post_content, '[ultimate_info_table')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style("ultimate-pricing", plugins_url("assets/min-css/pricing.min.css", __FILE__));
}
if (stripos($post_content, '[ultimate_pricing')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style("ultimate-pricing", plugins_url("assets/min-css/pricing.min.css", __FILE__));
}
if (stripos($post_content, '[swatch_container')) {
wp_enqueue_style('swatchbook-css', plugins_url('assets/min-css/swatchbook.min.css', __FILE__));
}
if (stripos($post_content, '[stat_counter')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('stats-counter-style', plugins_url('assets/min-css/stats-counter.min.css', __FILE__));
}
if (stripos($post_content, '[ultimate_video_banner')) {
wp_enqueue_style('ultimate-video-banner-style');
}
if (stripos($post_content, '[ult_dualbutton')) {
wp_enqueue_style('ult-dualbutton');
}
if (stripos($post_content, '[ult_createlink')) {
wp_enqueue_style('ult_cllink');
}
if (stripos($post_content, '[ultimate_img_separator')) {
wp_enqueue_style('ultimate-animate');
wp_enqueue_style('ult-easy-separator-style');
}
}
}
wp_register_script('ultimate-appear', plugins_url('assets/min-js/jquery.appear.min.js', __FILE__), array('jquery'), ULTIMATE_VERSION, true);
wp_register_script('ultimate-custom', plugins_url('assets/min-js/custom.min.js', __FILE__), $dependancy, ULTIMATE_VERSION, true);
wp_register_script('ultimate-smooth-scroll', $this->assets_js . 'SmoothScroll.js', array('jquery'), ULTIMATE_VERSION, true);
$ultimate_smooth_scroll = get_option('ultimate_smooth_scroll');
if ($ultimate_smooth_scroll == "enable") {
wp_enqueue_script('ultimate-smooth-scroll');
}
if (function_exists('vc_is_editor')) {
if (vc_is_editor()) {
wp_enqueue_style('vc-fronteditor', plugins_url('assets/min-css/vc-fronteditor.min.css', __FILE__));
}
}
$fonts = get_option('smile_fonts');
if (is_array($fonts)) {
foreach ($fonts as $font => $info) {
$style_url = $info['style'];
if (strpos($style_url, 'http://') !== false) {
wp_enqueue_style('bsf-' . $font, $info['style']);
} else {
wp_enqueue_style('bsf-' . $font, trailingslashit($this->paths['fonturl']) . $info['style']);
}
}
}
}
示例4: isEditor
/**
* @return bool
*/
public function isEditor()
{
return vc_is_editor();
}
示例5: wp_enqueue_style
wp_enqueue_style('imd_ui_tabs');
wp_enqueue_style('imd_ui_acordian');
}
if (stripos($post_content, '[ultimate_exp_section')) {
wp_enqueue_style('style_ultimate_expsection');
}
}
wp_register_script('ultimate-appear', $porto_ult_assets . 'min-js/jquery.appear.min.js', array('jquery'), ULTIMATE_VERSION, true);
wp_register_script('ultimate-custom', $porto_ult_assets . 'min-js/custom.min.js', $dependancy, ULTIMATE_VERSION, true);
wp_register_script('ultimate-smooth-scroll', $porto_ult_assets . 'js/SmoothScroll.js', array('jquery'), ULTIMATE_VERSION, true);
$ultimate_smooth_scroll = get_option('ultimate_smooth_scroll');
if ($ultimate_smooth_scroll == "enable") {
wp_enqueue_script('ultimate-smooth-scroll');
}
if (function_exists('vc_is_editor')) {
if (vc_is_editor()) {
wp_enqueue_style('vc-fronteditor', $porto_ult_assets . 'min-css/vc-fronteditor.min.css');
}
}
$fonts = get_option('smile_fonts');
if (is_array($fonts)) {
foreach ($fonts as $font => $info) {
$style_url = $info['style'];
if (strpos($style_url, 'http://') !== false) {
wp_enqueue_style('bsf-' . $font, $info['style']);
} else {
$paths = wp_upload_dir();
$paths['fonts'] = 'smile_fonts';
$paths['fonturl'] = set_url_scheme(trailingslashit($paths['baseurl']) . $paths['fonts']);
wp_enqueue_style('bsf-' . $font, trailingslashit($paths['fonturl']) . $info['style']);
}