public function editScreen_js() { if (in_array(get_post_type(), $this->composer->getPostTypes())) { wp_enqueue_style('wp-color-picker'); wp_enqueue_script('wp-color-picker'); wp_enqueue_style('farbtastic'); wp_enqueue_style('ui-custom-theme'); wp_enqueue_style('isotope-css'); wp_enqueue_style('animate-css'); wp_enqueue_style('js_composer'); wp_enqueue_style('wpb_jscomposer_autosuggest'); WPBakeryShortCode_Settings::enqueueCss(); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_script('jquery-ui-autocomplete'); wp_enqueue_script('farbtastic'); //MMM wp_enqueue_script('bootstrap-js'); wp_enqueue_script('isotope'); wp_enqueue_script('wpb_bootstrap_modals_js'); wp_enqueue_script('wpb_scrollTo_js'); wp_enqueue_script('wpb_php_js'); // js composer js app {{ // wpb_js_composer_js_sortable wp_enqueue_script('wpb_js_composer_js_sortable'); wp_enqueue_script('wpb_json-js'); wp_enqueue_script('wpb_js_composer_js_tools'); wp_enqueue_script('wpb_js_composer_js_storage'); wp_enqueue_script('wpb_js_composer_js_models'); wp_enqueue_script('wpb_js_composer_js_view'); wp_enqueue_script('wpb_js_composer_js_custom_views'); wp_enqueue_script('wpb_js_composer_js_backbone'); wp_enqueue_script('wpb_jscomposer_composer_js'); wp_enqueue_script('wpb_jscomposer_shortcode_js'); wp_enqueue_script('wpb_jscomposer_modal_js'); wp_enqueue_script('wpb_jscomposer_templates_js'); wp_enqueue_script('wpb_jscomposer_stage_js'); wp_enqueue_script('wpb_jscomposer_layout_js'); wp_enqueue_script('wpb_jscomposer_row_js'); wp_enqueue_script('wpb_jscomposer_settings_js'); wp_enqueue_script('wpb_jscomposer_media_editor_js'); wp_enqueue_script('wpb_jscomposer_autosuggest_js'); // }} wp_enqueue_script('wpb_js_composer_js'); WPBakeryShortCode_Settings::enqueueJs(); } }
public function getEditFormJavascript_callback() { $tag = $this->post('tag'); $atts = $this->post('atts'); $content = $this->post('content'); $this->removeShortCode($tag); $settings = WPBMap::getShortCode($tag); $settings = new WPBakeryShortCode_Settings($settings); echo $settings->contentAdmin($atts, $content); die; }
function wd_icon_function($atts) { $default_atts = array("title" => "", "size" => "", "custom_size" => "", "icon" => "", "type" => "", "background_color" => "", "border_width" => "", "border_color" => "", "icon_color" => "", "margin" => "", "css_animation" => "", "link" => "", "target" => "", "distance" => "", "class" => ""); extract(shortcode_atts($default_atts, $atts)); $html = ""; if ($icon != "") { //generate inline icon styles $style = ''; $style_normal = ''; //$icon_stack_classes = ''; $animation_delay_style = ''; //generate icon stack styles $icon_stack_style = ''; $icon_stack_base_style = ''; $icon_stack_circle_styles = ''; $icon_stack_square_styles = ''; $icon_stack_normal_style = ''; if ($custom_size != "") { $style .= 'font-size: ' . $custom_size; $icon_stack_circle_styles .= 'font-size: ' . ($custom_size + intval($distance)); $icon_stack_square_styles .= 'font-size: ' . $custom_size; if (!strstr($custom_size, 'px')) { $style .= 'px;'; $icon_stack_circle_styles .= 'px;'; $icon_stack_square_styles .= 'px;'; } } if ($icon_color != "") { $style .= 'color: ' . $icon_color . ';'; } if ($background_color != "") { $icon_stack_base_style .= 'color: ' . $background_color . ';'; $icon_stack_style .= 'background-color: ' . $background_color . ';'; $icon_stack_square_styles .= 'background-color: ' . $background_color . ';'; } if ($border_width != '' && $border_color != "") { $icon_stack_style .= 'border-width:' . $border_width . (is_numeric($border_width) ? 'px' : '') . ';'; $icon_stack_style .= 'border-color: ' . $border_color . ';'; $icon_stack_style .= 'border-style: solid;'; } if ($margin != "") { $icon_stack_style .= 'margin: ' . $margin . (is_numeric($margin) ? 'px' : '') . ';'; $icon_stack_circle_styles .= 'margin: ' . $margin . (is_numeric($margin) ? 'px' : '') . ';'; $icon_stack_normal_style .= 'margin: ' . $margin . (is_numeric($margin) ? 'px' : '') . ';'; } $css_animation = WPBakeryShortCode_Settings::getCSSAnimation($css_animation); switch ($type) { case 'circle': $html = '<span class="fa-stack wd_font_awsome_icon_stack ' . $size . ' ' . $css_animation . '" style="' . $icon_stack_circle_styles . '">'; if ($link != "") { $html .= '<a href="' . $link . '" target="' . $target . '">'; } $html .= '<i class="fa fa-circle fa-stack-base fa-stack-2x" style="' . $icon_stack_base_style . '"></i>'; $html .= '<i class="fa ' . $icon . ' fa-stack-1x" style="' . $style . '"></i>'; break; case 'square': $html = '<span class="fa-stack wd_font_awsome_icon_square ' . $size . ' ' . $css_animation . '" style="' . $icon_stack_style . $icon_stack_square_styles . '">'; if ($link != "") { $html .= '<a href="' . $link . '" target="' . $target . '">'; } $html .= '<i class="fa ' . $icon . ' fa-stack-1x" style="' . $style . '"></i>'; break; default: $html = '<span class="wd_font_awsome_icon ' . $size . ' ' . $css_animation . '" style="' . $icon_stack_normal_style . '">'; if ($link != "") { $html .= '<a href="' . $link . '" target="' . $target . '">'; } $html .= '<i class="fa ' . $icon . ' fa-stack-1x" style="' . $style . '"></i>'; break; } if ($link != "") { $html .= '</a>'; } $html .= '</span>'; } if ($class != '') { $html = '<span class="' . $class . '">' . $html . '</span>'; } if ($title != "") { $html = '<div class="icon-wrapper"><span class="icon-item">' . $html . '</span><span class="h4 icon-item">' . $title . '</span></div>'; } return $html; }
/** * Enqueue required javascript libraries and css files. * * This method also setups reminder about license activation. * * @since 4.2 * @access public */ public function printScriptsMessages() { if (in_array(get_post_type(), vc_editor_post_types())) { vc_license()->setupReminder(); wp_enqueue_style('wp-color-picker'); wp_enqueue_script('wp-color-picker'); wp_enqueue_style('farbtastic'); wp_enqueue_style('ui-custom-theme'); wp_enqueue_style('isotope-css'); wp_enqueue_style('animate-css'); wp_enqueue_style('js_composer'); wp_enqueue_style('wpb_jscomposer_autosuggest'); WPBakeryShortCode_Settings::enqueueCss(); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_script('jquery-ui-autocomplete'); wp_enqueue_script('farbtastic'); wp_enqueue_script('isotope'); wp_enqueue_script('vc_bootstrap_js', vc_asset_url('lib/bootstrap3/dist/js/bootstrap.min.js'), array('jquery'), '3.0.2', true); wp_enqueue_script('wpb_scrollTo_js'); wp_enqueue_script('wpb_php_js'); wp_enqueue_script('wpb_js_composer_js_sortable'); wp_enqueue_script('wpb_json-js'); wp_enqueue_style('js_composer_settings', vc_asset_url('css/js_composer_settings.css'), false, WPB_VC_VERSION, false); wp_enqueue_script('ace-editor'); wp_enqueue_script('webfont', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js'); // Google Web Font CDN wp_enqueue_script('wpb_js_composer_js_tools'); wp_enqueue_script('wpb_js_composer_js_storage'); wp_enqueue_script('wpb_js_composer_js_models'); wp_enqueue_script('wpb_js_composer_js_view'); wp_enqueue_script('wpb_js_composer_js_custom_views'); /** * Enqueue deprecated */ wp_enqueue_script('vc_js_composer_js_backend_deprecated', vc_asset_url('js/backend/deprecated.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true); wp_enqueue_script('wpb_js_composer_js_backbone'); wp_enqueue_script('wpb_jscomposer_composer_js'); wp_enqueue_script('wpb_jscomposer_shortcode_js'); wp_enqueue_script('wpb_jscomposer_modal_js'); wp_enqueue_script('wpb_jscomposer_templates_js'); wp_enqueue_script('wpb_jscomposer_stage_js'); wp_enqueue_script('wpb_jscomposer_layout_js'); wp_enqueue_script('wpb_jscomposer_row_js'); wp_enqueue_script('wpb_jscomposer_settings_js'); wp_enqueue_script('wpb_jscomposer_media_editor_js'); wp_enqueue_script('wpb_jscomposer_autosuggest_js'); // }} wp_enqueue_script('wpb_js_composer_js'); WPBakeryShortCode_Settings::enqueueJs(); } }
public function editScreen_js() { if (in_array(get_post_type(), $this->composer->getPostTypes())) { $this->setupNotifications(); wp_enqueue_style('farbtastic'); wp_enqueue_style('bootstrap'); wp_enqueue_style('bootstrap_modals'); wp_enqueue_style('ui-custom-theme'); wp_enqueue_style('isotope-css'); wp_enqueue_style('animate-css'); wp_enqueue_style('js_composer'); WPBakeryShortCode_Settings::enqueueCss(); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_script('farbtastic'); wp_enqueue_script('bootstrap-js'); wp_enqueue_script('isotope'); wp_enqueue_script('wpb_bootstrap_modals_js'); wp_enqueue_script('wpb_scrollTo_js'); wp_enqueue_script('wpb_php_js'); WPBakeryShortCode_Settings::enqueueJs(); // js composer js app {{ wp_enqueue_script('wpb_jscomposer_composer_js'); wp_enqueue_script('wpb_jscomposer_shortcode_js'); wp_enqueue_script('wpb_jscomposer_modal_js'); wp_enqueue_script('wpb_jscomposer_templates_js'); wp_enqueue_script('wpb_jscomposer_stage_js'); wp_enqueue_script('wpb_jscomposer_layout_js'); wp_enqueue_script('wpb_jscomposer_row_js'); wp_enqueue_script('wpb_jscomposer_settings_js'); wp_enqueue_script('wpb_jscomposer_media_editor_js'); // }} wp_enqueue_script('wpb_js_composer_js'); } }