Exemplo n.º 1
0
 function axiom_shortcodes_vc_scripts_front()
 {
     if (axiom_vc_is_frontend()) {
         // Include CSS
         axiom_enqueue_style('shortcodes_vc-style', axiom_get_file_url('shortcodes/shortcodes_vc_front.css'), array(), null);
         // Include JS
         axiom_enqueue_script('shortcodes_vc-script', axiom_get_file_url('shortcodes/shortcodes_vc_front.js'), array(), null, true);
     }
 }
Exemplo n.º 2
0
 function axiom_shortcodes_is_used()
 {
     return axiom_options_is_used() || is_admin() && isset($_POST['action']) && in_array($_POST['action'], array('vc_edit_form', 'wpb_show_edit_form')) || axiom_vc_is_frontend();
     // VC Frontend editor mode
 }
Exemplo n.º 3
0
 function axiom_core_add_scripts_inline()
 {
     global $AXIOM_GLOBALS;
     $msg = axiom_get_system_msg(true);
     if (!empty($msg['message'])) {
         axiom_enqueue_messages();
     }
     echo "<script type=\"text/javascript\">" . "jQuery(document).ready(function() {" . "AXIOM_GLOBALS['ajax_url']\t\t= '" . esc_url($AXIOM_GLOBALS['ajax_url']) . "';" . "AXIOM_GLOBALS['ajax_nonce']\t\t= '" . esc_attr($AXIOM_GLOBALS['ajax_nonce']) . "';" . "AXIOM_GLOBALS['ajax_nonce_editor'] = '" . esc_attr(wp_create_nonce('axiom_editor_nonce')) . "';" . "AXIOM_GLOBALS['site_url']\t\t= '" . get_site_url() . "';" . "AXIOM_GLOBALS['vc_edit_mode']\t= " . (axiom_vc_is_frontend() ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['theme_font']\t\t= '" . (axiom_get_custom_option('typography_custom') == 'yes' ? axiom_get_custom_option('typography_p_font') : '') . "';" . "AXIOM_GLOBALS['theme_skin']\t\t= '" . esc_attr(axiom_get_custom_option('theme_skin')) . "';" . "AXIOM_GLOBALS['theme_skin_bg']\t= '" . apply_filters('axiom_filter_get_theme_bgcolor', '') . "';" . "AXIOM_GLOBALS['slider_height']\t= " . max(100, axiom_get_custom_option('slider_height')) . ";" . "AXIOM_GLOBALS['system_message']\t= {" . "message: '" . addslashes($msg['message']) . "'," . "status: '" . addslashes($msg['status']) . "'," . "header: '" . addslashes($msg['header']) . "'" . "};" . "AXIOM_GLOBALS['user_logged_in']\t= " . (is_user_logged_in() ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['toc_menu']\t\t= '" . esc_attr(axiom_get_custom_option('menu_toc')) . "';" . "AXIOM_GLOBALS['toc_menu_home']\t= " . (axiom_get_custom_option('menu_toc') != 'hide' && axiom_get_custom_option('menu_toc_home') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['toc_menu_top']\t= " . (axiom_get_custom_option('menu_toc') != 'hide' && axiom_get_custom_option('menu_toc_top') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['menu_fixed']\t\t= " . (axiom_get_custom_option('menu_position') == 'fixed' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['menu_relayout']\t= " . max(0, (int) axiom_get_theme_option('menu_relayout')) . ";" . "AXIOM_GLOBALS['menu_responsive']\t= " . (axiom_get_theme_option('responsive_layouts') == 'yes' ? max(0, (int) axiom_get_theme_option('menu_responsive')) : 0) . ";" . "AXIOM_GLOBALS['menu_slider']     = " . (axiom_get_theme_option('menu_slider') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['demo_time']\t\t=  500;" . "AXIOM_GLOBALS['media_elements_enabled'] = " . (axiom_get_theme_option('use_mediaelement') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['ajax_search_enabled'] \t= " . (axiom_get_theme_option('use_ajax_search') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['ajax_search_min_length']\t= " . min(3, axiom_get_theme_option('ajax_search_min_length')) . ";" . "AXIOM_GLOBALS['ajax_search_delay']\t\t= " . min(200, max(1000, axiom_get_theme_option('ajax_search_delay'))) . ";" . "AXIOM_GLOBALS['css_animation']      = " . (axiom_get_theme_option('css_animation') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['menu_animation_in']  = '" . esc_attr(axiom_get_theme_option('menu_animation_in')) . "';" . "AXIOM_GLOBALS['menu_animation_out'] = '" . esc_attr(axiom_get_theme_option('menu_animation_out')) . "';" . "AXIOM_GLOBALS['popup_engine']\t= '" . esc_attr(axiom_get_theme_option('popup_engine')) . "';" . "AXIOM_GLOBALS['popup_gallery']\t= " . (axiom_get_theme_option('popup_gallery') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['email_mask']\t\t= '^([a-zA-Z0-9_\\-]+\\.)*[a-zA-Z0-9_\\-]+@[a-z0-9_\\-]+(\\.[a-z0-9_\\-]+)*\\.[a-z]{2,6}\$';" . "AXIOM_GLOBALS['contacts_maxlength']\t= " . intval(axiom_get_theme_option('message_maxlength_contacts')) . ";" . "AXIOM_GLOBALS['comments_maxlength']\t= " . intval(axiom_get_theme_option('message_maxlength_comments')) . ";" . "AXIOM_GLOBALS['remember_visitors_settings']\t= " . (axiom_get_theme_option('remember_visitors_settings') == 'yes' ? 'true' : 'false') . ";" . "AXIOM_GLOBALS['admin_mode']\t\t\t= false;" . "AXIOM_GLOBALS['isotope_resize_delta']\t= 0.3;" . "AXIOM_GLOBALS['error_message_box']\t= null;" . "AXIOM_GLOBALS['viewmore_busy']\t\t= false;" . "AXIOM_GLOBALS['video_resize_inited']\t= false;" . "AXIOM_GLOBALS['top_panel_height']\t\t= 0;" . "});" . "</script>";
 }