shortcode-vc-cta.php 0000666 00000022204 15214125514 0010426 0 ustar 00 array( 'source', 'text', 'css', ), ), array( 'element' => 'use_custom_fonts_h2', 'value' => 'true', ) ); // This is needed to remove custom heading _tag and _align options. if ( is_array( $h2_custom_heading ) && ! empty( $h2_custom_heading ) ) { foreach ( $h2_custom_heading as $key => $param ) { if ( is_array( $param ) && isset( $param['type'] ) && 'font_container' === $param['type'] ) { $h2_custom_heading[ $key ]['value'] = ''; if ( isset( $param['settings'] ) && is_array( $param['settings'] ) && isset( $param['settings']['fields'] ) ) { $sub_key = array_search( 'tag', $param['settings']['fields'] ); if ( false !== $sub_key ) { unset( $h2_custom_heading[ $key ]['settings']['fields'][ $sub_key ] ); } elseif ( isset( $param['settings']['fields']['tag'] ) ) { unset( $h2_custom_heading[ $key ]['settings']['fields']['tag'] ); } $sub_key = array_search( 'text_align', $param['settings']['fields'] ); if ( false !== $sub_key ) { unset( $h2_custom_heading[ $key ]['settings']['fields'][ $sub_key ] ); } elseif ( isset( $param['settings']['fields']['text_align'] ) ) { unset( $h2_custom_heading[ $key ]['settings']['fields']['text_align'] ); } } } } } $h4_custom_heading = vc_map_integrate_shortcode( vc_custom_heading_element_params(), 'h4_', __( 'Subheading', 'js_composer' ), array( 'exclude' => array( 'source', 'text', 'css', ), ), array( 'element' => 'use_custom_fonts_h4', 'value' => 'true', ) ); // This is needed to remove custom heading _tag and _align options. if ( is_array( $h4_custom_heading ) && ! empty( $h4_custom_heading ) ) { foreach ( $h4_custom_heading as $key => $param ) { if ( is_array( $param ) && isset( $param['type'] ) && 'font_container' === $param['type'] ) { $h4_custom_heading[ $key ]['value'] = ''; if ( isset( $param['settings'] ) && is_array( $param['settings'] ) && isset( $param['settings']['fields'] ) ) { $sub_key = array_search( 'tag', $param['settings']['fields'] ); if ( false !== $sub_key ) { unset( $h4_custom_heading[ $key ]['settings']['fields'][ $sub_key ] ); } elseif ( isset( $param['settings']['fields']['tag'] ) ) { unset( $h4_custom_heading[ $key ]['settings']['fields']['tag'] ); } $sub_key = array_search( 'text_align', $param['settings']['fields'] ); if ( false !== $sub_key ) { unset( $h4_custom_heading[ $key ]['settings']['fields'][ $sub_key ] ); } elseif ( isset( $param['settings']['fields']['text_align'] ) ) { unset( $h4_custom_heading[ $key ]['settings']['fields']['text_align'] ); } } } } } $params = array_merge( array( array( 'type' => 'textfield', 'heading' => __( 'Heading', 'js_composer' ), 'admin_label' => true, 'param_name' => 'h2', 'value' => __( 'Hey! I am first heading line feel free to change me', 'js_composer' ), 'description' => __( 'Enter text for heading line.', 'js_composer' ), 'edit_field_class' => 'vc_col-sm-9', ), array( 'type' => 'checkbox', 'heading' => __( 'Use custom font?', 'js_composer' ), 'param_name' => 'use_custom_fonts_h2', 'description' => __( 'Enable Google fonts.', 'js_composer' ), 'edit_field_class' => 'vc_col-sm-3', ), ), $h2_custom_heading, array( array( 'type' => 'textfield', 'heading' => __( 'Subheading', 'js_composer' ), 'param_name' => 'h4', 'value' => '', 'description' => __( 'Enter text for subheading line.', 'js_composer' ), 'edit_field_class' => 'vc_col-sm-9', ), array( 'type' => 'checkbox', 'heading' => __( 'Use custom font?', 'js_composer' ), 'param_name' => 'use_custom_fonts_h4', 'description' => __( 'Enable custom font option.', 'js_composer' ), 'edit_field_class' => 'vc_col-sm-3', ), ), $h4_custom_heading, array( array( 'type' => 'dropdown', 'heading' => __( 'Text alignment', 'js_composer' ), 'param_name' => 'txt_align', 'value' => getVcShared( 'text align' ), // default left 'description' => __( 'Select text alignment in "Call to Action" block.', 'js_composer' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Shape', 'js_composer' ), 'param_name' => 'shape', 'std' => 'rounded', 'value' => array( __( 'Square', 'js_composer' ) => 'square', __( 'Rounded', 'js_composer' ) => 'rounded', __( 'Round', 'js_composer' ) => 'round', ), 'description' => __( 'Select call to action shape.', 'js_composer' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Style', 'js_composer' ), 'param_name' => 'style', 'value' => array( __( 'Classic', 'js_composer' ) => 'classic', __( 'Flat', 'js_composer' ) => 'flat', __( 'Outline', 'js_composer' ) => 'outline', __( '3d', 'js_composer' ) => '3d', __( 'Custom', 'js_composer' ) => 'custom', ), 'std' => 'classic', 'description' => __( 'Select call to action display style.', 'js_composer' ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Background color', 'js_composer' ), 'param_name' => 'custom_background', 'description' => __( 'Select custom background color.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'custom' ), ), 'edit_field_class' => 'vc_col-sm-6', ), array( 'type' => 'colorpicker', 'heading' => __( 'Text color', 'js_composer' ), 'param_name' => 'custom_text', 'description' => __( 'Select custom text color.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'custom' ), ), 'edit_field_class' => 'vc_col-sm-6', ), array( 'type' => 'dropdown', 'heading' => __( 'Color', 'js_composer' ), 'param_name' => 'color', 'value' => array( __( 'Classic', 'js_composer' ) => 'classic' ) + getVcShared( 'colors-dashed' ), 'std' => 'classic', 'description' => __( 'Select color schema.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_cta3-colored-dropdown', 'dependency' => array( 'element' => 'style', 'value_not_equal_to' => array( 'custom' ), ), ), array( 'type' => 'textarea_html', 'heading' => __( 'Text', 'js_composer' ), 'param_name' => 'content', 'value' => __( 'I am promo text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'js_composer' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Width', 'js_composer' ), 'param_name' => 'el_width', 'value' => array( '100%' => '', '90%' => 'xl', '80%' => 'lg', '70%' => 'md', '60%' => 'sm', '50%' => 'xs', ), 'description' => __( 'Select call to action width (percentage).', 'js_composer' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Add button', 'js_composer' ) . '?', 'description' => __( 'Add button for call to action.', 'js_composer' ), 'param_name' => 'add_button', 'value' => array( __( 'No', 'js_composer' ) => '', __( 'Top', 'js_composer' ) => 'top', __( 'Bottom', 'js_composer' ) => 'bottom', __( 'Left', 'js_composer' ) => 'left', __( 'Right', 'js_composer' ) => 'right', ), ), ), vc_map_integrate_shortcode( 'vc_btn', 'btn_', __( 'Button', 'js_composer' ), array( 'exclude' => array( 'css' ), ), array( 'element' => 'add_button', 'not_empty' => true, ) ), array( array( 'type' => 'dropdown', 'heading' => __( 'Add icon?', 'js_composer' ), 'description' => __( 'Add icon for call to action.', 'js_composer' ), 'param_name' => 'add_icon', 'value' => array( __( 'No', 'js_composer' ) => '', __( 'Top', 'js_composer' ) => 'top', __( 'Bottom', 'js_composer' ) => 'bottom', __( 'Left', 'js_composer' ) => 'left', __( 'Right', 'js_composer' ) => 'right', ), ), array( 'type' => 'checkbox', 'param_name' => 'i_on_border', 'heading' => __( 'Place icon on border?', 'js_composer' ), 'description' => __( 'Display icon on call to action element border.', 'js_composer' ), 'group' => __( 'Icon', 'js_composer' ), 'dependency' => array( 'element' => 'add_icon', 'not_empty' => true, ), ), ), vc_map_integrate_shortcode( 'vc_icon', 'i_', __( 'Icon', 'js_composer' ), array( 'exclude' => array( 'align', 'css', ), ), array( 'element' => 'add_icon', 'not_empty' => true, ) ), array( /// cta3 vc_map_add_css_animation(), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'js_composer' ), 'param_name' => 'el_class', 'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ), ), array( 'type' => 'css_editor', 'heading' => __( 'CSS box', 'js_composer' ), 'param_name' => 'css', 'group' => __( 'Design Options', 'js_composer' ), ), ) ); return array( 'name' => __( 'Call to Action', 'js_composer' ), 'base' => 'vc_cta', 'icon' => 'icon-wpb-call-to-action', 'category' => array( __( 'Content', 'js_composer' ) ), 'description' => __( 'Catch visitors attention with CTA block', 'js_composer' ), 'since' => '4.5', 'params' => $params, 'js_view' => 'VcCallToActionView3', ); shortcode-vc-btn.php 0000666 00000026425 15214125514 0010453 0 ustar 00 '/^(type|icon_\w*)/', // we need only type, icon_fontawesome, icon_blabla..., NOT color and etc ), array( 'element' => 'add_icon', 'value' => 'true', ) ); // populate integrated vc_icons params. if ( is_array( $icons_params ) && ! empty( $icons_params ) ) { foreach ( $icons_params as $key => $param ) { if ( is_array( $param ) && ! empty( $param ) ) { if ( 'i_type' === $param['param_name'] ) { // append pixelicons to dropdown $icons_params[ $key ]['value'][ __( 'Pixel', 'js_composer' ) ] = 'pixelicons'; } if ( isset( $param['admin_label'] ) ) { // remove admin label unset( $icons_params[ $key ]['admin_label'] ); } } } } $params = array_merge( array( array( 'type' => 'textfield', 'heading' => __( 'Text', 'js_composer' ), 'param_name' => 'title', // fully compatible to btn1 and btn2 'value' => __( 'Text on the button', 'js_composer' ), ), array( 'type' => 'vc_link', 'heading' => __( 'URL (Link)', 'js_composer' ), 'param_name' => 'link', 'description' => __( 'Add link to button.', 'js_composer' ), // compatible with btn2 and converted from href{btn1} ), array( 'type' => 'dropdown', 'heading' => __( 'Style', 'js_composer' ), 'description' => __( 'Select button display style.', 'js_composer' ), 'param_name' => 'style', // partly compatible with btn2, need to be converted shape+style from btn2 and btn1 'value' => array( __( 'Modern', 'js_composer' ) => 'modern', __( 'Classic', 'js_composer' ) => 'classic', __( 'Flat', 'js_composer' ) => 'flat', __( 'Outline', 'js_composer' ) => 'outline', __( '3d', 'js_composer' ) => '3d', __( 'Custom', 'js_composer' ) => 'custom', __( 'Outline custom', 'js_composer' ) => 'outline-custom', __( 'Gradient', 'js_composer' ) => 'gradient', __( 'Gradient Custom', 'js_composer' ) => 'gradient-custom', ), ), array( 'type' => 'dropdown', 'heading' => __( 'Gradient Color 1', 'js_composer' ), 'param_name' => 'gradient_color_1', 'description' => __( 'Select first color for gradient.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => getVcShared( 'colors-dashed' ), 'std' => 'turquoise', 'dependency' => array( 'element' => 'style', 'value' => array( 'gradient' ), ), 'edit_field_class' => 'vc_col-sm-6', ), array( 'type' => 'dropdown', 'heading' => __( 'Gradient Color 2', 'js_composer' ), 'param_name' => 'gradient_color_2', 'description' => __( 'Select second color for gradient.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => getVcShared( 'colors-dashed' ), 'std' => 'blue', // must have default color grey 'dependency' => array( 'element' => 'style', 'value' => array( 'gradient' ), ), 'edit_field_class' => 'vc_col-sm-6', ), array( 'type' => 'colorpicker', 'heading' => __( 'Gradient Color 1', 'js_composer' ), 'param_name' => 'gradient_custom_color_1', 'description' => __( 'Select first color for gradient.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => '#dd3333', 'dependency' => array( 'element' => 'style', 'value' => array( 'gradient-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', ), array( 'type' => 'colorpicker', 'heading' => __( 'Gradient Color 2', 'js_composer' ), 'param_name' => 'gradient_custom_color_2', 'description' => __( 'Select second color for gradient.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => '#eeee22', 'dependency' => array( 'element' => 'style', 'value' => array( 'gradient-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', ), array( 'type' => 'colorpicker', 'heading' => __( 'Button Text Color', 'js_composer' ), 'param_name' => 'gradient_text_color', 'description' => __( 'Select button text color.', 'js_composer' ), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => '#ffffff', // must have default color grey 'dependency' => array( 'element' => 'style', 'value' => array( 'gradient-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', ), array( 'type' => 'colorpicker', 'heading' => __( 'Background', 'js_composer' ), 'param_name' => 'custom_background', 'description' => __( 'Select custom background color for your element.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'custom' ), ), 'edit_field_class' => 'vc_col-sm-6', 'std' => '#ededed', ), array( 'type' => 'colorpicker', 'heading' => __( 'Text', 'js_composer' ), 'param_name' => 'custom_text', 'description' => __( 'Select custom text color for your element.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'custom' ), ), 'edit_field_class' => 'vc_col-sm-6', 'std' => '#666', ), array( 'type' => 'colorpicker', 'heading' => __( 'Outline and Text', 'js_composer' ), 'param_name' => 'outline_custom_color', 'description' => __( 'Select outline and text color for your element.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'outline-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', 'std' => '#666', ), array( 'type' => 'colorpicker', 'heading' => __( 'Hover background', 'js_composer' ), 'param_name' => 'outline_custom_hover_background', 'description' => __( 'Select hover background color for your element.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'outline-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', 'std' => '#666', ), array( 'type' => 'colorpicker', 'heading' => __( 'Hover text', 'js_composer' ), 'param_name' => 'outline_custom_hover_text', 'description' => __( 'Select hover text color for your element.', 'js_composer' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'outline-custom' ), ), 'edit_field_class' => 'vc_col-sm-4', 'std' => '#fff', ), array( 'type' => 'dropdown', 'heading' => __( 'Shape', 'js_composer' ), 'description' => __( 'Select button shape.', 'js_composer' ), 'param_name' => 'shape', // need to be converted 'value' => array( __( 'Rounded', 'js_composer' ) => 'rounded', __( 'Square', 'js_composer' ) => 'square', __( 'Round', 'js_composer' ) => 'round', ), ), array( 'type' => 'dropdown', 'heading' => __( 'Color', 'js_composer' ), 'param_name' => 'color', 'description' => __( 'Select button color.', 'js_composer' ), // compatible with btn2, need to be converted from btn1 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => array( // Btn1 Colors __( 'Classic Grey', 'js_composer' ) => 'default', __( 'Classic Blue', 'js_composer' ) => 'primary', __( 'Classic Turquoise', 'js_composer' ) => 'info', __( 'Classic Green', 'js_composer' ) => 'success', __( 'Classic Orange', 'js_composer' ) => 'warning', __( 'Classic Red', 'js_composer' ) => 'danger', __( 'Classic Black', 'js_composer' ) => 'inverse', // + Btn2 Colors (default color set) ) + getVcShared( 'colors-dashed' ), 'std' => 'grey', // must have default color grey 'dependency' => array( 'element' => 'style', 'value_not_equal_to' => array( 'custom', 'outline-custom', 'gradient', 'gradient-custom', ), ), ), array( 'type' => 'dropdown', 'heading' => __( 'Size', 'js_composer' ), 'param_name' => 'size', 'description' => __( 'Select button display size.', 'js_composer' ), // compatible with btn2, default md, but need to be converted from btn1 to btn2 'std' => 'md', 'value' => getVcShared( 'sizes' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Alignment', 'js_composer' ), 'param_name' => 'align', 'description' => __( 'Select button alignment.', 'js_composer' ), // compatible with btn2, default left to be compatible with btn1 'value' => array( __( 'Inline', 'js_composer' ) => 'inline', // default as well __( 'Left', 'js_composer' ) => 'left', // default as well __( 'Right', 'js_composer' ) => 'right', __( 'Center', 'js_composer' ) => 'center', ), ), array( 'type' => 'checkbox', 'heading' => __( 'Set full width button?', 'js_composer' ), 'param_name' => 'button_block', 'dependency' => array( 'element' => 'align', 'value_not_equal_to' => 'inline', ), ), array( 'type' => 'checkbox', 'heading' => __( 'Add icon?', 'js_composer' ), 'param_name' => 'add_icon', ), array( 'type' => 'dropdown', 'heading' => __( 'Icon Alignment', 'js_composer' ), 'description' => __( 'Select icon alignment.', 'js_composer' ), 'param_name' => 'i_align', 'value' => array( __( 'Left', 'js_composer' ) => 'left', // default as well __( 'Right', 'js_composer' ) => 'right', ), 'dependency' => array( 'element' => 'add_icon', 'value' => 'true', ), ), ), $icons_params, array( array( 'type' => 'iconpicker', 'heading' => __( 'Icon', 'js_composer' ), 'param_name' => 'i_icon_pixelicons', 'value' => 'vc_pixel_icon vc_pixel_icon-alert', 'settings' => array( 'emptyIcon' => false, // default true, display an "EMPTY" icon? 'type' => 'pixelicons', 'source' => $pixel_icons, ), 'dependency' => array( 'element' => 'i_type', 'value' => 'pixelicons', ), 'description' => __( 'Select icon from library.', 'js_composer' ), ), ), array( vc_map_add_css_animation( true ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'js_composer' ), 'param_name' => 'el_class', 'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer' ), ), array( 'type' => 'checkbox', 'heading' => __( 'Advanced on click action', 'js_composer' ), 'param_name' => 'custom_onclick', 'description' => __( 'Insert inline onclick javascript action.', 'js_composer' ), ), array( 'type' => 'textfield', 'heading' => __( 'On click code', 'js_composer' ), 'param_name' => 'custom_onclick_code', 'description' => __( 'Enter onclick action code.', 'js_composer' ), 'dependency' => array( 'element' => 'custom_onclick', 'not_empty' => true, ), ), array( 'type' => 'css_editor', 'heading' => __( 'CSS box', 'js_composer' ), 'param_name' => 'css', 'group' => __( 'Design Options', 'js_composer' ), ), ) ); /** * @class WPBakeryShortCode_VC_Btn */ return array( 'name' => __( 'Button', 'js_composer' ), 'base' => 'vc_btn', 'icon' => 'icon-wpb-ui-button', 'category' => array( __( 'Content', 'js_composer' ), ), 'description' => __( 'Eye catching button', 'js_composer' ), 'params' => $params, 'js_view' => 'VcButton3View', 'custom_markup' => '{{title}}
', );