ultimate_videos.php000064400000136442150212230100010446 0ustar00get_video_id( $setting ) ); $url .= ( empty( $params ) ) ? '?' : '&'; $url .= 'autoplay=1'; if ( 'vimeo_video' == $setting['video_type'] && '' != $setting['vimeo_start_time'] ) { $time = gmdate( 'H\hi\ms\s', $setting['vimeo_start_time'] ); $url .= '#t=' . $time; } return $url; } /** * Returns Video Thumbnail Image. * * @param array $setting contents all the variable. */ public function get_video_thumb( $setting ) { $id = $this->get_video_id( $setting ); if ( '' == $this->get_video_id( $setting ) ) { return ''; } if ( 'custom' == $setting['thumbnail'] ) { $thumb = $setting['custom_thumb']; if ( '' !== $thumb ) { $img = apply_filters( 'ult_get_img_single', $thumb, 'url' ); $img_info = esc_url( apply_filters( 'ultimate_images', $img ) ); return $img_info; } } else { if ( 'uv_iframe' == $setting['video_type'] ) { $thumb = 'https://i.ytimg.com/vi/' . $id . '/' . apply_filters( 'ultv_video_youtube_image_quality', $setting['default_thumb'] ) . '.jpg'; } else { $vimeo = maybe_unserialize( file_get_contents( "https://vimeo.com/api/v2/video/$id.php" ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $thumb = str_replace( '_640', '_840', $vimeo[0]['thumbnail_large'] ); } } return $thumb; } /** * Get embed params. Retrieve video widget embed parameters. * * @param array $setting contents all the variable. */ public function get_embed_params( $setting ) { $params = array(); if ( 'uv_iframe' === $setting['video_type'] ) { $youtube_options = array( 'autoplay', 'rel', 'controls', 'mute', 'modestbranding' ); foreach ( $youtube_options as $option ) { if ( 'autoplay' == $option ) { if ( 'on' === $setting['yt_autoplay'] ) { $params[ $option ] = '1'; } continue; } if ( 'rel' == $option ) { $value = ( 'on' === $setting['yt_sugg_video'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'controls' == $option ) { $value = ( 'on' === $setting['yt_play_control'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'mute' == $option ) { $value = ( 'on' === $setting['yt_mute_control'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'modestbranding' == $option ) { $value = ( 'on' === $setting['yt_modest_branding'] ) ? '1' : '0'; $params[ $option ] = $value; } $params['start'] = $setting['yt_start_time']; $params['end'] = $setting['yt_stop_time']; } } if ( 'vimeo_video' === $setting['video_type'] ) { $vimeo_options = array( 'autoplay', 'loop', 'title', 'portrait', 'byline' ); foreach ( $vimeo_options as $option ) { if ( 'autoplay' == $option ) { if ( 'on' === $setting['vimeo_autoplay'] ) { $params[ $option ] = '1'; } continue; } if ( 'loop' === $option ) { $value = ( 'on' === $setting['vimeo_loop'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'title' === $option ) { $value = ( 'on' === $setting['vimeo_intro_title'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'portrait' === $option ) { $value = ( 'on' === $setting['vimeo_intro_portrait'] ) ? '1' : '0'; $params[ $option ] = $value; } if ( 'byline' === $option ) { $value = ( 'on' === $setting['vimeo_intro_byline'] ) ? '1' : '0'; $params[ $option ] = $value; } } $params['color'] = str_replace( '#', '', $setting['vimeo_control_color'] ); $params['autopause'] = '0'; } return $params; } /** * Returns Vimeo Headers. * * @param array $setting contents all the variable. */ public function get_header_wrap( $setting ) { if ( 'vimeo_video' != $setting['video_type'] ) { return; } $id = $this->get_video_id( $setting ); $html = ''; if ( isset( $id ) && '' != $id ) { $vimeo = maybe_unserialize( file_get_contents( "https://vimeo.com/api/v2/video/$id.php" ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents if ( 'on' == $setting['vimeo_intro_portrait'] || 'on' == $setting['vimeo_intro_title'] || 'on' == $setting['vimeo_intro_byline'] ) { $html = '
'; if ( 'on' == $setting['vimeo_intro_portrait'] ) { $html .= '
'; } if ( 'on' == $setting['vimeo_intro_title'] || 'on' == $setting['vimeo_intro_byline'] ) { $html .= '
'; if ( 'on' == $setting['vimeo_intro_title'] ) { $html .= ''; } if ( 'on' == $setting['vimeo_intro_byline'] ) { $html .= ''; } $html .= '
'; } $html .= '
'; } } return $html; } /** * Render the video * * @param array $setting contents all the variable. * @param array $uid Id of the video. */ public function get_video_embed( $setting, $uid ) { $id = $this->get_video_id( $setting ); $embed_param = $this->get_embed_params( $setting ); $src = $this->get_url( $setting, $embed_param ); $main_video_style_inline = ''; $main_video_responsive = ''; $html = ''; $style = ''; $hover_color = ''; $device = ( false !== ( stripos( $_SERVER['HTTP_USER_AGENT'], 'iPhone' ) ) ? 'true' : 'false' ); if ( 'uv_iframe' == $setting['video_type'] ) { $autoplay = ( 'on' == $setting['yt_autoplay'] ) ? '1' : '0'; } else { $autoplay = ( 'on' == $setting['vimeo_autoplay'] ) ? '1' : '0'; } if ( 'defaulticon' == $setting['play_source'] ) { $setting['play_size'] = 'width:' . $setting['play_size'] . 'px'; if ( 'uv_iframe' === $setting['video_type'] ) { $html = ''; } if ( 'vimeo_video' === $setting['video_type'] ) { $html = ''; } } elseif ( 'icon' == $setting['play_source'] ) { $setting['play_size'] = 'font-size:' . $setting['play_size'] . 'px;'; } else { $thumb = $setting['play_image']; $imag = apply_filters( 'ult_get_img_single', $thumb, 'url' ); $html = esc_url( apply_filters( 'ultimate_images', $imag ) ); } if ( 'image' == $setting['play_source'] ) { $setting['play_size'] = 'width:' . $setting['play_size'] . 'px'; } /* padding */ if ( '' != $setting['padding'] ) { $style = $setting['padding']; } /* ---- main heading styles ---- */ if ( '' != $setting['main_video_font_family'] ) { $mvfont_family = get_ultimate_font_family( $setting['main_video_font_family'] ); if ( $mvfont_family ) { $main_video_style_inline .= 'font-family:\'' . $mvfont_family . '\';'; } } // main video font style. $main_video_style_inline .= get_ultimate_font_style( $setting['main_video_style'] ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $setting['main_video_font_size'] ) ) { $setting['main_video_font_size'] = 'desktop:' . $setting['main_video_font_size'] . 'px;'; } if ( is_numeric( $setting['main_video_line_height'] ) ) { $setting['main_video_line_height'] = 'desktop:' . $setting['main_video_line_height'] . 'px;'; } // responsive {main} video styles. $args = array( 'target' => '.ult-video.' . $uid . ' .ultv-subscribe-bar', 'media_sizes' => array( 'font-size' => $setting['main_video_font_size'], 'line-height' => $setting['main_video_line_height'], ), ); $main_video_responsive = get_ultimate_vc_responsive_media_css( $args ); if ( '' != $setting['icon_hover_color'] ) { $hover_color = 'data-hoverbg=' . esc_attr( $setting['icon_hover_color'] ) . ' ';} if ( '' != $setting['default_hover_color'] ) { $hover_color .= 'data-defaulthoverbg=' . esc_attr( $setting['default_hover_color'] ) . ' ';} $output = '
'; $output .= $this->get_header_wrap( $setting ); $output .= '
'; if ( 'image' == $setting['play_source'] ) { $output .= ''; } if ( 'defaulticon' == $setting['play_source'] ) { $output .= $html; } $output .= '
'; if ( 'uv_iframe' == $setting['video_type'] && 'on' == $setting['enable_sub_bar'] ) { $channel_name = ( '' != $setting['yt_channel_name'] ) ? $setting['yt_channel_name'] : ''; $channel_id = ( '' != $setting['yt_channel_id'] ) ? $setting['yt_channel_id'] : ''; $youtube_text = ( '' != $setting['yt_channel_text'] ) ? $setting['yt_channel_text'] : ''; $subscriber_count = ( 'on' == $setting['show_sub_count'] ) ? 'default' : 'hidden'; if ( '' != $setting['yt_text_color'] ) { $yt_txt = 'color:' . $setting['yt_text_color'] . ';'; } if ( '' != $setting['yt_background_color'] ) { $yt_txt_back = 'background-color:' . $setting['yt_background_color'] . ';'; } $output .= '
' . esc_attr( $youtube_text ) . '
';// phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript if ( 'channel_name' == $setting['chanel_id_name'] ) { $output .= '
'; } elseif ( 'channel_id' == $setting['chanel_id_name'] ) { $output .= '
'; } $output .= '
'; } $output .= '
'; return $output; } /** * Function that initializes settings of Ultimate Heading Module. * * @method ultimate_videos_module_init */ public function ultimate_videos_module_init() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Video', 'ultimate_vc' ), 'base' => 'ultimate_video', 'class' => 'vc_ultimate_video', 'icon' => 'vc_ultimate_video', 'category' => 'Ultimate VC Addons', 'description' => __( 'Embed video without sacrificing Page speed.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'ult_param_heading', 'text' => __( 'Video', 'ultimate_vc' ), 'param_name' => 'video_setting', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'admin_label' => true, 'heading' => __( 'Video Type', 'ultimate_vc' ), 'param_name' => 'video_type', 'value' => array( __( 'YouTube Video', 'ultimate_vc' ) => 'uv_iframe', __( 'Vimeo Video', 'ultimate_vc' ) => 'vimeo_video', ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Enter YouTube URL of the Video', 'ultimate_vc' ), 'param_name' => 'u_video_url', 'value' => 'https://www.youtube.com/watch?v=HJRzUQMhJMQ', 'description' => __( 'Make sure you add the actual URL of the video and not the share URL.
Valid : https://www.youtube.com/watch?v=HJRzUQMhJMQ
Invalid : https://youtu.be/HJRzUQMhJMQ ', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Start Time', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'yt_start_time', 'value' => '', 'suffix' => 'seconds', 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Stop Time', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'yt_stop_time', 'value' => '', 'suffix' => 'seconds', 'description' => __( 'You may start / stop the video at any point you would like.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Enter Vimeo URL of the Video', 'ultimate_vc' ), 'param_name' => 'vimeo_video_url', 'value' => 'https://vimeo.com/274860274', 'description' => __( 'Make sure you add the actual URL of the video and not the share URL.
Valid : https://vimeo.com/274860274
Invalid : https://vimeo.com/channels/staffpicks/274860274 ', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Start Time', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'vimeo_start_time', 'value' => '', 'suffix' => 'seconds', 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Aspect Ratio', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'aspect_ratio', 'value' => array( __( '16:9', 'ultimate_vc' ) => '16_9', __( '4:3', 'ultimate_vc' ) => '4_3', __( '3:2', 'ultimate_vc' ) => '3_2', ), ), array( 'type' => 'ult_param_heading', 'text' => __( 'Video Option', 'ultimate_vc' ), 'param_name' => 'video_option', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Autoplay', 'ultimate_vc' ), 'param_name' => 'yt_autoplay', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'If autoplay mode is enabled then thumbnail option will never show.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Suggested Video', 'ultimate_vc' ), 'param_name' => 'yt_sugg_video', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Show', 'ultimate_vc' ), 'off' => __( 'Hide', 'ultimate_vc' ), ), ), 'description' => __( 'If set to hide - the player will display related videos from the same channel as the video that was just played.
If set to show - the player will display the related videos from the random channels.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Player Control', 'ultimate_vc' ), 'param_name' => 'yt_play_control', 'value' => 'on', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Show', 'ultimate_vc' ), 'off' => __( 'Hide', 'ultimate_vc' ), ), ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Mute', 'ultimate_vc' ), 'param_name' => 'yt_mute_control', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Modest Branding', 'ultimate_vc' ), 'param_name' => 'yt_modest_branding', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'This option lets you use a YouTube player that does not show a YouTube logo.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Privacy Mode', 'ultimate_vc' ), 'param_name' => 'yt_privacy_mode', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( "When you turn on privacy mode, YouTube won't store information about visitors on your website unless they play the video.", 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Autoplay', 'ultimate_vc' ), 'param_name' => 'vimeo_autoplay', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'If autoplay mode is enabled then thumbnail option will never show.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Loop', 'ultimate_vc' ), 'param_name' => 'vimeo_loop', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'Play the video again when it reaches the end, infinitely.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Intro Title', 'ultimate_vc' ), 'param_name' => 'vimeo_intro_title', 'value' => 'on', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Show', 'ultimate_vc' ), 'off' => __( 'Hide', 'ultimate_vc' ), ), ), 'description' => __( 'Show the video’s title.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Intro Portrait', 'ultimate_vc' ), 'param_name' => 'vimeo_intro_portrait', 'value' => 'on', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Show', 'ultimate_vc' ), 'off' => __( 'Hide', 'ultimate_vc' ), ), ), 'description' => __( 'Show the author’s profile image (portrait).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Intro Byline', 'ultimate_vc' ), 'param_name' => 'vimeo_intro_byline', 'value' => 'on', 'options' => array( 'on' => array( 'label' => '', 'on' => __( 'Show', 'ultimate_vc' ), 'off' => __( 'Hide', 'ultimate_vc' ), ), ), 'description' => __( 'Show the author of the video.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Controls Color', 'ultimate_vc' ), 'param_name' => 'vimeo_control_color', 'dependency' => array( 'element' => 'video_type', 'value' => array( 'vimeo_video' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => __( 'Thumbnail & Overlay ', 'ultimate_vc' ), 'param_name' => 'thum_over', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Thumbnail', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Thumbnail', 'ultimate_vc' ), 'param_name' => 'thumbnail', 'value' => array( __( 'Default Thumbnail', 'ultimate_vc' ) => 'default', __( 'Custom Thumbnail', 'ultimate_vc' ) => 'custom', ), 'group' => 'Thumbnail', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Select Custom Thumbnail', 'ultimate_vc' ), 'param_name' => 'custom_thumb', 'value' => '', 'dependency' => array( 'element' => 'thumbnail', 'value' => array( 'custom' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Default Thumbnail Size', 'ultimate_vc' ), 'param_name' => 'default_thumb', 'value' => array( __( 'Maximum Resolution', 'ultimate_vc' ) => 'maxresdefault', __( 'High Quality', 'ultimate_vc' ) => 'hqdefault', __( 'Medium Quality', 'ultimate_vc' ) => 'mqdefault', __( 'Standard Quality', 'ultimate_vc' ) => 'sddefault', ), 'dependency' => array( 'element' => 'thumbnail', 'value' => array( 'default' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Overlay Color', 'ultimate_vc' ), 'param_name' => 'overlay_color', 'group' => 'Thumbnail', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Play Button ', 'ultimate_vc' ), 'param_name' => 'playb', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Thumbnail', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Image/Icon', 'ultimate_vc' ), 'param_name' => 'play_source', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'defaulticon', __( 'Image', 'ultimate_vc' ) => 'image', __( 'Icon', 'ultimate_vc' ) => 'icon', ), 'group' => 'Thumbnail', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Select Image', 'ultimate_vc' ), 'param_name' => 'play_image', 'value' => '', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'image' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'play_icon', 'value' => '', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'icon' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size', 'ultimate_vc' ), 'param_name' => 'play_size', 'value' => 75, 'min' => 12, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'group' => 'Thumbnail', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'value' => '3A3A3A', 'param_name' => 'icon_color', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'icon' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Hover Color', 'ultimate_vc' ), 'param_name' => 'icon_hover_color', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'icon' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'value' => '#1f1f1e', 'param_name' => 'default_color', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'defaulticon' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Hover Color', 'ultimate_vc' ), 'param_name' => 'default_hover_color', 'dependency' => array( 'element' => 'play_source', 'value' => array( 'defaulticon' ), ), 'group' => 'Thumbnail', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Animation', 'ultimate_vc' ), 'param_name' => 'hover_animation', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Float', 'ultimate_vc' ) => 'float', __( 'Sink', 'ultimate_vc' ) => 'sink', __( 'Wobble Vertical', 'ultimate_vc' ) => 'wobble-vertical', ), 'group' => 'Thumbnail', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Youtube Subscribe Bar', 'ultimate_vc' ), 'param_name' => 'yt_sb_bar', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Enable Subscribe Bar', 'ultimate_vc' ), 'param_name' => 'enable_sub_bar', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'off' => __( 'No', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), ), ), 'dependency' => array( 'element' => 'video_type', 'value' => array( 'uv_iframe' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Channel ID/Channel Name', 'ultimate_vc' ), 'param_name' => 'chanel_id_name', 'value' => array( __( 'Channel Name', 'ultimate_vc' ) => 'channel_name', __( 'Channel ID', 'ultimate_vc' ) => 'channel_id', ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'YouTube Channel Name', 'ultimate_vc' ), 'param_name' => 'yt_channel_name', 'value' => 'TheBrainstormForce', 'description' => __( 'Click' ) . " " . __( 'here', 'ultimate_vc' ) . '' . __( ' to find your YouTube Channel Name.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'chanel_id_name', 'value' => array( 'channel_name' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'YouTube Channel ID', 'ultimate_vc' ), 'param_name' => 'yt_channel_id', 'value' => 'UCtFCcrvupjyaq2lax_7OQQg', 'description' => __( 'Click' ) . " " . __( 'here', 'ultimate_vc' ) . '' . __( ' to find your YouTube Channel ID.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'chanel_id_name', 'value' => array( 'channel_id' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Subscribe to Channel Text', 'ultimate_vc' ), 'param_name' => 'yt_channel_text', 'value' => 'Subscribe to our YouTube Channel', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Settings', 'ultimate_vc' ), 'param_name' => 'yt_sb_setting', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Show Subscribe count', 'ultimate_vc' ), 'param_name' => 'show_sub_count', 'value' => 'off', 'options' => array( 'on' => array( 'label' => '', 'off' => __( 'No', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), ), ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'yt_text_color', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'yt_background_color', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'main_video_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'main_video_style', 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'main_video_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'main_video_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Stack on', 'ultimate_vc' ), 'param_name' => 'subscribe_bar_responsive', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Desktop', 'ultimate_vc' ) => 'desktop', __( 'Tablet', 'ultimate_vc' ) => 'tablet', __( 'Mobile', 'ultimate_vc' ) => 'mobile', ), 'dependency' => array( 'element' => 'enable_sub_bar', 'value' => array( 'on' ), ), 'group' => 'Youtube Subscribe Bar', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_video_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } }//end ultimate_videos_module_init() /** * Render function for Ultimate Heading Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_videos_module_shortcode( $atts, $content = null ) { $output = ''; $html = ''; $thumb = ''; $video_design_style_css = ''; $setting = shortcode_atts( array( 'u_video_url' => 'https://www.youtube.com/watch?v=HJRzUQMhJMQ', 'video_type' => 'uv_iframe', 'vimeo_video_url' => 'https://vimeo.com/274860274', 'thumbnail' => '', 'custom_thumb' => '', 'default_thumb' => 'maxresdefault', 'yt_autoplay' => '', 'yt_sugg_video' => '', 'yt_play_control' => 'on', 'yt_mute_control' => '', 'yt_modest_branding' => '', 'yt_privacy_mode' => '', 'yt_start_time' => '', 'yt_stop_time' => '', 'vimeo_autoplay' => '', 'vimeo_loop' => '', 'vimeo_intro_title' => 'on', 'vimeo_intro_portrait' => 'on', 'vimeo_intro_byline' => 'on', 'vimeo_start_time' => '', 'play_source' => 'defaulticon', 'aspect_ratio' => '16_9', 'play_icon' => '', 'hover_animation' => 'none', 'play_image' => '', 'play_size' => '75', 'vimeo_control_color' => '', 'overlay_color' => '', 'icon_color' => '#3A3A3A', 'icon_hover_color' => '', 'default_color' => '#1f1f1e', 'default_hover_color' => '', 'enable_sub_bar' => 'off', 'chanel_id_name' => 'channel_name', 'yt_channel_name' => 'TheBrainstormForce', 'yt_channel_id' => 'UCtFCcrvupjyaq2lax_7OQQg', 'yt_channel_text' => 'Subscribe to our YouTube Channel', 'show_sub_count' => '', 'yt_text_color' => '#fff', 'yt_background_color' => '#1b1b1b', 'main_video_font_family' => '', 'main_video_style' => '', 'main_video_font_size' => '', 'main_video_line_height' => '', 'el_class' => '', 'padding' => '', 'subscribe_bar_responsive' => 'none', 'css_video_design' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; if ( '' == $setting['u_video_url'] && 'uv_iframe' == $setting['video_type'] ) { return ''; } if ( '' == $setting['vimeo_video_url'] && 'vimeo_video' == $setting['video_type'] ) { return ''; } $video_design_style_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $setting['css_video_design'], ' ' ), 'ultimate_videos', $atts ); $video_design_style_css = esc_attr( $video_design_style_css ); $micro = wp_rand( 0000, 9999 ); $id = uniqid( 'ultimate-video-' . $micro ); $uid = 'ultv-' . wp_rand( 0000, 9999 ); $output = '
'; $output .= $this->get_video_embed( $setting, $uid ); $output .= '
'; return $output; }//end ultimate_videos_module_shortcode() }//end class new Ultimate_Videos(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Video' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Video extends WPBakeryShortCode { } } } ultimate_animation.php000064400000021251150212230100011123 0ustar00 'none', 'opacity' => 'set', 'opacity_start_effect' => '', 'animation_duration' => '3', 'animation_delay' => '0', 'animation_iteration_count' => '1', 'inline_disp' => '', 'css' => '', 'el_class' => '', ), $atts ); $style = ''; $infi = ''; $mobile_opt = ''; $css_class = ''; $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_ua_settings['css'], ' ' ), 'ult_createlink', $atts ); $css_class = esc_attr( $css_class ); $ultimate_animation = get_option( 'ultimate_animation' ); if ( 'disable' == $ultimate_animation ) { $mobile_opt = 'ult-no-mobile'; } if ( '' !== $ult_ua_settings['inline_disp'] ) { $style .= 'display:inline-block;'; } if ( 'set' == $ult_ua_settings['opacity'] ) { $style .= 'opacity:0;'; $ult_ua_settings['el_class'] .= ' ult-animate-viewport '; $opacity_start_effect_data = 'data-opacity_start_effect="' . esc_attr( $ult_ua_settings['opacity_start_effect'] ) . '"'; } $inifinite_arr = array( 'InfiniteRotate', 'InfiniteDangle', 'InfiniteSwing', 'InfinitePulse', 'InfiniteHorizontalShake', 'InfiniteBounce', 'InfiniteFlash', 'InfiniteTADA' ); if ( 0 == $ult_ua_settings['animation_iteration_count'] || in_array( $ult_ua_settings['animation'], $inifinite_arr, true ) ) { $ult_ua_settings['animation_iteration_count'] = 'infinite'; $ult_ua_settings['animation'] = 'infinite ' . $ult_ua_settings['animation']; } $output .= '
'; $output .= do_shortcode( $content ); $output .= '
'; return $output; } /* end animate_shortcode()*/ /** * For vc map check * * @since ---- * @access public */ public function animate_shortcode_mapper() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Animation Block', 'ultimate_vc' ), 'base' => 'ult_animation_block', 'icon' => 'animation_block', 'class' => 'animation_block', 'as_parent' => array( 'except' => 'ult_animation_block' ), 'content_element' => true, 'controls' => 'full', 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'description' => __( 'Apply animations everywhere.', 'ultimate_vc' ), 'params' => array( // add params same as with any other content element. array( 'type' => 'animator', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'animation', 'value' => '', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Duration', 'ultimate_vc' ), 'param_name' => 'animation_duration', 'value' => 3, 'min' => 1, 'max' => 100, 'suffix' => 's', 'description' => __( 'How long the animation effect should last. Decides the speed of effect.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Delay', 'ultimate_vc' ), 'param_name' => 'animation_delay', 'value' => 0, 'min' => 1, 'max' => 100, 'suffix' => 's', 'description' => __( 'Delays the animation effect for seconds you enter above.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Repeat Count', 'ultimate_vc' ), 'param_name' => 'animation_iteration_count', 'value' => 1, 'min' => 0, 'max' => 100, 'suffix' => '', 'description' => __( 'The animation effect will repeat to the count you enter above. Enter 0 if you want to repeat it infinitely.', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Hide Elements Until Delay', 'ultimate_vc' ), 'param_name' => 'opacity', 'admin_label' => true, 'value' => 'set', 'default_set' => true, 'options' => array( 'set' => array( 'label' => __( 'If set to yes, the elements inside block will stay hidden until animation starts (depends on delay settings above).', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Viewport Position', 'ultimate_vc' ), 'param_name' => 'opacity_start_effect', 'suffix' => '%', 'value' => '90', 'description' => __( 'The area of screen from top where animation effects will start working.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), 'js_view' => 'VcColumnView', ) );/* end vc_map*/ } /* end vc_map check*/ }//end animate_shortcode_mapper() } // Instantiate the class. new Ultimate_Animation(); if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ult_Animation_Block' ) ) { /** * Function that initializes Ultimate Animation Module * * @class WPBakeryShortCode_Ult_Animation_Block */ class WPBakeryShortCode_Ult_Animation_Block extends WPBakeryShortCodesContainer { } } } ultimate_icons.php000064400000047363150212230100010273 0ustar00 __( 'Icons', 'ultimate_vc' ), 'base' => 'ultimate_icons', 'class' => 'ultimate_icons', 'icon' => 'ultimate_icons', 'category' => 'Ultimate VC Addons', 'description' => __( 'Add a set of multiple icons and give some custom style.', 'ultimate_vc' ), 'as_parent' => array( 'only' => 'single_icon' ), // Use only|except attributes to limit child shortcodes (separate multiple values with comma). 'content_element' => true, 'show_settings_on_create' => true, 'js_view' => 'VcColumnView', 'params' => array( // Play with icon selector. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'align', 'value' => array( __( 'Left Align', 'ultimate_vc' ) => 'uavc-icons-left', __( 'Right Align', 'ultimate_vc' ) => 'uavc-icons-right', __( 'Center Align', 'ultimate_vc' ) => 'uavc-icons-center', ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_icon', 'group' => __( 'Design', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); vc_map( array( 'name' => __( 'Icon Item' ), 'base' => 'single_icon', 'class' => 'vc_simple_icon', 'icon' => 'vc_just_icon', 'category' => __( 'Ultimate VC Addons', 'ultimate_vc' ), 'description' => __( 'Add a set of multiple icons and give some custom style.', 'ultimate_vc' ), 'as_child' => array( 'only' => 'ultimate_icons' ), // Use only|except attributes to limit child shortcodes (separate multiple values with comma). 'show_settings_on_create' => true, 'is_container' => false, 'params' => array( // Play with icon selector. array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'admin_label' => true, 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Select Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'group' => 'Select Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Space after Icon', 'ultimate_vc' ), 'param_name' => 'icon_margin', 'value' => 5, 'min' => 0, 'max' => 100, 'suffix' => 'px', 'description' => __( 'How much distance would you like in two icons?', 'ultimate_vc' ), 'group' => 'Other Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'group' => 'Select Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'group' => 'Select Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Select Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Select Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Select Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Select Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Select Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Select Icon', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'icon_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), 'group' => 'Other Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), 'group' => 'Other Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Tooltip', 'ultimate_vc' ), 'param_name' => 'tooltip_disp', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Tooltip from Left', 'ultimate_vc' ) => 'left', __( 'Tooltip from Right', 'ultimate_vc' ) => 'right', __( 'Tooltip from Top', 'ultimate_vc' ) => 'top', __( 'Tooltip from Bottom', 'ultimate_vc' ) => 'bottom', ), 'description' => __( 'Select the tooltip position', 'ultimate_vc' ), 'group' => 'Other Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Tooltip Text', 'ultimate_vc' ), 'param_name' => 'tooltip_text', 'value' => '', 'description' => __( 'Enter your tooltip text here.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'tooltip_disp', 'not_empty' => true, ), 'group' => 'Other Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), 'group' => 'Select Icon', ), ), ) ); } } /** * Render function for Icons Block Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_icons_shortcode( $atts, $content = null ) { $ult_icons_setting = shortcode_atts( array( 'align' => '', 'el_class' => '', 'css_icon' => '', ), $atts ); $icon_design_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_icons_setting['css_icon'], ' ' ), 'ultimate_icons', $atts ); $output = '
'; $output .= do_shortcode( $content ); $output .= '
'; return $output; } /** * Render function for Single Icon shortcode Module. * * @param array $atts represts module attribuits. * @access public */ public function single_icon_shortcode( $atts ) { $icon_type = ''; $icon_img = ''; $img_width = ''; $target = ''; $link_title = ''; $rel = ''; $ult_icons_settings = shortcode_atts( array( 'icon' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_margin' => '', 'icon_animation' => '', 'tooltip_disp' => '', 'tooltip_text' => '', 'el_class' => '', ), $atts ); $ultimate_js = get_option( 'ultimate_js' ); if ( isset( $ult_icons_settings['tooltip_disp'] ) && '' != $ult_icons_settings['tooltip_disp'] && 'enable' != $ultimate_js ) { wp_enqueue_script( 'ultimate-tooltip' ); } if ( 'none' !== $ult_icons_settings['icon_animation'] ) { $css_trans = 'data-animation="' . esc_attr( $ult_icons_settings['icon_animation'] ) . '" data-animation-delay="03"'; } $output = ''; $style = ''; $link_sufix = ''; $link_prefix = ''; $target = ''; $href = ''; $icon_align_style = ''; $uniqid = uniqid(); $href = vc_build_link( $ult_icons_settings['icon_link'] ); if ( '' !== $ult_icons_settings['icon_link'] ) { if ( null != $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix .= ''; $link_sufix .= ''; } } if ( '' !== $ult_icons_settings['tooltip_disp'] && null == $href['url'] ) { $link_prefix .= ''; $link_sufix .= ''; } if ( '' !== $ult_icons_settings['icon_color'] ) { $style .= 'color:' . $ult_icons_settings['icon_color'] . ';'; } if ( 'none' !== $ult_icons_settings['icon_style'] ) { if ( '' !== $ult_icons_settings['icon_color_bg'] ) { $style .= 'background:' . $ult_icons_settings['icon_color_bg'] . ';'; } } if ( 'advanced' == $ult_icons_settings['icon_style'] ) { $style .= 'border-style:' . $ult_icons_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $ult_icons_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $ult_icons_settings['icon_border_size'] . 'px;'; $style .= 'width:' . $ult_icons_settings['icon_border_spacing'] . 'px;'; $style .= 'height:' . $ult_icons_settings['icon_border_spacing'] . 'px;'; $style .= 'line-height:' . $ult_icons_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $ult_icons_settings['icon_border_radius'] . 'px;'; } if ( '' !== $ult_icons_settings['icon_size'] ) { $style .= 'font-size:' . $ult_icons_settings['icon_size'] . 'px;'; } if ( '' !== $ult_icons_settings['icon_margin'] ) { $style .= 'margin-right:' . $ult_icons_settings['icon_margin'] . 'px;'; } if ( '' !== $ult_icons_settings['icon'] ) { $output .= "\n" . $link_prefix . '
'; $output .= "\n\t" . ''; $output .= "\n" . '
' . $link_sufix; } if ( '' !== $ult_icons_settings['tooltip_disp'] ) { $output .= ''; } return $output; } } } if ( class_exists( 'Ultimate_Icons' ) ) { $ultimate_icons = new Ultimate_Icons(); } // Extend WPBakeryShortCodesContainer class to inherit all required functionality. if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Icons' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Icons extends WPBakeryShortCodesContainer { } } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Single_Icon' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Single_Icon extends WPBakeryShortCode { } } ultimate_image_separator.php000064400000037213150212230100012313 0ustar00 __( 'Image Separator', 'ultimate_vc' ), 'base' => 'ultimate_img_separator', 'class' => 'vc_img_separator_icon', 'icon' => 'vc_icon_img_separator', 'category' => 'Ultimate VC Addons', 'description' => __( 'Add image as row seperator', 'ultimate_vc' ), 'params' => array( array( 'type' => 'ult_img_single', 'heading' => __( 'Image', 'ultimate_vc' ), 'param_name' => 'img_separator', ), array( 'type' => 'animator', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'animation', 'value' => '', 'group' => 'Animation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Duration', 'ultimate_vc' ), 'param_name' => 'animation_duration', 'value' => 3, 'min' => 1, 'max' => 100, 'suffix' => 's', 'description' => __( 'How long the animation effect should last. Decides the speed of effect.', 'ultimate_vc' ), 'group' => 'Animation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Delay', 'ultimate_vc' ), 'param_name' => 'animation_delay', 'value' => 0, 'min' => 1, 'max' => 100, 'suffix' => 's', 'description' => __( 'Delays the animation effect for seconds you enter above.', 'ultimate_vc' ), 'group' => 'Animation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Repeat Count', 'ultimate_vc' ), 'param_name' => 'animation_iteration_count', 'value' => 1, 'min' => 0, 'max' => 100, 'suffix' => '', 'description' => __( 'The animation effect will repeat to the count you enter above. Enter 0 if you want to repeat it infinitely.', 'ultimate_vc' ), 'group' => 'Animation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Viewport Position', 'ultimate_vc' ), 'param_name' => 'opacity_start_effect', 'suffix' => '%', 'value' => '90', 'description' => __( 'The area of screen from top where animation effects will start working.', 'ultimate_vc' ), 'group' => 'Animation', ), array( 'type' => 'ultimate_responsive', 'heading' => __( 'Image Size (px)', 'ultimate_vc' ), 'unit' => 'px', 'media' => array( 'Desktop' => '', // Here '28' is default value set for 'Desktop'. 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'param_name' => 'img_separator_width', ), array( 'type' => 'dropdown', 'heading' => __( 'Image Position', 'ultimate_vc' ), 'param_name' => 'img_separator_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => 'ult-top-easy-separator', __( 'Bottom', 'ultimate_vc' ) => 'ult-bottom-easy-separator', ), ), array( 'type' => 'number', 'heading' => __( 'Gutter', 'ultimate_vc' ), 'param_name' => 'img_separator_gutter', 'suffix' => '%', 'description' => __( '50% is default. Increase to push the image outside or decrease to pull the image inside.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Image Alignment', 'ultimate_vc' ), 'param_name' => 'img_separator_alignment', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'ult-center-img', __( 'Left', 'ultimate_vc' ) => 'ult-left-img', __( 'Right', 'ultimate_vc' ) => 'ult-right-img', ), ), array( 'type' => 'number', 'heading' => __( 'Image Position from Left', 'ultimate_vc' ), 'param_name' => 'img_position_left', 'suffix' => '%', 'dependency' => array( 'element' => 'img_separator_alignment', 'value' => array( 'ult-left-img' ), ), ), array( 'type' => 'number', 'heading' => __( 'Image Position from right', 'ultimate_vc' ), 'param_name' => 'img_position_right', 'suffix' => '%', 'dependency' => array( 'element' => 'img_separator_alignment', 'value' => array( 'ult-right-img' ), ), ), array( 'type' => 'vc_link', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'sep_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), ), ), ) ); } } /** * Render function for Image Separator Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_img_separator_shortcode( $atts, $content ) { $output = ''; $wrapper_class = ''; $custom_position = ''; $opacity_start_effect_data = ''; $animation_style = ''; $animation_el_class = ''; $animation_data = ''; $href = ''; $url = ''; $link_title = ''; $target = ''; $target = ''; $link_title = ''; $rel = ''; $is_animation = false; $ult_imgs_settings = shortcode_atts( array( 'img_separator' => '', 'animation' => '', 'img_separator_width' => '', 'img_separator_position' => 'ult-top-easy-separator', 'img_separator_alignment' => 'ult-center-img', 'img_separator_gutter' => '', 'img_position_left' => '', 'img_position_right' => '', 'opacity' => 'set', 'opacity_start_effect' => '', 'animation_duration' => '', 'animation_delay' => '', 'animation_iteration_count' => '', 'sep_link' => '', ), $atts ); $ultimate_custom_vc_row = get_option( 'ultimate_custom_vc_row' ); if ( '' == $ultimate_custom_vc_row ) { $ultimate_custom_vc_row = 'wpb_row'; } $img = apply_filters( 'ult_get_img_single', $ult_imgs_settings['img_separator'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_imgs_settings['img_separator'], 'alt' ); $id = 'ult-easy-separator-' . uniqid( wp_rand() ); if ( '' != $ult_imgs_settings['sep_link'] ) { $href = vc_build_link( $ult_imgs_settings['sep_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; } $args = array( 'target' => '#' . $id, // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'width' => $ult_imgs_settings['img_separator_width'], ), ); $data_list = get_ultimate_vc_responsive_media_css( $args ); $trans = '-50%'; if ( is_rtl() ) { $trans = '50%'; } if ( 'ult-left-img' == $ult_imgs_settings['img_separator_alignment'] || 'ult-right-img' == $ult_imgs_settings['img_separator_alignment'] ) { $trans = '0'; } if ( '' != $ult_imgs_settings['img_separator_gutter'] ) { $wrapper_class = 'ult-easy-separator-no-default'; if ( 'ult-top-easy-separator' == $ult_imgs_settings['img_separator_position'] ) { $ult_imgs_settings['img_separator_gutter'] = '-' . $ult_imgs_settings['img_separator_gutter']; $custom_position .= 'transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; $custom_position .= '-ms-transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; $custom_position .= '-webkit-transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; } elseif ( 'ult-bottom-easy-separator' == $ult_imgs_settings['img_separator_position'] ) { $custom_position .= 'transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; $custom_position .= '-ms-transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; $custom_position .= '-webkit-transform: translate(' . $trans . ',' . $ult_imgs_settings['img_separator_gutter'] . '%)!important;'; } } $img_alignment = ''; if ( 'ult-left-img' == $ult_imgs_settings['img_separator_alignment'] && ! wp_is_mobile() ) { $img_alignment = 'ult-left-img'; } elseif ( 'ult-right-img' == $ult_imgs_settings['img_separator_alignment'] && ! wp_is_mobile() ) { $img_alignment = 'ult-right-img'; } else { $img_alignment = ''; } $img_alignment_position = ''; $img_separator_gutter_value = ''; if ( '' != $ult_imgs_settings['img_separator_gutter'] ) { $img_separator_gutter_value = esc_attr( $ult_imgs_settings['img_separator_gutter'] ); } else { $img_separator_gutter_value = '50'; } if ( 'ult-left-img' == $ult_imgs_settings['img_separator_alignment'] && '' != $ult_imgs_settings['img_position_left'] && ! wp_is_mobile() ) { $img_alignment_position = 'left:' . $ult_imgs_settings['img_position_left'] . '%;'; $img_alignment_position .= 'transform: translate(-' . $ult_imgs_settings['img_position_left'] . '%,' . $img_separator_gutter_value . '%);'; $img_alignment_position .= '-ms-transform: translate(-' . $ult_imgs_settings['img_position_left'] . '%,' . $img_separator_gutter_value . '%);'; $img_alignment_position .= '-webkit-transform: translate(-' . $ult_imgs_settings['img_position_left'] . '%,' . $img_separator_gutter_value . '%);'; } elseif ( 'ult-right-img' == $ult_imgs_settings['img_separator_alignment'] && '' != $ult_imgs_settings['img_position_right'] && ! wp_is_mobile() ) { $img_alignment_position = 'right:' . $ult_imgs_settings['img_position_right'] . '%;'; $img_alignment_position .= 'transform: translate(' . $ult_imgs_settings['img_position_right'] . '%,' . $img_separator_gutter_value . '%);'; $img_alignment_position .= '-ms-transform: translate(' . $ult_imgs_settings['img_position_right'] . '%,' . $img_separator_gutter_value . '%);'; $img_alignment_position .= '-webkit-transform: translate(' . $ult_imgs_settings['img_position_right'] . '%,' . $img_separator_gutter_value . '%);'; } else { $img_alignment_position = ''; } $animation_style .= 'opacity:0;'; if ( strtolower( $ult_imgs_settings['animation'] ) !== strtolower( 'No Animation' ) ) { $is_animation = true; $inifinite_arr = array( 'InfiniteRotate', 'InfiniteDangle', 'InfiniteSwing', 'InfinitePulse', 'InfiniteHorizontalShake', 'InfiniteBounce', 'InfiniteFlash', 'InfiniteTADA' ); if ( 0 == $ult_imgs_settings['animation_iteration_count'] || in_array( $ult_imgs_settings['animation'], $inifinite_arr, true ) ) { $ult_imgs_settings['animation_iteration_count'] = 'infinite'; $ult_imgs_settings['animation'] = 'infinite ' . $ult_imgs_settings['animation']; } if ( 'set' == $ult_imgs_settings['opacity'] ) { $animation_el_class .= ' ult-animation ult-animate-viewport '; $opacity_start_effect_data = 'data-opacity_start_effect="' . esc_attr( $ult_imgs_settings['opacity_start_effect'] ) . '"'; } $animation_data .= ' data-animate="' . esc_attr( $ult_imgs_settings['animation'] ) . '" '; $animation_data .= ' data-animation-delay="' . esc_attr( $ult_imgs_settings['animation_delay'] ) . '" '; $animation_data .= ' data-animation-duration="' . esc_attr( $ult_imgs_settings['animation_duration'] ) . '" '; $animation_data .= ' data-animation-iteration="' . esc_attr( $ult_imgs_settings['animation_iteration_count'] ) . '" '; } else { $animation_el_class .= 'ult-no-animation'; } $output = '
'; $output .= '
'; $output .= '
'; $output .= '' . esc_attr( $alt ) . ''; if ( '' != $url ) { $output .= ''; } $output .= '
'; $output .= '
'; $output .= '
'; return $output; } } } if ( class_exists( 'Ultimate_Image_Separator' ) ) { /** * Function that checks if the class is exists or not. */ $ultimate_image_separator = new Ultimate_Image_Separator(); } ultimate_tab.php000064400000200461150212230100007714 0ustar00 ' ', 'tab_id' => ' ', 'font_icons_position' => ' ', 'icon_type' => ' ', 'icon' => ' ', 'icon_color' => ' ', 'icon_hover_color' => ' ', 'icon_size' => ' ', 'icon_margin' => ' ', 'ul_sub_class' => '', ), $atts ); global $tabarr; $tabarr[] = array( 'title' => $ult_ultimate_single_tab_settings['title'], 'tab_id' => $ult_ultimate_single_tab_settings['tab_id'], 'font_icons_position' => $ult_ultimate_single_tab_settings['font_icons_position'], 'icon_type' => $ult_ultimate_single_tab_settings['icon_type'], 'icon' => $ult_ultimate_single_tab_settings['icon'], 'icon_color' => $ult_ultimate_single_tab_settings['icon_color'], 'icon_hover_color' => $ult_ultimate_single_tab_settings['icon_hover_color'], 'icon_size' => $ult_ultimate_single_tab_settings['icon_size'], 'content' => $content, 'icon_margin' => $ult_ultimate_single_tab_settings['icon_margin'], 'ul_sub_class' => $ult_ultimate_single_tab_settings['ul_sub_class'], ); if ( current_user_can( 'editor' ) || current_user_can( 'administrator' ) ) { $admn = __( 'Empty tab. Edit page to add content here.', 'js_composer' ); } else { $admn = ''; } $tabcont = wpb_js_remove_wpautop( $content ); $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_tab ui-tabs-panel wpb_ui-tabs-hide vc_clearfix ult_back', 'single_tab', $atts ); $output .= "\n\t\t\t" . '
'; $output .= ( '' == $content || ' ' == $content ) ? $admn : "\n\t\t\t\t" . wpb_js_remove_wpautop( $content ); $output .= "\n\t\t\t" . '
'; return $output; } /** * Ultimate_main_tab. * * @param array $atts Attributes. * @param array $content Content. */ public function ultimate_main_tab( $atts, $content ) { $output = ''; $title = ''; $ult_advanced_tab_settings['interval'] = ''; $ult_advanced_tab_settings['el_class'] = ''; $ult_advanced_tab_settings['shadow_color'] = ''; $ult_advanced_tab_settings['shadow_width'] = ''; $ult_advanced_tab_settings = shortcode_atts( array( 'title_color' => '', 'auto_rotate' => '', 'interval' => 0, 'tab_style' => 'Style_1', 'tab_bottom_border' => 'Disable', 'border_color' => '#1e73be', 'border_thickness' => '2', 'tab_title_color' => '#74777b', 'tab_hover_title_color' => '#ffffff', 'tab_background_color' => '#e7ecea', 'tab_hover_background_color' => '#4f90d1', 'container_width' => '', 'el_class' => '', 'container_width' => '', 'main_heading_font_family' => '', 'title_font_size' => '15', 'title_font_wt' => '', 'title_line_ht' => '', 'desc_font_family' => '', 'desc_font_size' => '', 'desc_font_style' => '', 'desc_line_ht' => '', 'shadow_color' => '#333333', 'shadow_width' => '', 'enable_bg_color' => '', 'container_border_style1' => '', 'container_color_border' => '', 'cont_border_size' => '', 'tabs_border_radius' => '8', 'tabs_active_index' => '1', 'tab_animation' => 'Slide', 'tab_describe_color' => '#74777b', 'title_font_style' => '', 'css' => '', 'act_icon_color' => '', 'acttab_background' => '', 'acttab_title' => '', 'resp_type' => 'Tabs', 'resp_width' => '400', 'resp_style' => 'Both', 'ac_tabs' => '', 'icon_color' => '#74777b', 'icon_hover_color' => '#ffffff', 'icon_size' => '15', 'icon_margin' => '', 'disp_icon' => 'Enable', 'tab_css' => ' ', 'font_icons_position' => 'Right', 'main_title_typograpy' => '', 'tab_max' => 'off', 'wrapper_margin' => '', 'smooth_scroll' => 'on', ), $atts ); global $tabarr; $tabarr = array(); do_shortcode( $content ); /*-----------default settings------------*/ if ( '' == $ult_advanced_tab_settings['acttab_background'] ) { $ult_advanced_tab_settings['acttab_background'] = $ult_advanced_tab_settings['tab_hover_background_color']; } if ( '' == $ult_advanced_tab_settings['acttab_title'] ) { $ult_advanced_tab_settings['acttab_title'] = $ult_advanced_tab_settings['tab_hover_title_color']; } /*---------------padding---------------------*/ $css_class = ''; $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_advanced_tab_settings['css'], ' ' ), 'ult_tab_element', $atts ); $css_class = esc_attr( $css_class ); $container_style = ''; $ult_style = ''; $tab_style_no = ''; if ( 'Disable' == $ult_advanced_tab_settings['tab_bottom_border'] ) { $ult_advanced_tab_settings['border_thickness'] = '0'; $ult_advanced_tab_settings['border_color'] = 'transparent'; } if ( '' != $ult_advanced_tab_settings['container_width'] ) { $container_style = 'max-width:' . $ult_advanced_tab_settings['container_width'] . 'px;'; } $mhfont_family = ''; $border_style = ''; $tabs_nav_style = ''; if ( is_numeric( $ult_advanced_tab_settings['title_font_size'] ) ) { $ult_advanced_tab_settings['title_font_size'] = 'desktop:' . $ult_advanced_tab_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_advanced_tab_settings['title_font_wt'] ) ) { $ult_advanced_tab_settings['title_font_wt'] = 'desktop:' . $ult_advanced_tab_settings['title_font_wt'] . 'px;'; } $advanced_tabs_id = 'advanced-tabs-wrap-' . wp_rand( 1000, 9999 ); $advanced_tabs_args = array( 'target' => '#' . $advanced_tabs_id . ' .ult-span-text', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_advanced_tab_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_advanced_tab_settings['title_font_wt'], ), ); $advanced_tabs_data_list = get_ultimate_vc_responsive_media_css( $advanced_tabs_args ); if ( function_exists( 'get_ultimate_font_family' ) ) { $mhfont_family = get_ultimate_font_family( $ult_advanced_tab_settings['main_heading_font_family'] ); if ( '' != $mhfont_family ) { $tabs_nav_style .= 'font-family:' . $mhfont_family . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { if ( '' != $ult_advanced_tab_settings['title_font_style'] ) { $tabs_nav_style .= get_ultimate_font_style( $ult_advanced_tab_settings['title_font_style'] ); } } /*-------------------auto rotate------------------*/ if ( 'Disables' == $ult_advanced_tab_settings['auto_rotate'] ) { $ult_advanced_tab_settings['interval'] = 0; $autorotate = 'no'; } else { $autorotate = 'yes'; } if ( '' == $ult_advanced_tab_settings['tab_background_color'] ) { $ult_advanced_tab_settings['tab_background_color'] = 'transparent'; } $element = 'wpb_tabs'; $ul_style = ''; $tabs_nav = ''; $style = ''; /*------------------- style------------------*/ if ( 'Style_1' == $ult_advanced_tab_settings['tab_style'] ) { $style = 'style1'; } elseif ( 'Style_2' == $ult_advanced_tab_settings['tab_style'] ) { $style = 'style2'; } elseif ( 'Style_3' == $ult_advanced_tab_settings['tab_style'] ) { $style = 'style3'; } elseif ( 'Style_4' == $ult_advanced_tab_settings['tab_style'] ) { $ult_style = 'ult_tab_style_4'; $style = 'style1'; } elseif ( 'Style_5' == $ult_advanced_tab_settings['tab_style'] ) { $ult_style = 'ult_tab_style_5'; $style = 'style1'; } elseif ( 'Style_6' == $ult_advanced_tab_settings['tab_style'] ) { $ult_style = 'ult_tab_style_6'; $style = 'style1'; } foreach ( $tabarr as $key => $value ) { $icon_value = $value['icon_size']; if ( is_numeric( $icon_value ) ) { $icon_value1[] = $value['icon_size']; } } /*-------------- border style-----------*/ $tab_border = ''; $tab_border .= 'color:' . $ult_advanced_tab_settings['border_color'] . ';'; $tab_border .= 'border-bottom-color:' . $ult_advanced_tab_settings['border_color'] . ';'; $tab_border .= 'border-bottom-width:' . $ult_advanced_tab_settings['border_thickness'] . 'px;'; $tab_border .= 'border-bottom-style:solid;'; if ( 'Style_1' == $ult_advanced_tab_settings['tab_style'] || 'Style_3' == $ult_advanced_tab_settings['tab_style'] ) { $tab_border .= 'background-color:' . $ult_advanced_tab_settings['tab_background_color'] . ';'; $tab_border .= 'border-top-left-radius:' . $ult_advanced_tab_settings['tabs_border_radius'] . 'px;'; $tab_border .= 'border-top-right-radius:' . $ult_advanced_tab_settings['tabs_border_radius'] . 'px;'; $tab_border = ''; } if ( 'Style_2' == $ult_advanced_tab_settings['tab_style'] ) { $tab_border .= 'border-bottom-width:0px;'; } if ( 'Style_4' == $ult_advanced_tab_settings['tab_style'] || 'Style_5' == $ult_advanced_tab_settings['tab_style'] || 'Style_6' == $ult_advanced_tab_settings['tab_style'] ) { $tab_border .= 'border-bottom-width:0px;'; } /*-----------------content baground-------------------*/ $contain_bg = ''; /*---------------- description font family-----------*/ if ( is_numeric( $ult_advanced_tab_settings['desc_font_size'] ) ) { $ult_advanced_tab_settings['desc_font_size'] = 'desktop:' . $ult_advanced_tab_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_advanced_tab_settings['desc_line_ht'] ) ) { $ult_advanced_tab_settings['desc_line_ht'] = 'desktop:' . $ult_advanced_tab_settings['desc_line_ht'] . 'px;'; } $advanced_tabs_desc_id = 'advanced-tabs-desc-wrap-' . wp_rand( 1000, 9999 ); $advanced_tabs_desc_args = array( 'target' => '#' . $advanced_tabs_desc_id . ' .ult_tabcontent .ult_tab_min_contain p', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_advanced_tab_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_advanced_tab_settings['desc_line_ht'], ), ); $advanced_tabs_desc_data_list = get_ultimate_vc_responsive_media_css( $advanced_tabs_desc_args ); if ( function_exists( 'get_ultimate_font_family' ) ) { $dhfont_family = get_ultimate_font_family( $ult_advanced_tab_settings['desc_font_family'] ); if ( '' != $dhfont_family ) { $contain_bg .= 'font-family:' . $dhfont_family . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { if ( '' != $ult_advanced_tab_settings['desc_font_style'] ) { $contain_bg .= get_ultimate_font_style( $ult_advanced_tab_settings['desc_font_style'] ); } } $ult_top = ''; $icon_top_link = ''; if ( 'Style_1' == $ult_advanced_tab_settings['tab_style'] ) { $ult_top = 'ult_top'; $icon_top_link = 'icon_top_link'; } elseif ( 'Style_2' == $ult_advanced_tab_settings['tab_style'] ) { $ult_top = 'ult_top'; $icon_top_link = ''; } if ( 'Style_4' == $ult_advanced_tab_settings['tab_style'] ) { $tab_style_no .= 'Style_4'; $ult_top = 'ult_top'; $icon_top_link = 'style_4_top'; } if ( 'Style_5' == $ult_advanced_tab_settings['tab_style'] ) { $tab_style_no .= 'Style_5'; $icon_top_link = ''; } if ( 'Style_6' == $ult_advanced_tab_settings['tab_style'] ) { $tab_style_no .= 'Style_6'; $icon_top_link = ''; } if ( 'Style_3' == $ult_advanced_tab_settings['tab_style'] ) { $ult_top = 'ult_top'; $icon_top_link = 'icon_top_link'; } if ( '' != $ult_advanced_tab_settings['enable_bg_color'] ) { $contain_bg .= 'background-color:' . $ult_advanced_tab_settings['enable_bg_color'] . ';'; } if ( '' != $ult_advanced_tab_settings['container_border_style1'] ) { $ult_advanced_tab_settings['container_border_style1'] = str_replace( '|', ' ', $ult_advanced_tab_settings['container_border_style1'] ); $contain_bg .= $ult_advanced_tab_settings['container_border_style1']; } if ( '' != $ult_advanced_tab_settings['tab_describe_color'] ) { $contain_bg .= 'color:' . $ult_advanced_tab_settings['tab_describe_color'] . ';'; } $acord = ''; $array_count = ''; $array_count = count( $tabarr ); $newtab = ''; $newtab .= ''; $newtabcontain = ''; $newtabcontain .= '
'; $newtabcontain .= '
'; $newtabcontain .= wpb_js_remove_wpautop( $content ); $newtabcontain .= '
'; $newtabcontain .= '
'; $op = ''; $op .= '
'; $op .= $newtab; $op .= '
'; $tabanimatclass = ''; if ( 'Slide-Zoom' == $ult_advanced_tab_settings['tab_animation'] ) { $tabanimatclass = 'tabanimate'; } $op .= '
'; $op .= wpb_js_remove_wpautop( $content ); $op .= '
'; $op .= '
'; $op .= '
'; ob_start(); echo $op; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped /*---------------- for acordian -----------------*/ $actab = ''; $actab .= '
'; $actab .= $acord; $actab .= '
'; echo $actab; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped return ob_get_clean(); } /** * Ult_tab_init. */ public function ult_tab_init() { $tab_id_1 = time() . '-1-' . wp_rand( 0, 100 ); $tab_id_2 = time() . '-2-' . wp_rand( 0, 100 ); $settings = array( 'name' => __( 'Advanced Tabs' ), 'base' => 'ult_tab_element', 'category' => __( 'Ultimate VC Addons', 'ultimate_vc' ), 'description' => __( 'Create nice looking tabs.', 'ultimate_vc' ), 'class' => 'ult_tab_eleicon', 'is_container' => true, 'weight' => - 5, 'html_template' => dirname( __FILE__ ) . '../vc_templates/ult_tab_element.php', 'admin_enqueue_css' => preg_replace( '/\s/', '%20', UAVC_URL . 'admin/vc_extend/css/sub-tab.css' ), 'js_view' => 'UltimateTabView', // JS View name for backend. Can be used to override or add some logic for shortcodes in backend (cloning/rendering/deleting/editing). 'icon' => 'icon-wpb-ui-tab-content ult_tab_eleicon', 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Style' ), 'param_name' => 'tab_style', 'value' => array( 'Style 1' => 'Style_1', 'Style 2' => 'Style_2', 'Style 3' => 'Style_3', 'Style 4' => 'Style_4', 'Style 5' => 'Style_5', 'Style 6' => 'Style_6', ), 'group' => 'General ', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation' ), 'param_name' => 'tab_animation', 'value' => array( 'Vertical Slide ' => '', 'Horizontal Slide' => 'Slide-Horizontal', 'Slide-Zoom' => 'Slide-Zoom', 'Fade' => 'Fade', 'Scale' => 'Scale', 'None' => 'None', ), 'group' => 'General ', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( ' Auto Rotate Tabs' ), 'param_name' => 'auto_rotate', 'value' => array( 'Disable' => 'Disables', 'Enable' => 'Enable', ), 'group' => 'General ', ), array( 'type' => 'number', 'heading' => __( 'Auto Rotate Interval', 'ultimate_vc' ), 'param_name' => 'interval', 'value' => '', 'suffix' => 'seconds', 'dependency' => array( 'element' => 'auto_rotate', 'value' => array( 'Enable' ), ), 'group' => 'General ', ), array( 'type' => 'number', 'heading' => __( 'Tab Element Width' ), 'value' => '', 'min' => 300, 'suffix' => 'px', 'param_name' => 'container_width', 'description' => __( 'Adjust width of your tab section. Keep empty for full width.' ), 'group' => 'General ', ), array( 'type' => 'ult_switch', 'class' => '', 'param_name' => 'tab_max', 'value' => 'off', 'default_set' => true, 'options' => array( 'on' => array( 'label' => __( 'Apply Max height to container?', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), ), ), 'description' => __( 'Apply Max height to container?', 'ultimate_vc' ), 'group' => 'General ', ), array( 'type' => 'textfield', 'heading' => __( 'Extra Class Name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), 'group' => 'General ', ), /*---------tab----------------*/ array( 'type' => 'colorpicker', 'heading' => __( 'Tab Title Color' ), 'param_name' => 'tab_title_color', 'value' => '', 'group' => 'Tab', ), array( 'type' => 'colorpicker', 'heading' => __( ' Tab Background Color' ), 'param_name' => 'tab_background_color', 'value' => '', 'group' => 'Tab', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'heading' => __( ' Tab Hover Title Color' ), 'param_name' => 'tab_hover_title_color', 'value' => '', 'group' => 'Tab', ), array( 'type' => 'colorpicker', 'heading' => __( ' Tab Hover Background Color' ), 'param_name' => 'tab_hover_background_color', 'value' => '', 'group' => 'Tab', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'heading' => __( 'Tab Active Title Color' ), 'param_name' => 'acttab_title', 'value' => '', 'group' => 'Tab', ), array( 'type' => 'colorpicker', 'heading' => __( 'Tab Active Background Color' ), 'param_name' => 'acttab_background', 'value' => '', 'group' => 'Tab', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'ultimate_spacing', 'heading' => 'Tab Padding', 'param_name' => 'tab_css', 'mode' => 'padding', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => 'Tab', 'description' => __( 'Adjust inside spacing of tabs.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'tab_style', 'value' => array( 'Style_4', 'Style_1', 'Style_3', 'Style_5', 'Style_6' ), ), 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Tab Border' ), 'param_name' => 'tab_bottom_border', 'value' => array( 'Disable' => 'Disable', 'Enable' => 'Enable', ), 'dependency' => array( 'element' => 'tab_style', 'value' => array( 'Style_1', 'Style_3', 'Style_4' ), ), 'group' => 'Tab', ), array( 'type' => 'colorpicker', 'heading' => __( 'Tab Border Color' ), 'param_name' => 'border_color', 'value' => '', 'dependency' => array( 'element' => 'tab_bottom_border', 'value' => array( 'Enable' ), ), 'group' => 'Tab', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Tab Border Thickness' ), 'param_name' => 'border_thickness', 'dependency' => array( 'element' => 'tab_bottom_border', 'value' => array( 'Enable' ), ), 'min' => '1', 'value' => '', 'suffix' => 'px', 'group' => 'Tab', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Tab Border Radius', 'ultimate_vc' ), 'param_name' => 'tabs_border_radius', 'value' => '', 'min' => 1, 'max' => 100, 'suffix' => 'px', 'description' => __( 'This border will assign to border-top-left and border-top-right for first and last tab element . As you increase the value, the shape convert in circle slowly. (e.g 100 pixels).', 'ultimate_vc' ), 'group' => 'Tab', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Initial Active Tab', 'ultimate_vc' ), 'param_name' => 'tabs_active_index', 'value' => '1', 'min' => 1, 'max' => 100, 'suffix' => '', 'description' => __( 'Enter active tab number (Note: to have all tabs closed on initial load enter non-existing number).', 'ultimate_vc' ), 'group' => 'Tab', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'heading' => __( 'Tab Shaddow Color' ), 'param_name' => 'shadow_color', 'value' => '', 'dependency' => array( 'element' => 'tab_style', 'value' => array( 'Style_5', 'Style_6' ), ), 'group' => 'Tab', ), /*---------icon----------------*/ array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Display Icon' ), 'param_name' => 'disp_icon', 'value' => array( 'Enable' => 'Enable', 'Disable' => 'Disables', ), 'group' => 'Icon ', 'description' => __( 'Display icon with tab title.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'icon_text_setting', 'text' => __( 'Please choose icon from Subtab settings ', 'ultimate_vc' ), 'value' => '', 'class' => '', 'group' => 'Icon ', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12 ult_tabicon_notice', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Position' ), 'param_name' => 'font_icons_position', 'value' => array( 'Right' => 'Right', 'Left' => 'Left', 'Top' => 'Top', ), 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), ), array( 'type' => 'number', 'heading' => __( 'Icon Size', 'smile' ), 'param_name' => 'icon_size', 'value' => '', 'min' => 15, 'max' => 72, 'suffix' => 'px', 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'heading' => __( 'Icon Color', 'smile' ), 'param_name' => 'icon_color', 'value' => '', 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Icon Hover Color', 'smile' ), 'param_name' => 'icon_hover_color', 'value' => '', 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Icon Active Color' ), 'param_name' => 'act_icon_color', 'value' => '', 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Icon Margin ', 'param_name' => 'icon_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => 'Icon ', 'dependency' => array( 'element' => 'disp_icon', 'value' => array( 'Enable' ), ), 'description' => __( 'Adjust spacing of icon.', 'ultimate_vc' ), ), /*--------------container-----------*/ array( 'type' => 'colorpicker', 'heading' => __( 'Container Text Color' ), 'param_name' => 'tab_describe_color', 'value' => '', 'group' => 'Container ', ), array( 'type' => 'colorpicker', 'heading' => __( 'Container Background Color' ), 'param_name' => 'enable_bg_color', 'value' => '', 'group' => 'Container ', ), array( 'type' => 'ultimate_border', 'heading' => __( 'Container Border', 'ultimate_vc' ), 'param_name' => 'container_border_style1', 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'radius' => array( __( 'Top Left', 'ultimate_vc' ) => '', __( 'Top Right', 'ultimate_vc' ) => '', __( 'Bottom Right', 'ultimate_vc' ) => '3', __( 'Bottom Left', 'ultimate_vc' ) => '3', ), 'label_color' => __( 'Container Border Color', 'ultimate_vc' ), 'label_radius' => __( 'Container Border Radius', 'ultimate_vc' ), 'group' => 'Container ', ), /*-------------design-------------*/ array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Responsive Mode for Tabs ' ), 'param_name' => 'resp_type', 'value' => array( 'Tabs' => 'Tabs', 'Accordion' => 'Accordion', ), 'group' => 'Responsive', 'description' => __( 'Display normal tab or convert them into accordion on responsive devices.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Responsive Width', 'ultimate_vc' ), 'param_name' => 'resp_width', 'value' => '', 'min' => 300, 'max' => 1200, 'suffix' => 'px', 'description' => __( 'Enable accordion below this width.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'resp_type', 'value' => array( 'Accordion' ), ), 'group' => 'Responsive', ), array( 'type' => 'ult_switch', 'class' => '', 'param_name' => 'smooth_scroll', 'value' => 'on', 'default_set' => true, 'options' => array( 'on' => array( 'label' => __( 'Scroll to Top of Container', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), ), ), 'description' => __( 'If enable, tab will adjust on viewport on click.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'resp_type', 'value' => array( 'Accordion' ), ), 'group' => 'Responsive', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Responsive Mode Visibility ' ), 'param_name' => 'resp_style', 'value' => array( 'Both' => 'Both', 'Icon' => 'Icon', 'Title' => 'Title', ), 'group' => 'Responsive', 'dependency' => array( 'element' => 'resp_type', 'value' => array( 'Tabs' ), ), 'description' => __( 'Choose what you want to display on responsive devices.', 'ultimate_vc' ), ), /*-----------typography------------*/ array( 'type' => 'text', 'heading' => __( '

Title Settings

' ), 'param_name' => 'main_title_typograpy', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Title Font Family', 'imedica' ), 'param_name' => 'main_heading_font_family', 'description' => __( "Select the font of your choice. You can add new in the collection here.", 'imedica' ), 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'imedica' ), 'param_name' => 'title_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'text', 'heading' => __( '

Container Description

' ), 'param_name' => 'main_desc_typograpy', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( ' Font Family', 'smile' ), 'param_name' => 'desc_font_family', 'description' => __( "Select the font of your choice. You can add new in the collection here.", 'smile' ), 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'imedica' ), 'param_name' => 'desc_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Wrapper Margin ', 'param_name' => 'wrapper_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add or remove margin for wrapper.', 'ultimate_vc' ), ), /*----------end----------*/ ), 'custom_markup' => '
%content%
', 'default_content' => '[single_tab title="' . __( 'Tab 1', 'ultimate_vc' ) . '" tab_id="' . $tab_id_1 . ' ][/single_tab] [single_tab title="' . __( 'Tab 2', 'ultimate_vc' ) . '" tab_id="' . $tab_id_2 . ' ][/single_tab] ', ); if ( function_exists( 'vc_map' ) ) { vc_map( $settings ); } /* ---for single tabs element-------------*/ if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'SubTab', 'ultimate_vc' ), 'base' => 'single_tab', 'icon' => 'ult_tab_eleicon', 'class' => 'ult_tab_eleicon', 'allowed_container_element' => 'vc_row', 'is_container' => true, 'content_element' => true, 'as_child' => array( 'only' => 'ult_tab_element' ), 'html_template' => dirname( __FILE__ ) . '/vc_templates/single_tab.php', 'js_view' => 'UltimateSubTabView', 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'title', ), array( 'type' => 'textfield', 'edit_field_class' => ' vc_col-sm-12 vc_column wpb_el_type_textfield vc_shortcode-param', 'heading' => __( 'Tab ID', 'ultimate_vc' ), 'param_name' => 'tab_id', /* translators: %$s is replaced with "string" */ 'description' => __( 'Enter Tab ID (Note: make sure it is unique, no space and valid according to w3c specification).', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'smile' ), 'param_name' => 'icon', 'value' => '', 'group' => 'Icon', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose, you can add new here.", 'smile' ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'ul_sub_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), ), ) ); } }//end ult_tab_init() } /** * Ultimate_tabs. */ function ultimate_tabs() { Ultimate_VC_Addons::ultimate_register_style( 'ult_tabs', 'tabs' ); Ultimate_VC_Addons::ultimate_register_style( 'ult_tabs_acordian', 'tabs-accordion' ); Ultimate_VC_Addons::ultimate_register_script( 'ult_tabs_acordian_js', 'tabs-accordion', false, array( 'jquery' ), ULTIMATE_VERSION, true ); Ultimate_VC_Addons::ultimate_register_script( 'ult_tabs_rotate', 'tabs', false, array( 'jquery' ), ULTIMATE_VERSION, true ); } /** * Ultimate_tabs_admin. */ function ultimate_tabs_admin() { $screen = get_current_screen(); $screen_id = $screen->base; if ( 'post' !== $screen_id ) { return false; } wp_register_script( 'tab-js-1', UAVC_URL . 'admin/vc_extend/js/ult_tab_admin_enqueue_js.js', array( 'jquery' ), ULTIMATE_VERSION, true ); wp_register_script( 'tab-js-2', UAVC_URL . 'admin/vc_extend/js/single_element_js.js', array( 'jquery' ), ULTIMATE_VERSION, true ); wp_enqueue_script( 'tab-js-1' ); wp_enqueue_script( 'tab-js-2' ); } } if ( class_exists( 'ULT_TAB_ELEMENT' ) ) { $ult_tab_element = new ULT_TAB_ELEMENT(); } if ( class_exists( 'WPBakeryShortCode' ) ) { // Class Name should be WPBakeryShortCode_Your_Short_Code. // See more in vc_composer/includes/classes/shortcodes/shortcodes.php. /** * WPBakeryShortCode_ULT_TAB_ELEMENT. */ class WPBakeryShortCode_ULT_TAB_ELEMENT extends WPBakeryShortCode { /** * Filter method * * @var $filter_added. */ public static $filter_added = false; /** * Controls_css_settings * * @var $controls_css_settings */ protected $controls_css_settings = 'out-tc vc_controls-content-widget'; /** * Controls_list * * @var $controls_list */ protected $controls_list = array( 'edit', 'clone', 'delete' ); /** * Initiator * * @param array $settings Settings. */ public function __construct( $settings ) { parent::__construct( $settings ); // !Important to call parent constructor to active all logic for .shortcode. if ( ! self::$filter_added ) { $this->addFilter( 'vc_inline_template_content', 'setCustomTabId' ); self::$filter_added = true; } } /** * ContentAdmin. * * @param array $atts Attributes. * @param array $content Content. */ public function contentAdmin( $atts, $content = null ) { $width = ''; $custom_markup = ''; $shortcode_attributes = array( 'width' => '1/1' ); foreach ( $this->settings['params'] as $param ) { if ( 'content' != $param['param_name'] ) { if ( isset( $param['value'] ) && is_string( $param['value'] ) ) { $shortcode_attributes[ $param['param_name'] ] = __( $param['value'], 'ultimate_vc' ); } elseif ( isset( $param['value'] ) ) { $shortcode_attributes[ $param['param_name'] ] = $param['value']; } } elseif ( 'content' == $param['param_name'] && null == $content ) { $content = __( $param['value'], 'ultimate_vc' ); } } extract( //phpcs:ignore WordPress.PHP.DontExtract.extract_extract shortcode_atts( $shortcode_attributes, $atts ) ); // Extract tab titles. preg_match_all( '/vc_tab title="([^\"]+)"(\stab_id\=\"([^\"]+)\"){0,1}/i', $content, $matches, PREG_OFFSET_CAPTURE ); $output = ''; $tab_titles = array(); if ( isset( $matches[0] ) ) { $tab_titles = $matches[0]; } $tmp = ''; if ( count( $tab_titles ) ) { $tmp .= '' . "\n"; } else { $output .= do_shortcode( $content ); } $elem = $this->getElementHolder( $width ); $iner = ''; foreach ( $this->settings['params'] as $param ) { $custom_markup = ''; $param_value = isset( $param['param_name'] ) ? $param['param_name'] : ''; if ( is_array( $param_value ) ) { // Get first element from the array. reset( $param_value ); $first_key = key( $param_value ); $param_value = $param_value[ $first_key ]; } $iner .= $this->singleParamHtmlHolder( $param, $param_value ); } if ( isset( $this->settings['custom_markup'] ) && '' != $this->settings['custom_markup'] ) { if ( '' != $content ) { $custom_markup = str_ireplace( '%content%', $tmp . $content, $this->settings['custom_markup'] ); } elseif ( '' == $content && isset( $this->settings['default_content_in_template'] ) && '' != $this->settings['default_content_in_template'] ) { $custom_markup = str_ireplace( '%content%', $this->settings['default_content_in_template'], $this->settings['custom_markup'] ); } else { $custom_markup = str_ireplace( '%content%', '', $this->settings['custom_markup'] ); } $iner .= do_shortcode( $custom_markup ); } $elem = str_ireplace( '%wpb_element_content%', $iner, $elem ); $output = $elem; return $output; } /** * GetTabTemplate. */ public function getTabTemplate() { return '
' . do_shortcode( '[single_tab title="Tab" tab_id="" icon_type="" icon="" icon_color="" icon_hover_color="" icon_size="15px" icon_background_color=""][/single_tab]' ) . '
'; } /** * SetCustomTabId. * * @param string $content Content. */ public function setCustomTabId( $content ) { return preg_replace( '/tab\_id\=\"([^\"]+)\"/', 'tab_id="$1-' . time() . '"', $content ); } }//end class // } // End Class. define( 'ULT_TAB_TITLE', __( 'Tab', 'ultimate_vc' ) ); if ( function_exists( 'vc_path_dir' ) ) { require_once vc_path_dir( 'SHORTCODES_DIR', 'vc-column.php' ); } if ( class_exists( 'WPBakeryShortCode_VC_Column' ) ) { /** * Class WPBakeryShortCode_SINGLE_TAB. */ class WPBakeryShortCode_SINGLE_TAB extends WPBakeryShortCode_VC_Column { /** * Controls_css_settings. * * @var $controls_css_settings */ protected $controls_css_settings = 'tc vc_control-container'; /** * Controls_list. * * @var $controls_list */ protected $controls_list = array( 'add', 'edit', 'clone', 'delete' ); /** * Predefined_atts. * * @var $predefined_atts */ protected $predefined_atts = array( 'tab_id' => ULT_TAB_TITLE, 'title' => '', 'icon_type' => '', 'icon' => '', 'ul_sub_class' => '', ); /** * Initiator * * @param array $settings Settings. */ public function __construct( $settings ) { //phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found parent::__construct( $settings ); } /** * CustomAdminBlockParams. */ public function customAdminBlockParams() { return ' id="tab-' . esc_attr( $this->atts['tab_id'] ) . '"'; } /** * MainHtmlBlockParams. * * @param string $width Width. * @param string $i I. */ public function mainHtmlBlockParams( $width, $i ) { return 'data-element_type="' . esc_attr( $this->settings['base'] ) . '" class="wpb_' . esc_attr( $this->settings['base'] ) . ' wpb_sortable wpb_content_holder"' . $this->customAdminBlockParams(); } /** * ContainerHtmlBlockParams. * * @param string $width Width. * @param string $i I. */ public function containerHtmlBlockParams( $width, $i ) { return 'class="wpb_column_container vc_container_for_children"'; } /** * GetColumnControls. * * @param array $controls COntrols. * @param array $extended_css Extended CSS. */ public function getColumnControls( $controls, $extended_css = '' ) { return $this->getColumnControlsModular( $extended_css ); } } } } ultimate_icon_timeline.php000064400000233104150212230100011764 0ustar00 __( 'Timeline', 'ultimate_vc' ), 'base' => 'icon_timeline', 'class' => 'vc_timeline', 'icon' => 'vc_timeline_icon', 'category' => 'Ultimate VC Addons', 'description' => __( 'Timeline of old memories and events.', 'smile' ), 'as_parent' => array( 'only' => 'icon_timeline_item,icon_timeline_sep,icon_timeline_feat' ), 'content_element' => true, 'show_settings_on_create' => true, 'front_enqueue_css' => preg_replace( '/\s/', '%20', UAVC_URL . 'assets/css/advacne_carosal_front.css' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Height', 'ultimate_vc' ), 'param_name' => 'timeline_style', 'value' => array( __( 'Non-optimized (CSS)', 'ultimate_vc' ) => 'csstime', __( 'Optimized with JavaScript', 'ultimate_vc' ) => 'jstime', ), 'description' => __( 'How would you like the height of timeline.', 'smile' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Connecter Line Style', 'ultimate_vc' ), 'param_name' => 'timeline_line_style', 'value' => array( __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', ), 'description' => __( 'Select the style of line that connects timeline items.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color of Connecter Line:', 'ultimate_vc' ), 'param_name' => 'timeline_line_color', 'value' => '', 'description' => __( 'Select the color for the line that connects timeline items.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background color for timeline item block / container:', 'ultimate_vc' ), 'param_name' => 'time_block_bg_color', 'value' => '', 'description' => __( 'Give a background color to the timeline item block.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Select font color of items separator:', 'ultimate_vc' ), 'param_name' => 'time_sep_color', 'value' => '', 'description' => __( 'Select font color of items separator.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Select background color for items separator:', 'ultimate_vc' ), 'param_name' => 'time_sep_bg_color', 'value' => '', 'description' => __( 'Select the background color for item separator.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Timeline Layout:', 'ultimate_vc' ), 'param_name' => 'timeline_layout', 'value' => array( __( 'Full Width', 'ultimate_vc' ) => '', __( 'Custom Width', 'ultimate_vc' ) => 'timeline-custom-width', ), 'description' => __( 'Select Layout of Timeline.', 'smile' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Custom Width', 'ultimate_vc' ), 'param_name' => 'custom_width', 'value' => 200, 'suffix' => 'px', 'description' => __( 'Provide custom width for each block', 'ultimate_vc' ), 'dependency' => array( 'element' => 'timeline_layout', 'value' => array( 'timeline-custom-width' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover animation:', 'ultimate_vc' ), 'param_name' => 'tl_animation', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Slide Out', 'ultimate_vc' ) => 'tl-animation-slide-out', __( 'Slide Up', 'ultimate_vc' ) => 'tl-animation-slide-up', __( 'Slide Down', 'ultimate_vc' ) => 'tl-animation-slide-down', __( 'Shadow', 'ultimate_vc' ) => 'tl-animation-shadow', ), 'description' => __( 'Hover animation can be given to the timeline item blocks.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the timeline, and you can use this class for your customizations.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Content Margin ', 'param_name' => 'timeline_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing from outside to content.', 'ultimate_vc' ), ), ), 'js_view' => 'VcColumnView', ) ); vc_map( array( 'name' => __( 'Items Separator', 'ultimate_vc' ), 'base' => 'icon_timeline_sep', 'class' => 'vc_timeline_sep', 'icon' => 'vc_timeline_sep_icon', 'category' => __( 'Timeline', 'ultimate_vc' ), 'content_element' => true, 'as_child' => array( 'only' => 'icon_timeline' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'separator Text', 'ultimate_vc' ), 'param_name' => 'time_sep_title', 'admin_label' => true, 'value' => '', 'description' => __( 'Provide the text for this timeline Separator.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'param_name' => 'time_sep_color', 'heading' => __( 'Color', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'line_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), ), array( 'type' => 'colorpicker', 'param_name' => 'line_color', 'heading' => __( 'Border color', 'ultimate_vc' ), 'dependency' => array( 'element' => 'line_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'param_name' => 'line_width', 'heading' => __( 'Border width', 'ultimate_vc' ), 'value' => '1', 'suffix' => 'px', 'dependency' => array( 'element' => 'line_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'param_name' => 'line_radius', 'heading' => __( 'Border radius', 'ultimate_vc' ), 'value' => '5', 'suffix' => 'px', 'dependency' => array( 'element' => 'line_style', 'not_empty' => true, ), ), array( 'type' => 'ultimate_google_fonts', 'param_name' => 'seperator_title_font', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'seperator_title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'seperator_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the timeline, and you can use this class for your customizations.', 'ultimate_vc' ), ), ), ) ); vc_map( array( 'name' => __( 'Timeline Item', 'ultimate_vc' ), 'base' => 'icon_timeline_item', 'class' => 'vc_timeline_item', 'icon' => 'vc_timeline_item_icon', 'category' => __( 'Timeline', 'ultimate_vc' ), 'content_element' => true, 'as_child' => array( 'only' => 'icon_timeline' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'time_title', 'admin_label' => true, 'value' => '', 'description' => __( 'Provide the title for this timeline item.', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'heading' => __( 'Title settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'title_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'admin_label' => true, 'value' => '', 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', 'description' => __( 'Provide some description.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'heading' => __( 'Description settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'No Icon', 'ultimate_vc' ) => 'noicon', __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#DE5034', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#fff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#dbdbdb', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Apply link to:', 'ultimate_vc' ), 'param_name' => 'time_link_apply', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Complete box', 'ultimate_vc' ) => 'box', __( 'Box Title', 'ultimate_vc' ) => 'title', __( 'Display Read More', 'ultimate_vc' ) => 'more', ), 'description' => __( 'Select the element for link.', 'ultimate_vc' ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Add Link', 'ultimate_vc' ), 'param_name' => 'time_link', 'value' => '', 'dependency' => array( 'element' => 'time_link_apply', 'value' => array( 'more', 'title', 'box' ), ), 'description' => __( 'Provide the link that will be applied to this timeline.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Read More Text', 'ultimate_vc' ), 'param_name' => 'time_read_text', 'value' => 'Read More', 'description' => __( 'Customize the read more text.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'time_link_apply', 'value' => array( 'more' ), ), ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the timeline, and you can use this class for your customizations.', 'ultimate_vc' ), ), ), ) ); vc_map( array( 'name' => __( 'Timeline Featured Item', 'ultimate_vc' ), 'base' => 'icon_timeline_feat', 'class' => 'vc_timeline_feat', 'icon' => 'vc_timeline_feat_icon', 'category' => __( 'Timeline', 'ultimate_vc' ), 'content_element' => true, 'as_child' => array( 'only' => 'icon_timeline' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'time_title', 'admin_label' => true, 'value' => '', 'description' => __( 'Provide the title for this timeline item.', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'heading' => __( 'Title settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'title_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'admin_label' => true, 'value' => '', 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', 'description' => __( 'Provide some description.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'heading' => __( 'Description settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'No Icon', 'ultimate_vc' ) => 'noicon', __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'attach_image', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#DE5034', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#fff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#dbdbdb', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector', 'custom' ), ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Apply link to:', 'ultimate_vc' ), 'param_name' => 'time_link_apply', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Complete box', 'ultimate_vc' ) => 'box', __( 'Box Title', 'ultimate_vc' ) => 'title', __( 'Display Read More', 'ultimate_vc' ) => 'more', ), 'description' => __( 'Select the element for link.', 'ultimate_vc' ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Add Link', 'ultimate_vc' ), 'param_name' => 'time_link', 'value' => '', 'dependency' => array( 'element' => 'time_link_apply', 'value' => array( 'more', 'title', 'box' ), ), 'description' => __( 'Provide the link that will be applied to this timeline.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Read More Text', 'ultimate_vc' ), 'param_name' => 'time_read_text', 'value' => 'Read More', 'description' => __( 'Customize the read more text.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'time_link_apply', 'value' => array( 'more' ), ), ), array( 'type' => 'dropdown', 'heading' => 'Arrow position', 'param_name' => 'arrow_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', ), ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the timeline, and you can use this class for your customizations.', 'ultimate_vc' ), ), ), ) ); } } /** * For the icon timeline in the module * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function icon_timeline( $atts, $content = null ) { $ult_icon_timeline_settings = shortcode_atts( array( 'timeline_style' => 'csstime', 'timeline_line_color' => '', 'timeline_line_style' => 'dotted', 'time_sep_bg_color' => '', 'time_sep_color' => '', 'time_block_bg_color' => '', 'timeline_layout' => '', 'tl_animation' => '', 'custom_width' => '200', 'el_class' => '', 'timeline_margin' => '', ), $atts ); $data = ''; $ult_icon_timeline_settings['line_style'] = ''; $cw = ''; $output = ''; $timeline_design_css = ''; $timeline_design_css = $ult_icon_timeline_settings['timeline_margin']; if ( 'timeline-custom-width' == $ult_icon_timeline_settings['timeline_layout'] ) { $cw = 'data-timeline-cutom-width="' . esc_attr( $ult_icon_timeline_settings['custom_width'] ) . '"'; } if ( '' != $ult_icon_timeline_settings['time_sep_color'] ) { $ult_icon_timeline_settings['time_sep_color'] = 'data-time_sep_color="' . esc_attr( $ult_icon_timeline_settings['time_sep_color'] ) . '"'; } if ( '' != $ult_icon_timeline_settings['time_sep_bg_color'] ) { $ult_icon_timeline_settings['time_sep_bg_color'] = 'data-time_sep_bg_color="' . esc_attr( $ult_icon_timeline_settings['time_sep_bg_color'] ) . '"'; } if ( '' != $ult_icon_timeline_settings['time_block_bg_color'] ) { $ult_icon_timeline_settings['time_block_bg_color'] = 'data-time_block_bg_color="' . esc_attr( $ult_icon_timeline_settings['time_block_bg_color'] ) . '"'; } if ( '' != $ult_icon_timeline_settings['timeline_line_color'] ) { $ult_timeline_sep_settings['line_style'] = 'border-right-style:' . $ult_icon_timeline_settings['timeline_line_style'] . ';'; } if ( '' != $ult_icon_timeline_settings['timeline_line_style'] ) { $ult_icon_timeline_settings['line_style'] .= 'border-right-color:' . $ult_icon_timeline_settings['timeline_line_color'] . ';'; } if ( 'jstime' == $ult_icon_timeline_settings['timeline_style'] ) { $output .= '
timeline_pre_loader
'; $output .= '
'; } else { $output .= '
'; } $output .= '
'; $output .= '
'; $output .= do_shortcode( $content ); $output .= '
'; $output .= '
'; return $output; } /** * For the icon timeline in the module * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function icon_timeline_sep( $atts, $content = null ) { $animation = ''; $seperator_style = ''; $ult_timeline_sep_settings = shortcode_atts( array( 'time_sep_title' => '. . .', 'time_sep_color' => '', 'time_sep_bg_color' => '', 'line_style' => '', 'time_block_bg_color' => '', 'line_color' => '', 'line_width' => '1', 'line_radius' => '5', 'el_class' => '', 'font_size' => '', 'seperator_line_ht' => '', 'seperator_title_font' => '', 'seperator_title_font_style' => '', ), $atts ); if ( '' != $ult_timeline_sep_settings['time_sep_color'] ) { $seperator_style .= 'color:' . $ult_timeline_sep_settings['time_sep_color'] . ';'; } if ( '' != $ult_timeline_sep_settings['line_style'] ) { $seperator_style .= 'border-style:' . $ult_timeline_sep_settings['line_style'] . ';'; } if ( '' != $ult_timeline_sep_settings['line_color'] ) { $seperator_style .= 'border-color:' . $ult_timeline_sep_settings['line_color'] . ';'; } if ( '' != $ult_timeline_sep_settings['line_width'] ) { $seperator_style .= 'border-width:' . $ult_timeline_sep_settings['line_width'] . 'px;'; } if ( '' != $ult_timeline_sep_settings['line_radius'] ) { $seperator_style .= 'border-radius:' . $ult_timeline_sep_settings['line_radius'] . 'px;'; } if ( is_numeric( $ult_timeline_sep_settings['font_size'] ) ) { $ult_timeline_sep_settings['font_size'] = 'desktop:' . $ult_timeline_sep_settings['font_size'] . 'px;'; } if ( is_numeric( $ult_timeline_sep_settings['seperator_line_ht'] ) ) { $ult_timeline_sep_settings['seperator_line_ht'] = 'desktop:' . $ult_timeline_sep_settings['seperator_line_ht'] . 'px;'; } $timeline_seperator_id = 'timeline-seperator-' . wp_rand( 1000, 9999 ); $timeline_seperator_args = array( 'target' => '#' . $timeline_seperator_id . ' .sep-text', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_timeline_sep_settings['font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_timeline_sep_settings['seperator_line_ht'], ), ); $seperator_data_list = get_ultimate_vc_responsive_media_css( $timeline_seperator_args ); if ( '' != $ult_timeline_sep_settings['seperator_title_font'] ) { $font_family = get_ultimate_font_family( $ult_timeline_sep_settings['seperator_title_font'] ); $seperator_style .= 'font-family:\'' . $font_family . '\';'; if ( '' != $ult_timeline_sep_settings['seperator_title_font_style'] ) { $font_style = get_ultimate_font_style( $ult_timeline_sep_settings['seperator_title_font_style'] ); $seperator_style .= $font_style; } } $output = '
'; $output .= '
' . $ult_timeline_sep_settings['time_sep_title'] . '
'; $style = ''; return $output; } /** * For the icon timeline in the module * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function icon_timeline_feat( $atts, $content = null ) { $time_icon = ''; $time_icon_color = ''; $time_icon_bg_color = ''; $time_position = ''; $animation = ''; $border_color = ''; $title_style = ''; $desc_style = ''; $title_line_ht = ''; $target = ''; $link_title = ''; $rel = ''; $ult_timeline_feat_settings = shortcode_atts( array( 'icon_type' => 'noicon', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => 'circle', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'time_title' => '', 'heading_tag' => 'h3', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_line_ht' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_ht' => '', 'desc_font_color' => '', 'time_link' => '', 'time_link_apply' => '', 'time_read_text' => 'Read More', 'el_class' => '', // parent atts. 'font_size' => '', 'line_color' => '', // SEp. 'time_sep_color' => '', 'time_sep_bg_color' => '', 'line_style' => '', 'time_block_bg_color' => '', 'line_color' => '', 'arrow_position' => 'top', ), $atts ); $html = ''; $custom_style = ''; $bg_cls = ''; $box_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_timeline_feat_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_timeline_feat_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_timeline_feat_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_timeline_feat_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_timeline_feat_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_timeline_feat_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_timeline_feat_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_timeline_feat_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_timeline_feat_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_timeline_feat_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_timeline_feat_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_timeline_feat_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_timeline_feat_settings['icon_border_spacing'] ) . '" icon_link="' . esc_attr( $ult_timeline_feat_settings['icon_link'] ) . '" icon_animation="' . esc_attr( $ult_timeline_feat_settings['icon_animation'] ) . '"]' ); if ( '' == $ult_timeline_feat_settings['icon_color_bg'] ) { $bg_cls .= 'tl-icon-no-bg'; } if ( '' != $ult_timeline_feat_settings['line_color'] ) { $ult_timeline_feat_settings['line_style'] = 'border-right-color:' . $ult_timeline_feat_settings['line_color'] . ';'; } if ( '' != $ult_timeline_feat_settings['font_size'] ) { $ult_timeline_feat_settings['line_style'] .= 'top:' . ( $ult_timeline_feat_settings['font_size'] * 2 ) . 'px;'; } /* title */ if ( '' != $ult_timeline_feat_settings['title_font'] ) { $font_family = get_ultimate_font_family( $ult_timeline_feat_settings['title_font'] ); $title_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_timeline_feat_settings['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_timeline_feat_settings['title_font_style'] ); } if ( is_numeric( $ult_timeline_feat_settings['title_font_size'] ) ) { $ult_timeline_feat_settings['title_font_size'] = 'desktop:' . $ult_timeline_feat_settings['title_font_size'] . 'px;'; } if ( is_numeric( $title_line_ht ) ) { $title_line_ht = 'desktop:' . $title_line_ht . 'px;'; } $timeline_featured_id = 'timeline-featured-' . wp_rand( 1000, 9999 ); $timeline_featured_title_args = array( 'target' => '#' . $timeline_featured_id . ' .ult-timeline-title', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_timeline_feat_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $title_line_ht, ), ); $data_list = get_ultimate_vc_responsive_media_css( $timeline_featured_title_args ); if ( '' != $ult_timeline_feat_settings['title_font_color'] ) { $title_style .= 'color:' . $ult_timeline_feat_settings['title_font_color'] . ';'; } /* description */ if ( '' != $ult_timeline_feat_settings['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_timeline_item_settings['desc_font'] ); $desc_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_timeline_feat_settings['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_timeline_item_settings['desc_font_style'] ); } if ( is_numeric( $ult_timeline_feat_settings['desc_font_size'] ) ) { $ult_timeline_feat_settings['desc_font_size'] = 'desktop:' . $ult_timeline_feat_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_timeline_feat_settings['desc_line_ht'] ) ) { $ult_timeline_feat_settings['desc_line_ht'] = 'desktop:' . $ult_timeline_feat_settings['desc_line_ht'] . 'px;'; } $timeline_featured_title_args = array( 'target' => '#' . $timeline_featured_id . ' .custom-lht', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_timeline_feat_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_timeline_feat_settings['desc_line_ht'], ), ); $data_list_desc = get_ultimate_vc_responsive_media_css( $timeline_featured_title_args ); if ( '' != $ult_timeline_feat_settings['desc_font_color'] ) { $desc_style .= 'color:' . $ult_timeline_feat_settings['desc_font_color'] . ';'; } $li_prefix = '
'; $li_suffix = '
'; $style = ( '' !== $time_icon_color ) ? ' color:' . $time_icon_color . ';' : ' '; $style .= ( '' !== $time_icon_bg_color ) ? ' background:' . $time_icon_bg_color . ';' : ' '; $style .= ( '' !== $ult_timeline_feat_settings['font_size'] ) ? ' font-size:' . $ult_timeline_feat_settings['font_size'] . 'px;' : ' '; $icon_pad = ''; $header_block_style = ''; $ult_timeline_feat_settings['icon'] = '
'; if ( 'noicon' != $ult_timeline_feat_settings['icon_type'] ) { $ult_timeline_feat_settings['icon'] .= $box_icon; } $ult_timeline_feat_settings['icon'] .= '
'; $link_sufix = ''; $link_prefix = ''; $vv_link = ''; if ( '' != $ult_timeline_feat_settings['time_link'] ) { $href = vc_build_link( $ult_timeline_feat_settings['time_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix = ''; $link_sufix = ''; } $header = ''; $header .= '
'; $contt = ''; if ( '' != $ult_timeline_feat_settings['time_link_apply'] && 'box' == $ult_timeline_feat_settings['time_link_apply'] ) { $contt .= ''; } $icon_wrap_preffix = '
'; $icon_wrap_suffix = '
'; $heading_preffix = '
'; $heading_suffix = '
'; $html = $ult_timeline_feat_settings['icon'] . $header; $feat_spl = '
'; if ( 'bottom' == $ult_timeline_feat_settings['arrow_position'] ) { // featured item at top. $ext_class = 'feat-top'; } else { $ext_class = ''; } $feat_spl .= '
'; $contt .= '
' . $html; $contt .= '
'; $feat_spl .= $contt; return $feat_spl; } /** * For the icon timeline in the module * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function icon_timeline_item( $atts, $content = null ) { $time_icon_color = ''; $time_icon_bg_color = ''; $time_position = ''; $animation = ''; $border_color = ''; $title_style = ''; $desc_style = ''; $target = ''; $link_title = ''; $rel = ''; $ult_timeline_item_settings = shortcode_atts( array( 'icon_type' => 'noicon', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => 'circle', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'time_title' => '', 'heading_tag' => 'h3', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_line_height' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_height' => '', 'desc_font_color' => '', 'time_link' => '', 'time_link_apply' => '', 'time_read_text' => 'Read More', 'el_class' => '', 'font_size' => '', 'line_color' => '', ), $atts ); $html = ''; $custom_style = ''; $bg_cls = ''; $box_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_timeline_item_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_timeline_item_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_timeline_item_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_timeline_item_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_timeline_item_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_timeline_item_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_timeline_item_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_timeline_item_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_timeline_item_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_timeline_item_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_timeline_item_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_timeline_item_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_timeline_item_settings['icon_border_spacing'] ) . '" icon_link="' . esc_attr( $ult_timeline_item_settings['icon_link'] ) . '" icon_animation="' . esc_attr( $ult_timeline_item_settings['icon_animation'] ) . '"]' ); if ( '' == $ult_timeline_item_settings['icon_color_bg'] ) { $bg_cls .= 'tl-icon-no-bg'; } if ( '' != $ult_timeline_item_settings['line_color'] ) { $ult_timeline_feat_settings['line_style'] = 'border-right-color:' . $ult_timeline_item_settings['line_color'] . ';'; } if ( '' != $ult_timeline_item_settings['font_size'] ) { $ult_timeline_feat_settings['line_style'] .= 'top:' . ( $ult_timeline_item_settings['font_size'] * 2 ) . 'px;'; } /* title */ if ( '' != $ult_timeline_item_settings['title_font'] ) { $font_family = get_ultimate_font_family( $ult_timeline_item_settings['title_font'] ); $title_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_timeline_item_settings['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_timeline_item_settings['title_font_style'] ); } if ( is_numeric( $ult_timeline_item_settings['title_font_size'] ) ) { $ult_timeline_item_settings['title_font_size'] = 'desktop:' . $ult_timeline_item_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_timeline_item_settings['title_line_height'] ) ) { $ult_timeline_item_settings['title_line_height'] = 'desktop:' . $ult_timeline_item_settings['title_line_height'] . 'px;'; } $timeline_item_id = 'timeline-item-' . wp_rand( 1000, 9999 ); $timeline_item_args = array( 'target' => '#' . $timeline_item_id . ' .ult-timeline-title', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_timeline_item_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_timeline_item_settings['title_line_height'], ), ); $Item_data_list = get_ultimate_vc_responsive_media_css( $timeline_item_args );// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase if ( '' != $ult_timeline_item_settings['title_font_color'] ) { $title_style .= 'color:' . $ult_timeline_item_settings['title_font_color'] . ';'; } /* description */ if ( '' != $ult_timeline_item_settings['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_timeline_item_settings['desc_font'] ); $desc_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_timeline_item_settings['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_timeline_item_settings['desc_font_style'] ); } if ( is_numeric( $ult_timeline_item_settings['desc_font_size'] ) ) { $ult_timeline_item_settings['desc_font_size'] = 'desktop:' . $ult_timeline_item_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_timeline_item_settings['desc_line_height'] ) ) { $ult_timeline_item_settings['desc_line_height'] = 'desktop:' . $ult_timeline_item_settings['desc_line_height'] . 'px;'; } $timeline_item_args_desc = array( 'target' => '#' . $timeline_item_id . ' .timeline-item-spt', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_timeline_item_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_timeline_item_settings['desc_line_height'], ), ); $Item_desc_data_list = get_ultimate_vc_responsive_media_css( $timeline_item_args_desc );// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase if ( '' != $ult_timeline_item_settings['desc_font_color'] ) { $desc_style .= 'color:' . $ult_timeline_item_settings['desc_font_color'] . ';'; } $li_prefix = '
'; $li_suffix = '
'; $style = ( '' !== $time_icon_color ) ? ' color:' . $time_icon_color . ';' : ' '; $style .= ( '' !== $time_icon_bg_color ) ? ' background:' . $time_icon_bg_color . ';' : ' '; $style .= ( '' !== $ult_timeline_item_settings['font_size'] ) ? ' font-size:' . $ult_timeline_item_settings['font_size'] . 'px;' : ' '; $icon_pad = ''; $header_block_style = ''; $ult_timeline_item_settings['icon'] = '
'; if ( 'noicon' != $ult_timeline_item_settings['icon_type'] ) { $ult_timeline_item_settings['icon'] .= $box_icon; } $ult_timeline_item_settings['icon'] .= '
'; $link_sufix = ''; $link_prefix = ''; $vv_link = ''; if ( '' != $ult_timeline_item_settings['time_link'] ) { $href = vc_build_link( $ult_timeline_item_settings['time_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix = ''; $link_sufix = ''; } $header = ''; $header_link_prefix = ''; $header_link_suffix = ''; $header .= '
'; if ( '' != $ult_timeline_item_settings['time_link_apply'] && 'title' == $ult_timeline_item_settings['time_link_apply'] ) { $header_link_prefix = ''; $header_link_suffix = ''; } $header .= '<' . $ult_timeline_item_settings['heading_tag'] . ' class="ult-timeline-title ult-responsive" ' . $Item_data_list . ' style="' . esc_attr( $title_style ) . '">' . $header_link_prefix . $ult_timeline_item_settings['time_title'] . $header_link_suffix . '';// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase $header .= '
' . do_shortcode( $content ) . '
';// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase if ( '' != $ult_timeline_item_settings['time_link_apply'] && 'more' == $ult_timeline_item_settings['time_link_apply'] ) { $header = $header . '

' . $link_prefix . $ult_timeline_item_settings['time_read_text'] . $link_sufix . '

'; } $header .= '
'; if ( '' != $ult_timeline_item_settings['time_link_apply'] && 'box' == $ult_timeline_item_settings['time_link_apply'] ) { $header .= ''; } $icon_wrap_preffix = '
'; $icon_wrap_suffix = '
'; $heading_preffix = '
'; $heading_suffix = '
'; $html = $li_prefix . $ult_timeline_item_settings['icon'] . $header . $li_suffix; return $html; } } } if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Icon_Timeline' ) ) { /** * Function that initializes Ultimate Timeline Module * * @class WPBakeryShortCode_Icon_Timeline */ class WPBakeryShortCode_Icon_Timeline extends WPBakeryShortCodesContainer { } } if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Icon_Timeline_Item' ) ) { /** * Function that initializes Ultimate Timeline Module * * @class WPBakeryShortCode_Icon_Timeline_Item */ class WPBakeryShortCode_Icon_Timeline_Item extends WPBakeryShortCode { } } if ( class_exists( 'Ultimate_Icon_Timeline' ) ) { $Ultimate_Icon_Timeline = new Ultimate_Icon_Timeline();// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase } ultimate_parallax.php000064400000243104150212230100010753 0ustar00=' ) ) { add_filter( 'vc_shortcode_output', array( $this, 'execute_ultimate_vc_shortcode' ), 10, 3 ); } } }//end __construct() /** * Execute shortcode. * * @since ---- * @param mixed $output output. * @param mixed $obj object. * @param mixed $attr attributes. * @access public */ public function execute_ultimate_vc_shortcode( $output, $obj, $attr ) { if ( $obj->settings( 'base' ) == 'vc_row' ) { $output .= $this->parallax_shortcode( $attr, '' ); } return $output; } /** * Execute Parallax shortcode. * * @since ---- * @param mixed $atts atts variable. * @param mixed $content contents. * @access public */ public static function parallax_shortcode( $atts, $content ) { $bsf_img_repeat = ''; $overlay = ''; $seperator_html = ''; $seperator_bottom_html = ''; $seperator_top_html = ''; $seperator_css = ''; $ult_parallax_settings = shortcode_atts( array( 'bg_type' => '', 'bg_image' => '', 'bg_image_new' => '', 'bg_image_repeat' => '', 'bg_image_size' => '', 'parallax_style' => '', 'parallax_sense' => '30', 'video_opts' => '', 'bg_image_posiiton' => '', 'video_url' => '', 'video_url_2' => '', 'video_poster' => '', 'u_video_url' => '', 'bg_cstm_size' => '', 'bg_override' => '0', 'bg_img_attach' => '', 'u_start_time' => '', 'u_stop_time' => '', 'layer_image' => '', 'bg_grad' => '', 'bg_color_value' => '', 'bg_fade' => '', 'css' => '', 'viewport_vdo' => '', 'enable_controls' => '', 'controls_color' => '', 'animation_direction' => 'left-animation', 'animation_type' => 'false', 'horizontal_animation' => '', 'vertical_animation' => '', 'animation_speed' => '', 'animation_repeat' => 'repeat', 'animated_bg_color' => '', 'fadeout_row' => '', 'fadeout_start_effect' => '30', 'parallax_content' => '', 'parallax_content_sense' => '30', 'disable_on_mobile' => '', 'disable_on_mobile_img_parallax' => 'off', 'enable_overlay' => '', 'overlay_color' => '', 'overlay_pattern' => '', 'overlay_pattern_opacity' => '80', 'overlay_pattern_size' => '', 'overlay_pattern_attachment' => 'scroll', 'multi_color_overlay' => '', 'multi_color_overlay_opacity' => '60', 'seperator_enable' => '', 'seperator_type' => 'none_seperator', 'seperator_position' => 'top_seperator', 'seperator_shape_size' => '40', 'seperator_shape_background' => '#fff', 'seperator_shape_border' => 'none', 'seperator_shape_border_color' => '', 'seperator_shape_border_width' => '1', 'seperator_svg_height' => '60', 'icon_type' => 'no_icon', 'icon' => '', 'icon_color' => '', 'icon_style' => 'none', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'ult_hide_row' => '', 'ult_hide_row_large_screen' => '', 'ult_hide_row_desktop' => '', 'ult_hide_row_tablet' => '', 'ult_hide_row_tablet_small' => '', 'ult_hide_row_mobile' => '', 'ult_hide_row_mobile_large' => '', 'video_fixer' => 'true', ), $atts ); if ( '' === $ult_parallax_settings['bg_type'] ) { $ult_parallax_settings['bg_type'] = 'no_bg'; } if ( '' === $ult_parallax_settings['parallax_style'] ) { $ult_parallax_settings['parallax_style'] = 'vcpb-default'; } if ( '' === $ult_parallax_settings['bg_image_repeat'] ) { $ult_parallax_settings['bg_image_repeat'] = 'repeat'; } if ( '' === $ult_parallax_settings['bg_image_size'] ) { $ult_parallax_settings['bg_image_size'] = 'cover'; } if ( '' === $ult_parallax_settings['bg_img_attach'] ) { $ult_parallax_settings['bg_img_attach'] = 'scroll'; } $bsf_dev_mode = bsf_get_option( 'dev_mode' ); if ( 'enable' === $bsf_dev_mode ) { $js_path = UAVC_URL . 'assets/js/'; $css_path = UAVC_URL . 'assets/css/'; $ext = ''; } else { $js_path = UAVC_URL . 'assets/min-js/'; $css_path = UAVC_URL . 'assets/min-css/'; $ext = '.min'; } /* enqueue scripts */ if ( ( 'enable' == get_option( 'ultimate_row' ) && '' !== $ult_parallax_settings['bg_type'] ) || '' != $ult_parallax_settings['parallax_content'] || '' != $ult_parallax_settings['fadeout_row'] ) { $ultimate_js = get_option( 'ultimate_js' ); if ( 'enable' != $ultimate_js ) : if ( 'no_bg' == $ult_parallax_settings['bg_type'] && ( '' != $ult_parallax_settings['parallax_content'] || '' != $ult_parallax_settings['fadeout_row'] ) ) { // @codingStandardsIgnoreLine. } elseif ( 'no_bg' != $ult_parallax_settings['bg_type'] && ( '' != $ult_parallax_settings['parallax_content'] || '' != $ult_parallax_settings['fadeout_row'] ) ) { wp_enqueue_script( 'ultimate-appear' ); wp_enqueue_script( 'ultimate-row-bg', $js_path . 'ultimate_bg' . $ext . '.js', null, ULTIMATE_VERSION, false ); wp_enqueue_script( 'ultimate-custom' ); } elseif ( 'no_bg' != $ult_parallax_settings['bg_type'] && ( '' == $ult_parallax_settings['parallax_content'] || '' == $ult_parallax_settings['fadeout_row'] ) ) { wp_enqueue_script( 'ultimate-appear' ); wp_enqueue_script( 'ultimate-row-bg', $js_path . 'ultimate_bg' . $ext . '.js', null, ULTIMATE_VERSION, false ); wp_enqueue_script( 'ultimate-custom' ); } endif; $html = ''; $autoplay = ''; $muted = ''; $loop = ''; $pos_suffix = ''; $bg_img = ''; $bg_img_id = ''; $icon_inline = ''; $commom_data_attributes = ''; $vc_version = ''; $ultimate_custom_vc_row = get_option( 'ultimate_custom_vc_row' ); $ultimate_theme_support = get_option( 'ultimate_theme_support' ); if ( defined( 'WPB_VC_VERSION' ) ) { $vc_version = WPB_VC_VERSION; } $is_vc_4_4 = ( version_compare( $vc_version, '4.4', '<' ) ) ? true : false; $commom_data_attributes .= ' data-custom-vc-row="' . esc_attr( $ultimate_custom_vc_row ) . '" '; $commom_data_attributes .= ' data-vc="' . esc_attr( $vc_version ) . '" '; $commom_data_attributes .= ' data-is_old_vc="' . esc_attr( $is_vc_4_4 ) . '" '; $commom_data_attributes .= ' data-theme-support="' . esc_attr( $ultimate_theme_support ) . '" '; $ult_parallax_settings['disable_on_mobile'] = 'true'; if ( 'off' == $ult_parallax_settings['disable_on_mobile_img_parallax'] || '' == $ult_parallax_settings['disable_on_mobile_img_parallax'] ) { $ult_parallax_settings['disable_on_mobile_img_parallax'] = 'true'; } else { $ult_parallax_settings['disable_on_mobile_img_parallax'] = 'false'; } // for overlay. if ( 'enable_overlay_value' == $ult_parallax_settings['enable_overlay'] ) { if ( 'transperant' != $ult_parallax_settings['overlay_pattern'] && '' != $ult_parallax_settings['overlay_pattern'] ) { $pattern_url = UAVC_URL . 'assets/images/patterns/' . $ult_parallax_settings['overlay_pattern']; } else { $pattern_url = ''; } if ( preg_match( '/^#[a-f0-9]{6}$/i', $ult_parallax_settings['overlay_color'] ) ) { // hex color is valid. $ult_parallax_settings['overlay_color'] = hex2rgbUltParallax( $ult_parallax_settings['overlay_color'], $opacity = 0.2 ); } if ( strpos( $ult_parallax_settings['overlay_pattern_opacity'], '.' ) === false ) { $ult_parallax_settings['overlay_pattern_opacity'] = $ult_parallax_settings['overlay_pattern_opacity'] / 100; } $overlay = ' data-overlay="true" data-overlay-color="' . esc_attr( $ult_parallax_settings['overlay_color'] ) . '" data-overlay-pattern="' . esc_attr( $pattern_url ) . '" data-overlay-pattern-opacity="' . esc_attr( $ult_parallax_settings['overlay_pattern_opacity'] ) . '" data-overlay-pattern-size="' . esc_attr( $ult_parallax_settings['overlay_pattern_size'] ) . '" data-overlay-pattern-attachment="' . esc_attr( $ult_parallax_settings['overlay_pattern_attachment'] ) . '" '; if ( 'uvc-multi-color-bg' == $ult_parallax_settings['multi_color_overlay'] ) { $ult_parallax_settings['multi_color_overlay_opacity'] = $ult_parallax_settings['multi_color_overlay_opacity'] / 100; $overlay .= ' data-multi-color-overlay="' . esc_attr( $ult_parallax_settings['multi_color_overlay'] ) . '" data-multi-color-overlay-opacity="' . esc_attr( $ult_parallax_settings['multi_color_overlay_opacity'] ) . '" '; } } else { $overlay = ' data-overlay="false" data-overlay-color="" data-overlay-pattern="" data-overlay-pattern-opacity="" data-overlay-pattern-size="" '; } // for seperator. if ( 'seperator_enable_value' == $ult_parallax_settings['seperator_enable'] ) { $seperator_bottom_html = ' data-seperator="true" '; $seperator_bottom_html .= ' data-seperator-type="' . esc_attr( $ult_parallax_settings['seperator_type'] ) . '" '; $seperator_bottom_html .= ' data-seperator-shape-size="' . esc_attr( $ult_parallax_settings['seperator_shape_size'] ) . '" '; $seperator_bottom_html .= ' data-seperator-svg-height="' . esc_attr( $ult_parallax_settings['seperator_svg_height'] ) . '" '; $seperator_bottom_html .= ' data-seperator-full-width="true"'; $seperator_bottom_html .= ' data-seperator-position="' . esc_attr( $ult_parallax_settings['seperator_position'] ) . '" '; if ( '' != $ult_parallax_settings['seperator_shape_background'] ) { if ( 'multi_triangle_seperator' == $ult_parallax_settings['seperator_type'] ) { preg_match( '/\(([^)]+)\)/', $ult_parallax_settings['seperator_shape_background'], $output_temp ); if ( isset( $output_temp[1] ) ) { $rgba = explode( ',', $output_temp[1] ); $ult_parallax_settings['seperator_shape_background'] = rgbaToHexUltimate( $rgba[0], $rgba[1], $rgba[2] ); } } $seperator_bottom_html .= ' data-seperator-background-color="' . esc_attr( $ult_parallax_settings['seperator_shape_background'] ) . '" '; } if ( 'none' != $ult_parallax_settings['seperator_shape_border'] ) { $seperator_bottom_html .= ' data-seperator-border="' . esc_attr( $ult_parallax_settings['seperator_shape_border'] ) . '" '; $bwidth = ( '' == $ult_parallax_settings['seperator_shape_border_width'] ) ? '1' : $ult_parallax_settings['seperator_shape_border_width']; $seperator_bottom_html .= ' data-seperator-border-width="' . esc_attr( $bwidth ) . '" '; $seperator_bottom_html .= ' data-seperator-border-color="' . esc_attr( $ult_parallax_settings['seperator_shape_border_color'] ) . '" '; } if ( 'no_icon' != $ult_parallax_settings['icon_type'] ) { $icon_animation = ''; $alignment = 'center'; $icon_inline = do_shortcode( '[just_icon icon_align="' . esc_attr( $alignment ) . '" icon_type="' . esc_attr( $ult_parallax_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_parallax_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_parallax_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_parallax_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_parallax_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_parallax_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_parallax_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_parallax_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_parallax_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_parallax_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_parallax_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_parallax_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_parallax_settings['icon_border_spacing'] ) . '" icon_animation="' . esc_attr( $icon_animation ) . '"]' ); } $seperator_bottom_html .= ' data-icon="' . htmlentities( $icon_inline ) . '" '; // @codingStandardsIgnoreLine. } $seperator_html = $seperator_top_html . ' ' . $seperator_bottom_html; // for hide row. $device_message = ''; $ult_hide_row_data = ''; if ( 'ult_hide_row_value' == $ult_parallax_settings['ult_hide_row'] ) { if ( 'large_screen' == $ult_parallax_settings['ult_hide_row_large_screen'] ) { $ult_hide_row_data .= ' uvc_hidden-lg '; } if ( 'desktop' == $ult_parallax_settings['ult_hide_row_desktop'] ) { $ult_hide_row_data .= ' uvc_hidden-ml '; } if ( 'tablet' == $ult_parallax_settings['ult_hide_row_tablet'] ) { $ult_hide_row_data .= ' uvc_hidden-md '; } if ( 'xs_tablet' == $ult_parallax_settings['ult_hide_row_tablet_small'] ) { $ult_hide_row_data .= ' uvc_hidden-sm '; } if ( 'mobile' == $ult_parallax_settings['ult_hide_row_mobile'] ) { $ult_hide_row_data .= ' uvc_hidden-xs '; } if ( 'xl_mobile' == $ult_parallax_settings['ult_hide_row_mobile_large'] ) { $ult_hide_row_data .= ' uvc_hidden-xsl '; } if ( '' != $ult_hide_row_data ) { $ult_hide_row_data = ' data-hide-row="' . esc_attr( $ult_hide_row_data ) . '" '; } } // RTL. $rtl = 'false'; if ( is_rtl() ) { $rtl = 'true'; } if ( 'false' === $rtl || false === $rtl ) { $ultimate_rtl_support = get_option( 'ultimate_rtl_support' ); if ( 'enable' == $ultimate_rtl_support ) { $rtl = 'true'; } } $output = ''; if ( '' != $ult_parallax_settings['bg_image_new'] ) { $bg_img_id = $ult_parallax_settings['bg_image_new']; } elseif ( '' != $ult_parallax_settings['bg_image'] ) { $bg_img_id = $ult_parallax_settings['bg_image']; } else { if ( '' !== $ult_parallax_settings['css'] ) { $arr = explode( '?id=', $ult_parallax_settings['css'] ); if ( isset( $arr[1] ) ) { $arr = explode( ')', $arr[1] ); $bg_img_id = $arr[0]; } } } if ( '' != $ult_parallax_settings['bg_image_posiiton'] ) { if ( strpos( $ult_parallax_settings['bg_image_posiiton'], 'px' ) ) { $pos_suffix = 'px'; } elseif ( strpos( $ult_parallax_settings['bg_image_posiiton'], 'em' ) ) { $pos_suffix = 'em'; } else { $pos_suffix = '%'; } } if ( 'no_bg' == $ult_parallax_settings['bg_type'] ) { // @codingStandardsIgnoreLine. } elseif ( 'image' == $ult_parallax_settings['bg_type'] ) { if ( 'cstm' == $ult_parallax_settings['bg_image_size'] ) { if ( '' != $ult_parallax_settings['bg_cstm_size'] ) { $ult_parallax_settings['bg_image_size'] = $ult_parallax_settings['bg_cstm_size']; } } if ( 'vcpb-fs-jquery' == $ult_parallax_settings['parallax_style'] || 'vcpb-mlvp-jquery' == $ult_parallax_settings['parallax_style'] ) { if ( 'vcpb-fs-jquery' == $ult_parallax_settings['parallax_style'] ) { wp_enqueue_script( 'jquery.shake', $js_path . 'jparallax' . $ext . '.js', null, ULTIMATE_VERSION, false ); } if ( 'vcpb-mlvp-jquery' == $ult_parallax_settings['parallax_style'] ) { wp_enqueue_script( 'jquery.vhparallax', $js_path . 'vhparallax' . $ext . '.js', null, ULTIMATE_VERSION, false ); } $imgs = explode( ',', $ult_parallax_settings['layer_image'] ); $ult_parallax_settings['layer_image'] = array(); foreach ( $imgs as $value ) { $ult_parallax_settings['layer_image'][] = wp_get_attachment_image_src( $value, 'full' ); } foreach ( $ult_parallax_settings['layer_image'] as $key => $value ) { $bg_imgs[] = $ult_parallax_settings['layer_image'][ $key ][0]; } $html .= '
'; } else { if ( 'vcpb-vz-jquery' == $ult_parallax_settings['parallax_style'] || 'vcpb-hz-jquery' == $ult_parallax_settings['parallax_style'] ) { wp_enqueue_script( 'jquery.vhparallax', $js_path . 'vhparallax' . $ext . '.js', null, ULTIMATE_VERSION, false ); } if ( $bg_img_id ) { if ( '' == $ult_parallax_settings['animation_direction'] && 'false' != $ult_parallax_settings['animation_type'] ) { if ( 'h' == $ult_parallax_settings['animation_type'] ) { $animation = $ult_parallax_settings['horizontal_animation']; } else { $animation = $ult_parallax_settings['vertical_animation']; } } else { if ( 'top-animation' == $ult_parallax_settings['animation_direction'] || 'bottom-animation' == $ult_parallax_settings['animation_direction'] ) { $ult_parallax_settings['animation_type'] = 'v'; } else { $ult_parallax_settings['animation_type'] = 'h'; } $animation = $ult_parallax_settings['animation_direction']; if ( '' == $animation ) { $animation = 'left-animation'; } } $bg_img = apply_filters( 'ult_get_img_single', $bg_img_id, 'url' ); $html .= '
'; } } } elseif ( 'video' == $ult_parallax_settings['bg_type'] ) { $v_opts = explode( ',', $ult_parallax_settings['video_opts'] ); if ( is_array( $v_opts ) ) { foreach ( $v_opts as $opt ) { if ( 'muted' == $opt ) { $muted .= $opt; } if ( 'autoplay' == $opt ) { $autoplay .= $opt; } if ( 'loop' == $opt ) { $loop .= $opt; } } } if ( 'viewport_play' == $ult_parallax_settings['viewport_vdo'] ) { $enable_viewport_vdo = 'true'; } else { $enable_viewport_vdo = 'false'; } $video_fixer_option = get_option( 'ultimate_video_fixer' ); if ( $video_fixer_option ) { if ( 'enable' == $video_fixer_option ) { $ult_parallax_settings['video_fixer'] = 'false'; } } $ult_parallax_settings['u_stop_time'] = ( '' != $ult_parallax_settings['u_stop_time'] ) ? $ult_parallax_settings['u_stop_time'] : 0; $ult_parallax_settings['u_start_time'] = ( '' != $ult_parallax_settings['u_stop_time'] ) ? $ult_parallax_settings['u_start_time'] : 0; $v_img = apply_filters( 'ult_get_img_single', $ult_parallax_settings['video_poster'], 'url' ); $html .= '
'; if ( 'display_control' == $ult_parallax_settings['enable_controls'] ) { wp_enqueue_style( 'ultimate-vidcons', UAVC_URL . 'assets/fonts/vidcons.css', null, ULTIMATE_VERSION ); } } elseif ( 'u_iframe' == $ult_parallax_settings['bg_type'] ) { wp_enqueue_script( 'jquery.ytplayer', $js_path . 'mb-YTPlayer' . $ext . '.js', null, ULTIMATE_VERSION, false ); $v_opts = explode( ',', $ult_parallax_settings['video_opts'] ); $v_img = apply_filters( 'ult_get_img_single', $ult_parallax_settings['video_poster'], 'url' ); if ( is_array( $v_opts ) ) { foreach ( $v_opts as $opt ) { if ( 'muted' == $opt ) { $muted .= $opt; } if ( 'autoplay' == $opt ) { $autoplay .= $opt; } if ( 'loop' == $opt ) { $loop .= $opt; } } } if ( 'viewport_play' === $ult_parallax_settings['viewport_vdo'] ) { $enable_viewport_vdo = 'true'; } else { $enable_viewport_vdo = 'false'; } $video_fixer_option = get_option( 'ultimate_video_fixer' ); if ( $video_fixer_option ) { if ( 'enable' == $video_fixer_option ) { $ult_parallax_settings['video_fixer'] = 'false'; } } $html .= '
'; } elseif ( 'grad' == $ult_parallax_settings['bg_type'] ) { $html .= '
'; } elseif ( 'bg_color' == $ult_parallax_settings['bg_type'] ) { $html .= '
'; } $output .= $html; if ( 'no_bg' == $ult_parallax_settings['bg_type'] ) { return ''; } else { self::front_scripts(); return $output; } } } /* end parallax_shortcode */ /** * Initialize the parallax. * * @since ---- * @access public */ public function parallax_init() { $group_name = 'Background'; $group_effects = 'Effect'; if ( function_exists( 'vc_remove_param' ) ) { vc_remove_param( 'vc_row', 'bg_image_repeat' ); } $pluginname = dirname( dirname( plugin_basename( __FILE__ ) ) ); $patterns_path = realpath( dirname( plugin_dir_path( __FILE__ ) ) . '/assets/images/patterns' ); $patterns_list = glob( $patterns_path . '/*.*' ); $patterns = array(); foreach ( $patterns_list as $pattern ) { $patterns[ basename( $pattern ) ] = UAVC_URL . '/assets/images/patterns/' . basename( $pattern ); } if ( function_exists( 'vc_add_param' ) ) { vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'admin_label' => true, 'heading' => __( 'Background Style', 'ultimate_vc' ), 'param_name' => 'bg_type', 'value' => array( __( 'Default', 'ultimate_vc' ) => '', __( 'Single Color', 'ultimate_vc' ) => 'bg_color', __( 'Gradient Color', 'ultimate_vc' ) => 'grad', __( 'Image / Parallax', 'ultimate_vc' ) => 'image', __( 'YouTube Video', 'ultimate_vc' ) => 'u_iframe', __( 'Hosted Video', 'ultimate_vc' ) => 'video', ), 'description' => __( 'Select the kind of background would you like to set for this row.', 'ultimate_vc' ) . ' ' . __( 'Not sure?', 'ultimate_vc' ) . ' ' . __( 'See Narrated', 'ultimate_vc' ) . " " . __( 'Video Tutorials', 'ultimate_vc' ) . '', 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'gradient', 'class' => '', 'heading' => __( 'Gradient Type', 'ultimate_vc' ), 'param_name' => 'bg_grad', 'description' => __( 'At least two color points should be selected.', 'ultimate_vc' ) . ' ' . __( 'Video Tutorial', 'ultimate_vc' ) . '', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'grad' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'bg_color_value', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'bg_color' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Parallax Style', 'ultimate_vc' ), 'param_name' => 'parallax_style', 'value' => array( __( 'No Parallax', 'ultimate_vc' ) => '', __( 'Simple Background Image', 'ultimate_vc' ) => 'vcpb-default', __( 'Auto Moving Background', 'ultimate_vc' ) => 'vcpb-animated', __( 'Vertical Parallax On Scroll', 'ultimate_vc' ) => 'vcpb-vz-jquery', __( 'Horizontal Parallax On Scroll', 'ultimate_vc' ) => 'vcpb-hz-jquery', __( 'Interactive Parallax On Mouse Hover', 'ultimate_vc' ) => 'vcpb-fs-jquery', __( 'Multilayer Vertical Parallax', 'ultimate_vc' ) => 'vcpb-mlvp-jquery', ), 'description' => __( 'Select the kind of style you like for the background.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'image' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Background Image', 'ultimate_vc' ), 'param_name' => 'bg_image_new', 'value' => '', 'description' => __( 'Upload or select background image from media gallery.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-default', 'vcpb-animated', 'vcpb-vz-jquery', 'vcpb-hz-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'attach_images', 'class' => '', 'heading' => __( 'Layer Images', 'ultimate_vc' ), 'param_name' => 'layer_image', 'value' => '', 'description' => __( 'Upload or select background images from media gallery.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-fs-jquery', 'vcpb-mlvp-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Background Image Repeat', 'ultimate_vc' ), 'param_name' => 'bg_image_repeat', 'value' => array( __( 'Repeat', 'ultimate_vc' ) => '', __( 'Repeat X', 'ultimate_vc' ) => 'repeat-x', __( 'Repeat Y', 'ultimate_vc' ) => 'repeat-y', __( 'No Repeat', 'ultimate_vc' ) => 'no-repeat', ), 'description' => __( 'Options to control repeatation of the background image.', 'ultimate_vc' ) . ' ' . __( 'Learn on', 'ultimate_vc' ) . " " . __( 'W3School', 'ultimate_vc' ) . '', 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-default', 'vcpb-fix', 'vcpb-vz-jquery', 'vcpb-hz-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Background Image Size', 'ultimate_vc' ), 'param_name' => 'bg_image_size', 'value' => array( __( 'Cover - Image to be as large as possible', 'ultimate_vc' ) => '', __( 'Contain - Image will try to fit inside the container area', 'ultimate_vc' ) => 'contain', __( 'Initial', 'ultimate_vc' ) => 'initial', ), 'description' => __( 'Options to control repeatation of the background image.', 'ultimate_vc' ) . ' ' . __( 'Learn on', 'ultimate_vc' ) . " " . __( 'W3School', 'ultimate_vc' ) . '', 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-default', 'vcpb-animated', 'vcpb-fix', 'vcpb-vz-jquery', 'vcpb-hz-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom Background Image Size', 'ultimate_vc' ), 'param_name' => 'bg_cstm_size', 'value' => '', 'description' => __( 'You can use initial, inherit or any number with px, em, %, etc. Example- 100px 100px', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_image_size', 'value' => array( 'cstm' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Scroll Effect', 'ultimate_vc' ), 'param_name' => 'bg_img_attach', 'value' => array( __( 'Move with the content', 'ultimate_vc' ) => '', __( 'Fixed at its position', 'ultimate_vc' ) => 'fixed', ), 'description' => __( 'Options to set whether a background image is fixed or scroll with the rest of the page.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-default', 'vcpb-animated', 'vcpb-hz-jquery', 'vcpb-vz-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Parallax Speed', 'ultimate_vc' ), 'param_name' => 'parallax_sense', 'value' => '', 'max' => '100', 'description' => __( 'Control speed of parallax. Enter value between 1 to 100 (Default 30)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-vz-jquery', 'vcpb-animated', 'vcpb-hz-jquery', 'vcpb-vs-jquery', 'vcpb-hs-jquery', 'vcpb-fs-jquery', 'vcpb-mlvp-jquery' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Background Image Posiiton', 'ultimate_vc' ), 'param_name' => 'bg_image_posiiton', 'value' => '', 'description' => __( 'You can use any number with px, em, %, etc. Example- 100px 100px.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-default', 'vcpb-fix' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation Direction', 'ultimate_vc' ), 'param_name' => 'animation_direction', 'value' => array( __( 'Left to Right', 'ultimate_vc' ) => '', __( 'Right to Left', 'ultimate_vc' ) => 'right-animation', __( 'Top to Bottom', 'ultimate_vc' ) => 'top-animation', __( 'Bottom to Top', 'ultimate_vc' ) => 'bottom-animation', ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-animated' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Background Repeat', 'ultimate_vc' ), 'param_name' => 'animation_repeat', 'value' => array( __( 'Repeat', 'ultimate_vc' ) => '', __( 'Repeat X', 'ultimate_vc' ) => 'repeat-x', __( 'Repeat Y', 'ultimate_vc' ) => 'repeat-y', ), 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-animated' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Link to the video in MP4 Format', 'ultimate_vc' ), 'param_name' => 'video_url', 'value' => '', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Link to the video in WebM / Ogg Format', 'ultimate_vc' ), 'param_name' => 'video_url_2', 'value' => '', 'description' => __( 'IE, Chrome & Safari', 'ultimate_vc' ) . " " . __( 'support', 'ultimate_vc' ) . ' ' . __( 'MP4 format, while Firefox & Opera prefer WebM / Ogg formats.', 'ultimate_vc' ) . ' ' . __( 'You can upload the video through', 'ultimate_vc' ) . " " . __( 'WordPress Media Library', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Enter YouTube URL of the Video', 'ultimate_vc' ), 'param_name' => 'u_video_url', 'value' => '', 'description' => __( 'Enter YouTube url. Example - YouTube (https://www.youtube.com/watch?v=tSqJIIcxKZM) ', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'checkbox', 'class' => '', 'heading' => __( 'Extra Options', 'ultimate_vc' ), 'param_name' => 'video_opts', 'value' => array( __( 'Loop', 'ultimate_vc' ) => 'loop', __( 'Muted', 'ultimate_vc' ) => 'muted', ), 'description' => __( 'Muted autoplay is always allowed in chrome.', 'upb_parallax' ) . " " . __( 'Refer this link', 'upb_parallax' ) . '.', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video', 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Placeholder Image', 'ultimate_vc' ), 'param_name' => 'video_poster', 'value' => '', 'description' => __( 'Placeholder image is displayed in case background videos are restricted (Ex - on iOS devices).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video', 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Start Time', 'ultimate_vc' ), 'param_name' => 'u_start_time', 'value' => '', 'suffix' => 'seconds', 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Stop Time', 'ultimate_vc' ), 'param_name' => 'u_stop_time', 'value' => '', 'suffix' => 'seconds', 'description' => __( 'You may start / stop the video at any point you would like.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Play video only when in viewport', 'ultimate_vc' ), 'param_name' => 'viewport_vdo', 'value' => '', 'options' => array( 'viewport_play' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'Video will be played only when user is on the particular screen position. Once user scroll away, the video will pause.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video', 'u_iframe' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Display Controls', 'ultimate_vc' ), 'param_name' => 'enable_controls', 'value' => '', 'options' => array( 'display_control' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'Display play / pause controls for the video on bottom right position.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'video' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color of Controls Icon', 'ultimate_vc' ), 'param_name' => 'controls_color', 'description' => __( 'Display play / pause controls for the video on bottom right position.', 'upb_parallax' ), 'dependency' => array( 'element' => 'enable_controls', 'value' => array( 'display_control' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Background Override (Read Description)', 'ultimate_vc' ), 'param_name' => 'bg_override', 'value' => array( __( 'Default Width', 'ultimate_vc' ) => '', __( "Apply 1st parent element's width", 'ultimate_vc' ) => '1', __( "Apply 2nd parent element's width", 'ultimate_vc' ) => '2', __( "Apply 3rd parent element's width", 'ultimate_vc' ) => '3', __( "Apply 4th parent element's width", 'ultimate_vc' ) => '4', __( "Apply 5th parent element's width", 'ultimate_vc' ) => '5', __( "Apply 6th parent element's width", 'ultimate_vc' ) => '6', __( "Apply 7th parent element's width", 'ultimate_vc' ) => '7', __( "Apply 8th parent element's width", 'ultimate_vc' ) => '8', __( "Apply 9th parent element's width", 'ultimate_vc' ) => '9', __( 'Full Width', 'ultimate_vc' ) => 'full', __( 'Maximum Full Width', 'ultimate_vc' ) => 'ex-full', __( 'Browser Full Dimension', 'ultimate_vc' ) => 'browser_size', ), 'description' => __( "By default, the background will be given to the WPBakery Page Builder row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output..", 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => array( 'u_iframe', 'image', 'video', 'grad', 'bg_color', 'animated' ), ), 'group' => $group_name, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Activate on Mobile', 'ultimate_vc' ), 'param_name' => 'disable_on_mobile_img_parallax', 'value' => '', 'options' => array( 'disable_on_mobile_img_parallax_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_name, 'dependency' => array( 'element' => 'parallax_style', 'value' => array( 'vcpb-animated', 'vcpb-vz-jquery', 'vcpb-hz-jquery', 'vcpb-fs-jquery', 'vcpb-mlvp-jquery' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Easy Parallax', 'ultimate_vc' ), 'param_name' => 'parallax_content', 'value' => '', 'options' => array( 'parallax_content_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12', 'description' => __( 'If enabled, the elements inside row - will move slowly as user scrolls.', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Parallax Speed', 'ultimate_vc' ), 'param_name' => 'parallax_content_sense', 'value' => '', 'group' => $group_effects, 'description' => __( 'Enter value between 0 to 100 (Default 30)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'parallax_content', 'value' => array( 'parallax_content_value' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Fade Effect on Scroll', 'ultimate_vc' ), 'param_name' => 'fadeout_row', 'value' => '', 'options' => array( 'fadeout_row_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12', 'description' => __( 'If enabled, the the content inside row will fade out slowly as user scrolls down.', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Viewport Position', 'ultimate_vc' ), 'param_name' => 'fadeout_start_effect', 'suffix' => '%', 'value' => '', 'group' => $group_effects, 'description' => __( 'The area of screen from top where fade out effect will take effect once the row is completely inside that area. (Default 30)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'fadeout_row', 'value' => array( 'fadeout_row_value' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => __( 'Enable Overlay', 'ultimate_vc' ), 'param_name' => 'enable_overlay', 'value' => '', 'options' => array( 'enable_overlay_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12', 'group' => $group_effects, ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'overlay_color', 'value' => '', 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), 'description' => __( 'Select RGBA values or opacity will be set to 20% by default.', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'radio_image_box', 'heading' => __( 'Pattern', 'ultimate_vc' ), 'param_name' => 'overlay_pattern', 'value' => '', 'options' => $patterns, 'css' => array( 'width' => '40px', 'height' => '35px', 'background-repeat' => 'repeat', 'background-size' => 'cover', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Pattern Opacity', 'ultimate_vc' ), 'param_name' => 'overlay_pattern_opacity', 'value' => '', 'max' => '100', 'suffix' => '%', 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), 'description' => __( 'Enter value between 0 to 100 (0 is maximum transparency, while 100 is minimum & default is 80)', 'ultimate_vc' ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Pattern Size', 'ultimate_vc' ), 'param_name' => 'overlay_pattern_size', 'value' => '', 'suffix' => 'px', 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), 'description' => __( 'This is optional; sets the size of the pattern image manually.', 'ultimate_vc' ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'heading' => __( 'Pattern Scroll Effect', 'ultimate_vc' ), 'param_name' => 'overlay_pattern_attachment', 'value' => array( __( 'Move with the Content', 'ultimate_vc' ) => '', __( 'Fixed at its position', 'ultimate_vc' ) => 'fixed', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'checkbox', 'heading' => __( 'Fancy Multi Color Overlay', 'ultimate_vc' ), 'param_name' => 'multi_color_overlay', 'value' => array( __( 'Enable', 'ultimate_vc' ) => 'uvc-multi-color-bg', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'enable_overlay', 'value' => array( 'enable_overlay_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4 clear', ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Multi Color Overlay Opacity', 'ultimate_vc' ), 'param_name' => 'multi_color_overlay_opacity', 'value' => '', 'suffix' => '%', 'group' => $group_effects, 'dependency' => array( 'element' => 'multi_color_overlay', 'value' => array( 'uvc-multi-color-bg' ), ), 'edit_field_class' => 'vc_column vc_col-sm-8', 'description' => __( 'Default 60', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => __( 'Separator ', 'ultimate_vc' ), 'param_name' => 'seperator_enable', 'value' => '', 'options' => array( 'seperator_enable_value' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12', 'group' => $group_effects, ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'heading' => __( 'Type', 'ultimate_vc' ), 'param_name' => 'seperator_type', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Triangle', 'ultimate_vc' ) => 'triangle_svg_seperator', __( 'Big Triangle', 'ultimate_vc' ) => 'xlarge_triangle_seperator', __( 'Big Triangle Left', 'ultimate_vc' ) => 'xlarge_triangle_left_seperator', __( 'Big Triangle Right', 'ultimate_vc' ) => 'xlarge_triangle_right_seperator', __( 'Half Circle', 'ultimate_vc' ) => 'circle_svg_seperator', __( 'Curve Center', 'ultimate_vc' ) => 'xlarge_circle_seperator', __( 'Curve Left', 'ultimate_vc' ) => 'curve_up_seperator', __( 'Curve Right', 'ultimate_vc' ) => 'curve_down_seperator', __( 'Tilt Left', 'ultimate_vc' ) => 'tilt_left_seperator', __( 'Tilt Right', 'ultimate_vc' ) => 'tilt_right_seperator', __( 'Round Split', 'ultimate_vc' ) => 'round_split_seperator', __( 'Waves', 'ultimate_vc' ) => 'waves_seperator', __( 'Clouds', 'ultimate_vc' ) => 'clouds_seperator', __( 'Multi Triangle', 'ultimate_vc' ) => 'multi_triangle_seperator', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_enable', 'value' => array( 'seperator_enable_value' ), ), 'edit_field_class' => 'uvc-divider-content-first vc_column vc_col-sm-12', ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'heading' => __( 'Position', 'ultimate_vc' ), 'param_name' => 'seperator_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => 'bottom_seperator', __( 'Top & Bottom', 'ultimate_vc' ) => 'top_bottom_seperator', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_enable', 'value' => array( 'seperator_enable_value' ), ), 'edit_field_class' => 'uvc-divider-content-first vc_column vc_col-sm-12', ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Size', 'ultimate_vc' ), 'param_name' => 'seperator_shape_size', 'value' => '', 'suffix' => 'px', 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'triangle_seperator', 'circle_seperator', 'round_split_seperator' ), ), 'description' => __( 'Default 40', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Height', 'ultimate_vc' ), 'param_name' => 'seperator_svg_height', 'value' => '', 'suffix' => 'px', 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'xlarge_triangle_seperator', 'curve_up_seperator', 'curve_down_seperator', 'waves_seperator', 'clouds_seperator', 'xlarge_circle_seperator', 'triangle_svg_seperator', 'circle_svg_seperator', 'xlarge_triangle_left_seperator', 'xlarge_triangle_right_seperator', 'tilt_left_seperator', 'tilt_right_seperator', 'multi_triangle_seperator' ), ), 'description' => __( 'Default 60', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'heading' => __( 'Background', 'ultimate_vc' ), 'param_name' => 'seperator_shape_background', 'value' => '', 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'xlarge_triangle_seperator', 'triangle_seperator', 'circle_seperator', 'curve_up_seperator', 'curve_down_seperator', 'round_split_seperator', 'waves_seperator', 'clouds_seperator', 'xlarge_circle_seperator', 'triangle_svg_seperator', 'circle_svg_seperator', 'xlarge_triangle_left_seperator', 'xlarge_triangle_right_seperator', 'tilt_left_seperator', 'tilt_right_seperator', 'multi_triangle_seperator' ), ), 'description' => __( 'Mostly, this should be background color of your adjacent row section. (Default - White)', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'heading' => __( 'Border', 'ultimate_vc' ), 'param_name' => 'seperator_shape_border', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Dashed', 'ultimate_vc' ) => 'dashed', ), 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'triangle_seperator', 'circle_seperator', 'round_split_seperator' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'seperator_shape_border_color', 'value' => '', 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'triangle_seperator', 'circle_seperator', 'round_split_seperator' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'seperator_shape_border_width', 'value' => '', 'suffix' => 'px', 'group' => $group_effects, 'dependency' => array( 'element' => 'seperator_type', 'value' => array( 'triangle_seperator', 'circle_seperator', 'round_split_seperator' ), ), 'edit_field_class' => 'uvc-divider-content-last vc_column vc_col-sm-12', 'description' => __( 'Default 1px', 'ultimate_vc' ), ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'group' => $group_effects, 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'seperator_enable', 'value' => array( 'seperator_enable_value' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'group' => $group_effects, 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => '', 'max' => 72, 'suffix' => 'px', 'group' => $group_effects, 'description' => __( 'How big would you like it? (Default 32)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'group' => $group_effects, 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => '', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'group' => $group_effects, 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'group' => $group_effects, 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'group' => $group_effects, 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '', 'group' => $group_effects, 'description' => __( 'Select border color for icon. (Default - #333333)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => '', 'max' => 10, 'suffix' => 'px', 'group' => $group_effects, 'description' => __( 'Thickness of the border. (Default - 1px)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => '', 'max' => 500, 'suffix' => 'px', 'group' => $group_effects, 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (Default 500).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => '', 'max' => 500, 'suffix' => 'px', 'group' => $group_effects, 'description' => __( 'Spacing from center of the icon till the boundary of border / background (Default - 50)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'group' => $group_effects, 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => '', 'max' => 512, 'suffix' => 'px', 'group' => $group_effects, 'description' => __( 'Provide image width (Default - 48)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => __( 'Hide Row', 'ultimate_vc' ), 'param_name' => 'ult_hide_row', 'value' => '', 'options' => array( 'ult_hide_row_value' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12', 'group' => $group_effects, ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Large Screen', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_large_screen', 'value' => '', 'options' => array( 'large_screen' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Desktop', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_desktop', 'value' => '', 'options' => array( 'desktop' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Tablet', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_tablet', 'value' => '', 'options' => array( 'tablet' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Tablet Portrait', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_tablet_small', 'value' => '', 'options' => array( 'xs_tablet' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Mobile', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_mobile', 'value' => '', 'options' => array( 'mobile' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_switch', 'heading' => ' ' . __( 'Mobile Landscape', 'ultimate_vc' ), 'param_name' => 'ult_hide_row_mobile_large', 'value' => '', 'options' => array( 'xl_mobile' => array( 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => $group_effects, 'dependency' => array( 'element' => 'ult_hide_row', 'value' => array( 'ult_hide_row_value' ), ), 'edit_field_class' => 'vc_column vc_col-sm-4', ) ); vc_add_param( 'vc_row', array( 'type' => 'ult_param_heading', 'text' => __( 'In order for Effects below to work, you must select something except "default" in background tab.', 'ultimate_vc' ) . ' ' . __( 'May be single color.' ) . '
' . __( 'Screenshot', 'ultimate_vc' ) . ' - https://cloudup.com/cc1J8ZlcdZW', 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon vc_column vc_col-sm-12', 'group' => $group_effects, ) ); } } /* parallax_init*/ /** * Admin Scripts. * * @since ---- * @param mixed $hook hooks. * @access public */ public function admin_scripts( $hook ) { if ( 'post.php' == $hook || 'post-new.php' == $hook ) { wp_register_script( 'ult-colorpicker', UAVC_URL . 'admin/js/jquery-colorpicker.js ', array( 'jquery' ), ULTIMATE_VERSION, false ); wp_register_script( 'ult-classygradient', UAVC_URL . 'admin/js/jquery-classygradient-min.js', array( 'jquery' ), ULTIMATE_VERSION, false ); Ultimate_VC_Addons::ultimate_register_style( 'ult-classycolorpicker-style', UAVC_URL . 'admin/css/jquery-colorpicker.css', true ); Ultimate_VC_Addons::ultimate_register_style( 'ult-classygradient-style', UAVC_URL . 'admin/css/jquery-classygradient-min.css', true ); $bsf_dev_mode = bsf_get_option( 'dev_mode' ); if ( 'enable' === $bsf_dev_mode ) { wp_enqueue_script( 'ult-colorpicker' ); wp_enqueue_script( 'ult-classygradient' ); wp_enqueue_style( 'ult-classycolorpicker-style' ); wp_enqueue_style( 'ult-classygradient-style' ); } } }//end admin_scripts() /** * Initialize Font scrips. * * @since ---- * @access public */ public static function front_scripts() { $bsf_dev_mode = bsf_get_option( 'dev_mode' ); if ( 'enable' === $bsf_dev_mode ) { $js_path = '../assets/js/'; $css_path = '../assets/css/'; $ext = ''; } else { $js_path = '../assets/min-js/'; $css_path = '../assets/min-css/'; $ext = '.min'; } $ultimate_css = get_option( 'ultimate_css' ); if ( 'enable' != $ultimate_css || 'enable' === $bsf_dev_mode ) { Ultimate_VC_Addons::ultimate_register_style( 'ult-background-style', 'background-style' ); wp_enqueue_style( 'ult-background-style' ); } } /* end front_scripts */ } new VC_Ultimate_Parallax(); } $ultimate_row = get_option( 'ultimate_row' ); if ( ( defined( 'WPB_VC_VERSION' ) && ( ! version_compare( WPB_VC_VERSION, '4.4', '>=' ) ) ) && 'enable' == $ultimate_row ) { if ( ! function_exists( 'vc_theme_after_vc_row' ) ) { /** * For the animation in the module * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ function vc_theme_after_vc_row( $atts, $content = null ) { return VC_Ultimate_Parallax::parallax_shortcode( $atts, $content ); } } } if ( ! function_exists( 'hex2rgbUltParallax' ) ) { /** * Hex to Rgb * * @since ---- * @param mixed $hex hex number. * @param mixed $opacity color opacity. * @access public */ function hex2rgbUltParallax( $hex, $opacity ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $hex = str_replace( '#', '', $hex ); if ( preg_match( '/^([a-f0-9]{3}|[a-f0-9]{6})$/i', $hex ) ) : // check if input string is a valid hex colour code. if ( strlen( $hex ) == 3 ) { // three letters code. $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) ); $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) ); $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) ); } else { // six letters coode. $r = hexdec( substr( $hex, 0, 2 ) ); $g = hexdec( substr( $hex, 2, 2 ) ); $b = hexdec( substr( $hex, 4, 2 ) ); } return 'rgba(' . implode( ',', array( $r, $g, $b ) ) . ',' . $opacity . ')';// returns the rgb values separated by commas, ready for usage in a rgba( rr,gg,bb,aa ) CSS rule. else : return ''; // input string is not a valid hex color code - return a blank value; this can be changed to return a default colour code for example. endif; } } if ( ! function_exists( 'rgbaToHexUltimate' ) ) { /** * Rgba to Hex * * @since ---- * @param mixed $r red. * @param mixed $g green. * @param mixed $b blue. * @access public */ function rgbaToHexUltimate( $r, $g, $b ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $hex = '#'; $hex .= str_pad( dechex( $r ), 2, '0', STR_PAD_LEFT ); $hex .= str_pad( dechex( $g ), 2, '0', STR_PAD_LEFT ); $hex .= str_pad( dechex( $b ), 2, '0', STR_PAD_LEFT ); return $hex; } } ultimate_icon_manager.php000064400000076136150212230100011602 0ustar00assets_js = UAVC_URL . 'assets/js/'; $this->assets_css = UAVC_URL . 'assets/css/'; $this->admin_js = UAVC_URL . 'admin/js/'; $this->admin_css = UAVC_URL . 'admin/css/'; $this->paths = wp_upload_dir(); $this->paths['fonts'] = 'smile_fonts'; $this->paths['temp'] = trailingslashit( $this->paths['fonts'] ) . 'smile_temp'; $this->paths['fontdir'] = trailingslashit( $this->paths['basedir'] ) . $this->paths['fonts']; $this->paths['tempdir'] = trailingslashit( $this->paths['basedir'] ) . $this->paths['temp']; $this->paths['fonturl'] = set_url_scheme( trailingslashit( $this->paths['baseurl'] ) . $this->paths['fonts'] ); $this->paths['tempurl'] = trailingslashit( $this->paths['baseurl'] ) . trailingslashit( $this->paths['temp'] ); $this->paths['config'] = 'charmap.php'; $this->vc_fonts = trailingslashit( $this->paths['basedir'] ) . $this->paths['fonts'] . '/Defaults'; $this->vc_fonts_dir = plugin_dir_path( __FILE__ ) . '../assets/fonts/'; // font file extract by ajax function. add_action( 'wp_ajax_smile_ajax_add_zipped_font', array( $this, 'add_zipped_font' ) ); add_action( 'wp_ajax_smile_ajax_remove_zipped_font', array( $this, 'remove_zipped_font' ) ); if ( isset( $_GET['delete-bsf-fonts'] ) ) {// @codingStandardsIgnoreLine. $this->delete_all_fonts(); } $defaults = get_option( 'smile_fonts' ); if ( ! $defaults ) { add_action( 'admin_init', array( $this, 'AIO_move_fonts' ) ); } elseif ( ( isset( $defaults['Defaults'] ) && 'Array' == $defaults['Defaults'] ) ) { delete_option( 'smile_fonts' ); add_action( 'admin_init', array( $this, 'AIO_move_fonts' ) ); } } /** * Icon font manager. * * @since ---- * @param array $input_name icon input names. * @param mixed $icon icons. * @access public */ public function get_icon_manager( $input_name, $icon ) { $font_manager = self::get_font_manager( $id ); $output = '
'; $output .= ''; $output .= '
'; $output .= ''; $output .= $font_manager; return $output; } /** * Icon font manager menu. * * @since ---- * @access public */ public function icon_manager_menu() { $page = add_submenu_page( 'bsf-dashboard', __( 'Icon Manager', 'ultimate_vc' ), __( 'Icon Manager', 'ultimate_vc' ), 'administrator', 'font-icon-Manager', array( $this, 'icon_manager_dashboard' ) ); add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_scripts' ) ); } /** * Enqueue Scripts. * * @since ---- * @access public */ public function admin_scripts() { // enqueue js files on backend. wp_enqueue_script( 'aio-admin-media', $this->admin_js . 'admin-media.js', array( 'jquery' ), ULTIMATE_VERSION, false ); wp_enqueue_script( 'media-upload' ); wp_enqueue_media(); wp_enqueue_style( 'aio-icon-manager-admin', $this->admin_css . 'icon-manager-admin.css' );// @codingStandardsIgnoreLine. $fonts = get_option( 'smile_fonts' ); if ( is_array( $fonts ) ) { foreach ( $fonts as $font => $info ) { if ( strpos( $info['style'], 'http://' ) !== false ) { wp_enqueue_style( 'bsf-' . $font, $info['style'] );// @codingStandardsIgnoreLine. } else { wp_enqueue_style( 'bsf-' . $font, trailingslashit( $this->paths['fonturl'] ) . $info['style'] );// @codingStandardsIgnoreLine. } } } }//end admin_scripts() /** * Icon settings on dashboard. * * @since ---- * @access public */ public function icon_manager_dashboard() { ?>

 

'; $output .= ''; return $output; } /** * Generate Icon Set Preview and settings page. * * @since ---- * @access public */ public static function get_font_set() { $fonts = get_option( 'smile_fonts' ); $n = count( $fonts ); foreach ( $fonts as $font => $info ) { $icon_set = array(); $icons = array(); $upload_dir = wp_upload_dir(); $path = trailingslashit( $upload_dir['basedir'] ); $file = $path . $info['include'] . '/' . $info['config']; $output = '
'; $output .= '
'; include $file; if ( ! empty( $icons ) ) { $icon_set = array_merge( $icon_set, $icons ); } if ( ! empty( $icon_set ) ) { foreach ( $icon_set as $icons ) { $count = count( $icons ); } if ( 'smt' == $font || 'Defaults' == $font ) { $output .= '

' . __( 'Default Icons', 'smile' ) . ''; } else { $output .= '

' . esc_html( ucfirst( $font ) ) . ''; } $output .= '' . $count . ''; if ( 1 != $n ) { $output .= ''; } $output .= '

'; $output .= '
'; $output .= '
'; $output .= ''; $output .= '
'; $output .= '
'; $output .= '
'; echo $output;// @codingStandardsIgnoreLine. } } $script = ''; echo $script;// @codingStandardsIgnoreLine. } /** * Checks Refrence * * @since ---- * @access public */ public function add_zipped_font() { if ( ! current_user_can( 'manage_options' ) ) { return false; } // check if referer is ok. check_ajax_referer( 'smile-add-zipped-fonts-nonce', 'security' ); // check if capability is ok. $cap = apply_filters( 'avf_file_upload_capability', 'update_plugins' ); if ( ! current_user_can( $cap ) ) { die( esc_attr__( "Using this feature is reserved for Super Admins. You unfortunately don't have the necessary permissions.", 'ultimate_vc' ) ); } // get the file path of the zip file. $attachment = $_POST['values']; $path = realpath( get_attached_file( $attachment['id'] ) ); $unzipped = $this->zip_flatten( $path, array( '\.eot', '\.svg', '\.ttf', '\.woff', '\.json', '\.css' ) ); // if we were able to unzip the file and save it to our temp folder extract the svg file. if ( $unzipped ) { $this->create_config(); } // if we got no name for the font dont add it and delete the temp folder. if ( 'unknown' == $this->font_name ) { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'Was not able to retrieve the Font name from your Uploaded Folder', 'ultimate_vc' ) ); } die( esc_attr__( 'smile_font_added:', 'ultimate_vc' ) . $this->font_name );// @codingStandardsIgnoreLine. } /** * Fuction to remove font zip * * @since ---- * @access public */ public function remove_zipped_font() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'smile-remove-zipped-fonts-nonce', 'security' ); // get the file path of the zip file. $font = sanitize_text_field( $_POST['del_font'] ); $list = self::load_iconfont_list(); $delete = isset( $list[ $font ] ) ? $list[ $font ] : false; if ( $delete ) { $this->delete_folder( $delete['include'] ); $this->remove_font( $font ); die( esc_attr__( 'smile_font_removed', 'ultimate_vc' ) ); } die( esc_attr__( 'Was not able to remove Font', 'ultimate_vc' ) ); } /** * Extract the zip file to a flat folder and remove the files that are not needed * * @since ---- * @param mixed $zipfile zipfile. * @param mixed $filter filters. * @access public */ public function zip_flatten( $zipfile, $filter ) { @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );// @codingStandardsIgnoreLine. if ( is_dir( $this->paths['tempdir'] ) ) { $this->delete_folder( $this->paths['tempdir'] ); $tempdir = smile_backend_create_folder( $this->paths['tempdir'], false ); } else { $tempdir = smile_backend_create_folder( $this->paths['tempdir'], false ); } if ( ! $tempdir ) { die( esc_attr__( 'Wasn\'t able to create temp folder', 'ultimate_vc' ) ); } if ( class_exists( 'ZipArchive' ) ) { $zip = new ZipArchive(); if ( $zip->open( $zipfile ) ) { for ( $i = 0; $i < $zip->numFiles; $i ++ ) {// @codingStandardsIgnoreLine. $entry = $zip->getNameIndex( $i ); if ( ! empty( $filter ) ) { $delete = true; $matches = array(); foreach ( $filter as $regex ) { preg_match( '!' . $regex . '$!', $entry, $matches ); if ( ! empty( $matches ) ) { $delete = false; break; } } } if ( substr( $entry, - 1 ) == '/' || ! empty( $delete ) ) { continue; } // skip directories and non matching files. $fp = $zip->getStream( $entry ); $ofp = fopen( $this->paths['tempdir'] . '/' . basename( $entry ), 'w' );// @codingStandardsIgnoreLine. if ( ! $fp ) { die( esc_attr__( 'Unable to extract the file.', 'ultimate_vc' ) ); } while ( ! feof( $fp ) ) { fwrite( $ofp, fread( $fp, 8192 ) );// @codingStandardsIgnoreLine. } fclose( $fp );// @codingStandardsIgnoreLine. fclose( $ofp );// @codingStandardsIgnoreLine. } $zip->close(); } } else { die( esc_attr__( "Wasn't able to work with Zip Archive", 'ultimate_vc' ) ); } return true; } /** * Iterate over xml file and extract the glyphs for the font * * @since ---- * @access public */ public function create_config() { $this->json_file = $this->find_json(); $this->svg_file = $this->find_svg(); if ( empty( $this->json_file ) || empty( $this->svg_file ) ) { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'selection.json or SVG file not found. Was not able to create the necessary config files', 'ultimate_vc' ) ); } $json = ''; $response = ''; global $wp_filesystem; if ( empty( $wp_filesystem ) ) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } if ( file_exists( trailingslashit( $this->paths['tempdir'] ) . $this->svg_file ) ) { $response = $wp_filesystem->get_contents( trailingslashit( $this->paths['tempdir'] ) . $this->svg_file ); } if ( file_exists( trailingslashit( $this->paths['tempdir'] ) . $this->svg_file ) ) { $json = $wp_filesystem->get_contents( trailingslashit( $this->paths['tempdir'] ) . $this->json_file ); } if ( '' !== $json && '' !== $response ) { $xml = simplexml_load_string( $response ); $font_attr = $xml->defs->font->attributes(); $glyphs = $xml->defs->font->children(); $this->font_name = (string) $font_attr['id']; $unicodes = array(); foreach ( $glyphs as $item => $glyph ) { if ( 'glyph' == $item ) { $attributes = $glyph->attributes(); $unicode = (string) $attributes['unicode']; array_push( $unicodes, $unicode ); } } $font_folder = trailingslashit( $this->paths['fontdir'] ) . $this->font_name; if ( is_dir( $font_folder ) ) { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'It seems that the font with the same name is already exists! Please upload the font with different name.', 'ultimate_vc' ) ); } $file_contents = json_decode( $json ); if ( ! isset( $file_contents->IcoMoonType ) ) {// @codingStandardsIgnoreLine. $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'Uploaded font is not from IcoMoon. Please upload fonts created with the IcoMoon App Only.', 'ultimate_vc' ) ); } $icons = $file_contents->icons; unset( $unicodes[0] ); $n = 1; foreach ( $icons as $icon ) { $icon_name = $icon->properties->name; $icon_class = str_replace( ' ', '', $icon_name ); $icon_class = str_replace( ',', ' ', $icon_class ); $tags = implode( ',', $icon->icon->tags ); $this->json_config[ $this->font_name ][ $icon_name ] = array( 'class' => $icon_class, 'tags' => $tags, 'unicode' => $unicodes[ $n ], ); $n ++; } if ( ! empty( $this->json_config ) && 'unknown' != $this->font_name ) { $this->write_config(); $this->re_write_css(); $this->rename_files(); $this->rename_folder(); $this->add_font(); } } return false; } /** * Writes the php config file for the font * * @since ---- * @access public */ public function write_config() { $charmap = $this->paths['tempdir'] . '/' . $this->paths['config']; $handle = @fopen( $charmap, 'w' );// @codingStandardsIgnoreLine. if ( $handle ) { fwrite( $handle, 'json_config[ $this->font_name ] as $icon => $info ) { if ( ! empty( $info ) ) { $delimiter = "'"; fwrite( $handle, "\r\n" . '$icons[\'' . $this->font_name . '\'][' . $delimiter . $icon . $delimiter . '] = array("class"=>' . $delimiter . $info['class'] . $delimiter . ',"tags"=>' . $delimiter . $info['tags'] . $delimiter . ',"unicode"=>' . $delimiter . $info['unicode'] . $delimiter . ');' );// @codingStandardsIgnoreLine. } else { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'Was not able to write a config file', 'ultimate_vc' ) ); } } fclose( $handle );// @codingStandardsIgnoreLine. } else { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'Was not able to write a config file', 'ultimate_vc' ) ); } } /** * Re-writes the php config file for the font * * @since ---- * @access public */ public function re_write_css() { $style = $this->paths['tempdir'] . '/style.css'; $file = @file_get_contents( $style );// @codingStandardsIgnoreLine. if ( $file ) { $str = str_replace( 'fonts/', '', $file ); $str = str_replace( 'icon-', $this->font_name . '-', $str ); $str = str_replace( '.icon {', '[class^="' . $this->font_name . '-"], [class*=" ' . $this->font_name . '-"] {', $str ); $str = str_replace( 'i {', '[class^="' . $this->font_name . '-"], [class*=" ' . $this->font_name . '-"] {', $str ); /* remove comments */ $str = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $str ); /* remove tabs, spaces, newlines, etc. */ $str = str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $str ); @file_put_contents( $style, $str );// @codingStandardsIgnoreLine. } else { die( esc_attr__( 'Unable to write css. Upload icons downloaded only from icomoon', 'ultimate_vc' ) ); } } /** * Re-writes the file names * * @since ---- * @access public */ public function rename_files() { $extensions = array( 'eot', 'svg', 'ttf', 'woff', 'css' ); $folder = trailingslashit( $this->paths['tempdir'] ); foreach ( glob( $folder . '*' ) as $file ) { $path_parts = pathinfo( $file ); if ( strpos( $path_parts['filename'], '.dev' ) === false && in_array( $path_parts['extension'], $extensions ) ) { if ( $path_parts['filename'] !== $this->font_name ) { rename( $file, trailingslashit( $path_parts['dirname'] ) . $this->font_name . '.' . $path_parts['extension'] ); } } } } /** * Rename the temp folder and all its font files * * @since ---- * @access public */ public function rename_folder() { $new_name = trailingslashit( $this->paths['fontdir'] ) . $this->font_name; // delete folder and contents if they already exist. $this->delete_folder( $new_name ); if ( rename( $this->paths['tempdir'], $new_name ) ) { return true; } else { $this->delete_folder( $this->paths['tempdir'] ); die( esc_attr__( 'Unable to add this font. Please try again.', 'ultimate_vc' ) ); } } /** * Delete a folder * * @since ---- * @param mixed $new_name gives new name. * @access public */ public function delete_folder( $new_name ) { // delete folder and contents if they already exist. if ( is_dir( $new_name ) ) { $objects = scandir( $new_name ); foreach ( $objects as $object ) { if ( '.' != $object && '..' != $object ) { unlink( $new_name . '/' . $object ); } } reset( $objects ); rmdir( $new_name ); } else { echo $new_name . ' no found
';// @codingStandardsIgnoreLine. } } /** * Delete all files. * * @since ---- * @access public */ public function delete_all_fonts() { $new_name = $this->paths['fontdir']; $objects = scandir( $new_name ); foreach ( $objects as $object ) { if ( '.' != $object && '..' != $object ) { $this->delete_folder( $new_name . '/' . $object ); } } delete_option( 'smile_fonts' ); wp_safe_redirect( admin_url( 'admin.php?page=bsf-font-icon-manager' ) ); exit; } /** * Add fonts. * * @since ---- * @access public */ public function add_font() { $fonts = get_option( 'smile_fonts' ); if ( empty( $fonts ) ) { $fonts = array(); } $fonts[ $this->font_name ] = array( 'include' => trailingslashit( $this->paths['fonts'] ) . $this->font_name, 'folder' => trailingslashit( $this->paths['fonts'] ) . $this->font_name, 'style' => $this->font_name . '/' . $this->font_name . '.css', 'config' => $this->paths['config'], ); update_option( 'smile_fonts', $fonts ); } /** * Removes fonts. * * @since ---- * @param mixed $font check fonts. * @access public */ public function remove_font( $font ) { $fonts = get_option( 'smile_fonts' ); if ( isset( $fonts[ $font ] ) ) { unset( $fonts[ $font ] ); update_option( 'smile_fonts', $fonts ); } } /** * Finds the json file we need to create the config. * * @since ---- * @access public */ public function find_json() { $files = scandir( $this->paths['tempdir'] ); foreach ( $files as $file ) { if ( strpos( strtolower( $file ), '.json' ) !== false && '.' != $file[0] ) { return $file; } } } /** * Finds the svg file we need to create the config. * * @since ---- * @access public */ public function find_svg() { $files = scandir( $this->paths['tempdir'] ); foreach ( $files as $file ) { if ( strpos( strtolower( $file ), '.svg' ) !== false && '.' != $file[0] ) { return $file; } } } /** * Loads the icon lists. * * @since ---- * @access public */ public static function load_iconfont_list() { if ( ! empty( self::$iconlist ) ) { return self::$iconlist; } $extra_fonts = get_option( 'smile_fonts' ); if ( empty( $extra_fonts ) ) { $extra_fonts = array(); } $font_configs = $extra_fonts;// array_merge(SmileBuilder::$default_iconfont, $extra_fonts); // if we got any include the charmaps and add the chars to an array. $upload_dir = wp_upload_dir(); $path = trailingslashit( $upload_dir['basedir'] ); $url = trailingslashit( $upload_dir['baseurl'] ); foreach ( $font_configs as $key => $config ) { if ( empty( $config['full_path'] ) ) { $font_configs[ $key ]['include'] = $path . $font_configs[ $key ]['include']; $font_configs[ $key ]['folder'] = $url . $font_configs[ $key ]['folder']; } } // cache the result. self::$iconlist = $font_configs; return $font_configs; } /** * Loads the icon lists. * * @since ---- * @access public */ public function AIO_move_fonts() { // @codingStandardsIgnoreLine. // Make destination directory. if ( ! is_dir( $this->vc_fonts ) ) { wp_mkdir_p( $this->vc_fonts ); } @chmod( $this->vc_fonts, 0777 );// @codingStandardsIgnoreLine. foreach ( glob( $this->vc_fonts_dir . '*' ) as $file ) { $new_file = basename( $file ); @copy( $file, $this->vc_fonts . '/' . $new_file );// @codingStandardsIgnoreLine. } $fonts['Defaults'] = array( 'include' => sanitize_text_field( trailingslashit( $this->paths['fonts'] ) ) . 'Defaults', 'folder' => sanitize_text_field( trailingslashit( $this->paths['fonts'] ) ) . 'Defaults', 'style' => 'Defaults' . '/' . 'Defaults' . '.css',// @codingStandardsIgnoreLine. 'config' => sanitize_text_field( $this->paths['config'] ), ); $defaults = get_option( 'smile_fonts' ); if ( ! $defaults ) { update_option( 'smile_fonts', $fonts ); } }//end AIO_move_fonts() }//end class /* * creates a folder for the theme framework */ if ( ! function_exists( 'smile_backend_create_folder' ) ) { /** * Creates a folder for the theme framework. * * @since ---- * @param mixed $folder folder. * @param mixed $addindex = true set value to true. * @access public */ function smile_backend_create_folder( &$folder, $addindex = true ) { if ( is_dir( $folder ) && false == $addindex ) { return true; } $created = wp_mkdir_p( trailingslashit( $folder ) ); @chmod( $folder, 0777 );// @codingStandardsIgnoreLine. if ( false == $addindex ) { return $created; } $index_file = trailingslashit( $folder ) . 'index.php'; if ( file_exists( $index_file ) ) { return $created; } $handle = @fopen( $index_file, 'w' );// @codingStandardsIgnoreLine. if ( $handle ) { fwrite(// @codingStandardsIgnoreLine. $handle, " " ); fclose( $handle );// @codingStandardsIgnoreLine. } return $created; } } // Instantiate the Icon Manager. } $AIO_Icon_Manager = new AIO_Icon_Manager();// @codingStandardsIgnoreLine. add_action( 'wp_ajax_smile_ajax_add_zipped_font', array( $AIO_Icon_Manager, 'add_zipped_font' ) );// @codingStandardsIgnoreLine. add_action( 'wp_ajax_smile_ajax_remove_zipped_font', array( $AIO_Icon_Manager, 'remove_zipped_font' ) );// @codingStandardsIgnoreLine. ultimate_link.php000064400000065613150212230100010113 0ustar00 '', 'text_color' => '#333333', 'text_hovercolor' => '#333333', 'background_color' => '#ffffff', 'bghovercolor' => '', 'font_family' => '', 'heading_style' => '', 'title_font_size' => '', 'title_line_ht' => '', 'link_hover_style' => '', 'border_style' => 'solid', 'border_color' => '#333333', 'border_hovercolor' => '#333333', 'border_size' => '1', 'el_class' => '', 'dot_color' => '#333333', 'css' => '', 'title' => '', 'text_style' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $href = ''; $target = ''; $text = ''; $url = ''; $alt_text = ''; $rel = ''; if ( '' !== $ult_links_settings['btn_link'] ) { $href = vc_build_link( $ult_links_settings['btn_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $alt_text = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; if ( '' == $url ) { $url = 'javascript:void(0);'; } } else { $url = 'javascript:void(0);'; } /*--- design option---*/ if ( '' !== $ult_links_settings['title'] ) { $text = $ult_links_settings['title']; } else { $text = $alt_text; } $css_class = ''; $title_style = ''; $secondtitle_style = ''; $span_style = ''; $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_links_settings['css'], ' ' ), 'ult_createlink', $atts ); $css_class = esc_attr( $css_class ); if ( 'Style_2' == $ult_links_settings['link_hover_style'] ) { $span_style = 'background:' . $ult_links_settings['background_color'] . ';'; // background-color. } /*--- hover effect for link-----*/ $data_link = ''; if ( '' == $ult_links_settings['link_hover_style'] ) { $data_link .= 'data-textcolor="' . esc_attr( $ult_links_settings['text_color'] ) . '" '; $data_link .= 'data-texthover="' . esc_attr( $ult_links_settings['text_hovercolor'] ) . '"'; } else { $data_link .= 'data-textcolor="' . esc_attr( $ult_links_settings['text_color'] ) . '" '; $data_link .= 'data-texthover="' . esc_attr( $ult_links_settings['text_hovercolor'] ) . '"'; } if ( 'Style_2' == $ult_links_settings['link_hover_style'] ) { if ( '' == $ult_links_settings['text_hovercolor'] ) { $ult_links_settings['text_hovercolor'] = $ult_links_settings['text_color']; } if ( '' == $ult_links_settings['bghovercolor'] ) { $ult_links_settings['bghovercolor'] = $ult_links_settings['background_color']; } if ( '' == $ult_links_settings['text_hovercolor'] && '' == $ult_links_settings['bghovercolor'] ) { $data_link .= 'data-bgcolor="' . esc_attr( $ult_links_settings['background_color'] ) . '"'; $data_link .= 'data-bghover="' . esc_attr( $ult_links_settings['background_color'] ) . '"'; } else { $data_link .= 'data-bgcolor="' . esc_attr( $ult_links_settings['background_color'] ) . '"'; $data_link .= 'data-bghover="' . esc_attr( $ult_links_settings['bghovercolor'] ) . '"'; } } $data_link .= 'data-style="' . esc_attr( $ult_links_settings['link_hover_style'] ) . '"'; /*--- border style---*/ $data_border = ''; if ( '' != $ult_links_settings['border_style'] ) { $data_border .= 'border-color:' . $ult_links_settings['border_color'] . ';'; $data_border .= 'border-width:' . $ult_links_settings['border_size'] . 'px;'; $data_border .= 'border-style:' . $ult_links_settings['border_style'] . ';'; } $main_span = ''; $before = ''; $borderhover = ''; $ult_style2css = ''; $ult_style11css = ''; $after = ''; $style = ''; $class = ''; $id = ''; $colorstyle = ''; $borderstyle = ''; $style11_css_class = ''; /*---- text typography----*/ if ( '' != $ult_links_settings['text_style'] ) { $colorstyle .= 'float:' . $ult_links_settings['text_style'] . ';'; } if ( function_exists( 'get_ultimate_font_family' ) ) { $mhfont_family = get_ultimate_font_family( $ult_links_settings['font_family'] ); // for font family. if ( '' != $mhfont_family ) { $colorstyle .= 'font-family:' . $mhfont_family . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { // for font style. $colorstyle .= get_ultimate_font_style( $ult_links_settings['heading_style'] ); } // Responsive param. if ( is_numeric( $ult_links_settings['title_font_size'] ) ) { $ult_links_settings['title_font_size'] = 'desktop:' . $ult_links_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_links_settings['title_line_ht'] ) ) { $ult_links_settings['title_line_ht'] = 'desktop:' . $ult_links_settings['title_line_ht'] . 'px;'; } $creative_link_id = 'creative-link-wrap-' . wp_rand( 1000, 9999 ); $creative_link_args = array( 'target' => '#' . $creative_link_id . ' .ult_colorlink', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_links_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_links_settings['title_line_ht'], ), ); $creative_link_data_list = get_ultimate_vc_responsive_media_css( $creative_link_args ); // font-size. $title_style .= 'color:' . $ult_links_settings['text_color'] . ';';// color. /*-- hover style---*/ $id = ''; if ( 'Style_1' == $ult_links_settings['link_hover_style'] ) { // style1. $class .= 'ult_cl_link_1'; $colorstyle .= 'color:' . $ult_links_settings['text_color'] . ';'; // text color for bracket. } elseif ( 'Style_2' == $ult_links_settings['link_hover_style'] ) { // style2. $class .= 'ult_cl_link_2'; } elseif ( 'Style_3' == $ult_links_settings['link_hover_style'] ) { // style3. $class .= 'ult_cl_link_3'; $data_border = ''; $data_border .= 'border-color:' . $ult_links_settings['border_color'] . ';'; $data_border .= 'border-bottom-width:' . $ult_links_settings['border_size'] . 'px;'; $data_border .= 'border-style:' . $ult_links_settings['border_style'] . ';'; $borderstyle .= $data_border; // text color for btm border. $after .= ''; } elseif ( 'Style_4' == $ult_links_settings['link_hover_style'] ) { // style4. $class .= 'ult_cl_link_4'; $data_border = ''; $data_border .= 'border-color:' . $ult_links_settings['border_color'] . ';'; $data_border .= 'border-bottom-width:' . $ult_links_settings['border_size'] . 'px;'; $data_border .= 'border-style:' . $ult_links_settings['border_style'] . ';'; $borderstyle .= $data_border; // text color for btm border. $after .= ''; } elseif ( 'Style_6' == $ult_links_settings['link_hover_style'] ) { // style6. $class .= 'ult_cl_link_6'; $colorstyle .= 'color:' . $ult_links_settings['text_hovercolor'] . ';'; $after .= ''; } elseif ( 'Style_5' == $ult_links_settings['link_hover_style'] ) { // style5. $class .= 'ult_cl_link_5'; $data_border = ''; $data_border .= 'border-color:' . $ult_links_settings['border_color'] . ';'; $data_border .= 'border-bottom-width:' . $ult_links_settings['border_size'] . 'px;'; $data_border .= 'border-style:' . $ult_links_settings['border_style'] . ';'; $borderstyle .= $data_border; // text color for btm border. $before = ''; $after .= ''; } elseif ( 'Style_7' == $ult_links_settings['link_hover_style'] ) { // style7. $class .= 'ult_cl_link_7'; $borderstyle .= 'background:' . $ult_links_settings['border_color'] . ';'; $borderstyle .= 'height:' . $ult_links_settings['border_size'] . 'px;'; $before = ''; $after .= ''; } elseif ( 'Style_8' == $ult_links_settings['link_hover_style'] ) { // style8. $class .= 'ult_cl_link_8'; $borderstyle .= 'outline-color:' . $ult_links_settings['border_color'] . ';'; $borderstyle .= 'outline-width:' . $ult_links_settings['border_size'] . 'px;'; $borderstyle .= 'outline-style:' . $ult_links_settings['border_style'] . ';'; // text color for btm border. $borderhover .= 'outline-color:' . $ult_links_settings['border_hovercolor'] . ';'; $borderhover .= 'outline-width:' . $ult_links_settings['border_size'] . 'px;'; $borderhover .= 'outline-style:' . $ult_links_settings['border_style'] . ';'; // text color for btm border. $before = ''; $after .= ''; } elseif ( 'Style_9' == $ult_links_settings['link_hover_style'] ) { // style9. $class .= 'ult_cl_link_9'; $borderstyle .= 'border-top-width:' . $ult_links_settings['border_size'] . 'px;'; $borderstyle .= 'border-top-style:' . $ult_links_settings['border_style'] . ';'; $borderstyle .= 'border-top-color:' . $ult_links_settings['border_color'] . ';'; $before = ''; $after .= ''; } elseif ( 'Style_10' == $ult_links_settings['link_hover_style'] ) { // style10. $class .= 'ult_cl_link_10'; $borderstyle .= 'background:' . $ult_links_settings['border_color'] . ';'; $borderstyle .= 'height:' . $ult_links_settings['border_size'] . 'px;'; $span_style .= 'background:' . $ult_links_settings['background_color'] . ';'; if ( '' != $ult_links_settings['border_style'] ) { $span_style .= 'border-top:' . $ult_links_settings['border_size'] . 'px ' . $ult_links_settings['border_style'] . ' ' . $ult_links_settings['border_color'] . ';'; } $span_style1 = ''; $span_style1 .= 'background:' . $ult_links_settings['bghovercolor'] . ';'; } elseif ( 'Style_11' == $ult_links_settings['link_hover_style'] ) { // style11. $style11_css_class = ''; $style11_css_class = $css_class; $css_class = ''; $class .= 'ult_cl_link_11'; $span_style .= 'background:' . $ult_links_settings['background_color'] . ';'; $span_style1 = ''; $span_style1 .= 'background:' . $ult_links_settings['bghovercolor'] . ';'; $span_style1 .= 'color:' . $ult_links_settings['text_hovercolor'] . ';'; // padding. $ult_style2css = $css_class; $css_class = ''; $domain = strstr( $ult_links_settings['css'], 'padding' ); $domain = ( explode( '}', $domain ) ); $ult_style11css = $domain[0]; $before = '' . $text . ''; } $text = $text; if ( 'Style_2' == $ult_links_settings['link_hover_style'] ) { $ult_style2css = $css_class; $css_class = ''; } $output = ''; if ( 'Style_10' != $ult_links_settings['link_hover_style'] ) { $output .= ' ' . $before . ' ' . $text . ' ' . $after . ' '; } elseif ( 'Style_10' == $ult_links_settings['link_hover_style'] ) { $output .= ' ' . $text . ' ' . $text . ' '; } if ( '' != $text ) { $is_preset = false; // Preset setting array display. if ( isset( $_GET['preset'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
\'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
\'content\' => \'' . $content . '\','; } $text .= '
)'; $output .= '
';
					$output .= $text;
					$output .= '
'; } return $output; } } /** * For vc map check * * @since ---- * @access public */ public function ultimate_createlink() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Creative Link' ), 'base' => 'ult_createlink', 'icon' => 'uvc_creative_link', 'category' => __( 'Ultimate VC Addons', 'ultimate_vc' ), 'description' => __( 'Add a custom link.', 'ultimate_vc' ), 'params' => array( // Play with icon selector. array( 'type' => 'textfield', 'class' => '', 'admin_label' => true, 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'title', 'value' => '', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'btn_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), ), /*---typography-------*/ array( 'type' => 'ult_param_heading', 'param_name' => 'bt1typo-setting', 'text' => __( 'Typography', 'ultimate' ), 'value' => '', 'class' => '', 'group' => 'Typography ', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Title Font Family', 'ultimate_vc' ), 'param_name' => 'font_family', 'description' => __( 'Select the font of your choice. ', 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography ', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'heading_style', 'group' => 'Typography ', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography ', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography ', ), /*-----------general------------*/ array( 'type' => 'dropdown', 'class' => '', 'admin_label' => true, 'heading' => __( 'Link Style', 'ultimate_vc' ), 'param_name' => 'link_hover_style', 'value' => array( 'None' => '', 'Style 1' => 'Style_1', 'Style 2' => 'Style_2', 'Style 3' => 'Style_3', 'Style 4' => 'Style_4', 'Style 5' => 'Style_5', 'Style 6' => 'Style_6', 'Style 7' => 'Style_8', 'Style 8' => 'Style_9', 'Style 9' => 'Style_10', 'Style 10' => 'Style_11', ), 'description' => __( 'Select the Hover style for Link.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'button1bg_settng', 'text' => __( 'Color Settings', 'ultimate_vc' ), 'value' => '', 'class' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Color', 'ultimate_vc' ), 'param_name' => 'text_color', 'value' => '#333333', 'description' => __( 'Select text color for Link.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Hover Color', 'ultimate_vc' ), 'param_name' => 'text_hovercolor', 'value' => '#333333', 'description' => __( 'Select text hover color for Link.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Background Color', 'ultimate_vc' ), 'param_name' => 'background_color', 'value' => '#ffffff', 'description' => __( 'Select Background Color for link.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_hover_style', 'value' => array( 'Style_2', 'Style_10', 'Style_11' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Background Hover Color', 'ultimate_vc' ), 'param_name' => 'bghovercolor', 'value' => '', 'description' => __( 'Select background hover color for link.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_hover_style', 'value' => array( 'Style_2', 'Style_10', 'Style_11' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'border_style', 'value' => array( 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for link.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_hover_style', 'value' => array( 'Style_3', 'Style_4', 'Style_5', 'Style_7', 'Style_8', 'Style_9', 'Style_10' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Border Color', 'ultimate_vc' ), 'param_name' => 'border_color', 'value' => '#333333', 'description' => __( 'Select border color for link.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'border_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Border HoverColor', 'ultimate_vc' ), 'param_name' => 'border_hovercolor', 'value' => '#333333', 'description' => __( 'Select border hover color for link.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_hover_style', 'value' => array( 'Style_8' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Link Border Width', 'ultimate_vc' ), 'param_name' => 'border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'border_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Link Dot Color', 'ultimate_vc' ), 'param_name' => 'dot_color', 'value' => '#333333', 'description' => __( 'Select color for dots.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_hover_style', 'value' => array( 'Style_6' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Link Alignment', 'ultimate_vc' ), 'param_name' => 'text_style', 'value' => array( 'Center' => ' ', 'Left' => 'left', 'Right' => 'right', ), 'description' => __( 'Select the text align for link.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } } } if ( class_exists( 'AIO_creative_link' ) ) { $AIO_creative_link = new AIO_creative_link();// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_ult_createlink' ) ) { /** * Function that initializes Ultimate Creative link Module * * @class WPBakeryShortCode_ult_createlink */ class WPBakeryShortCode_ult_createlink extends WPBakeryShortCode { // @codingStandardsIgnoreLine. } } utlimate-tab-backend.php000064400000003005150212230100011212 0ustar00
ultimate_dual_colors.php000064400000113017150212230100011454 0ustar00 __( 'Dual Color Heading', 'ultimate_vc' ), 'base' => 'ultimate_dual_color', 'class' => 'vc_ultimate_dual_color', 'icon' => 'vc_ultimate_dual_color', 'category' => 'Ultimate VC Addons', 'description' => __( 'Style your heading.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'ult_param_heading', 'text' => __( 'Heading Text', 'ultimate_vc' ), 'param_name' => 'dual_main_heading', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12 no-top-margin', 'group' => 'General', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Before Text', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'dual_before_txt', 'value' => 'I Love', 'description' => '', 'group' => 'General', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'dual_before_link', 'value' => '', 'description' => '', 'group' => 'General', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Highlighted Text', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'dual_high_txt', 'value' => 'this website', 'description' => '', 'group' => 'General', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'dual_high_link', 'value' => '', 'description' => '', 'group' => 'General', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'After Text', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'dual_after_txt', 'value' => '', 'description' => '', 'group' => 'General', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'dual_after_link', 'value' => '', 'description' => '', 'group' => 'General', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), 'group' => 'General', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Style', 'ultimate_vc' ), 'param_name' => 'dual_main_style', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12 no-top-margin', 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'dual_color_align', 'value' => array( 'Center Align' => 'center', 'Left Align' => 'left', 'Right Align' => 'right', ), 'description' => __( 'Alignment option for heading.', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', 'group' => 'Style', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-4', 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Layout', 'ultimate_vc' ), 'param_name' => 'dual_color_layout', 'value' => array( 'Inline' => 'inline', 'Stack' => 'stack', ), 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Spacing Between Headings', 'ultimate_vc' ), 'param_name' => 'dual_color_spacing', 'value' => array( 'No' => 'no', 'Yes' => 'yes', ), 'dependency' => array( 'element' => 'dual_color_layout', 'value' => 'inline', ), 'group' => 'Style', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Spacing Width', 'ultimate_vc' ), 'param_name' => 'dual_color_width', 'value' => '', 'min' => 10, 'max' => 100, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'dual_color_spacing', 'value' => 'yes', ), 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Stack on', 'ultimate_vc' ), 'param_name' => 'dual_color_stack', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Desktop', 'ultimate_vc' ) => 'desktop', __( 'Tablet', 'ultimate_vc' ) => 'tablet', __( 'Mobile', 'ultimate_vc' ) => 'mobile', ), 'dependency' => array( 'element' => 'dual_color_layout', 'value' => 'stack', ), 'group' => 'Style', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Before & After settings', 'ultimate_vc' ), 'param_name' => 'dual_main_style', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Before & After Text Color', 'ultimate_vc' ), 'param_name' => 'dual_ba_color', 'description' => '', 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Before & After Background Color', 'ultimate_vc' ), 'param_name' => 'dual_ba_back_color', 'description' => '', 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Before & After Border Style', 'ultimate_vc' ), 'param_name' => 'dual_ba_border', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'dual_ba_bcolor', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'dual_ba_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'dual_ba_bstyle', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'dual_ba_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'dual_ba_bradius', 'value' => 3, 'min' => 0, 'max' => 500, 'suffix' => 'px', 'dependency' => array( 'element' => 'dual_ba_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Highlighted settings', 'ultimate_vc' ), 'param_name' => 'dual_main_style', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlighted Text Color', 'ultimate_vc' ), 'param_name' => 'dual_high_color', 'description' => '', 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlighted Text Background Color', 'ultimate_vc' ), 'param_name' => 'dual_high_back_color', 'description' => '', 'group' => 'Style', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Highlighted Border Style', 'ultimate_vc' ), 'param_name' => 'dual_high_border', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'group' => 'Style', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'dual_high_bcolor', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'dual_high_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'dual_high_bstyle', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'dual_high_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'dual_high_bradius', 'value' => 3, 'min' => 0, 'max' => 500, 'suffix' => 'px', 'dependency' => array( 'element' => 'dual_high_border', 'not_empty' => true, ), 'group' => 'Style', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Before & After Text Settings', 'ultimate_vc' ), 'param_name' => 'before_typo', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12 no-top-margin', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'dual_color_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'dual_color_font_style', 'group' => 'Typography', ), // Responsive Param. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'dual_color_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'dual_color_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Letter Spacing', 'ultimate_vc' ), 'param_name' => 'dual_ba_letter_space', 'value' => '', 'min' => 1, 'max' => 15, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-4', 'group' => 'Typography', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'dual_ba_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'heading' => __( 'Transform', 'ultimate_vc' ), 'param_name' => 'dual_ba_transform', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'unset', __( 'UPPERCASE', 'ultimate_vc' ) => 'uppercase', __( 'lowercase', 'ultimate_vc' ) => 'lowercase', __( 'Capitalize', 'ultimate_vc' ) => 'capitalize', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Highlighted Text Settings', 'ultimate_vc' ), 'param_name' => 'high_before_typo', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'dual_color_high_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'dual_color_high_font_style', 'group' => 'Typography', ), // Responsive Param. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'dual_color_high_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'dual_color_high_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Letter Spacing', 'ultimate_vc' ), 'param_name' => 'dual_high_letter_space', 'value' => '', 'min' => 1, 'max' => 15, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-4', 'group' => 'Typography', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'dual_high_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'heading' => __( 'Transform', 'ultimate_vc' ), 'param_name' => 'dual_high_transform', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'unset', __( 'UPPERCASE', 'ultimate_vc' ) => 'uppercase', __( 'lowercase', 'ultimate_vc' ) => 'lowercase', __( 'Capitalize', 'ultimate_vc' ) => 'capitalize', ), 'group' => 'Typography', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_dual_color_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } }//end ultimate_dual_colors_module_init() /** * Function Dual color Heading shotcode. * * @param array $atts Attributes. * @param string $content Content. * @method ultimate_dual_colors_module_shortcode */ public function ultimate_dual_colors_module_shortcode( $atts, $content = null ) { $dual_align = ''; $dual_ba_inline = ''; $dual_high_inline = ''; $dual_inlinel_width = ''; $dual_inliner_width = ''; $href = ''; $target = ''; $link_title = ''; $rel = ''; $url = ''; $blink_prefix = ''; $blink_sufix = ''; $hlink_prefix = ''; $hlink_sufix = ''; $alink_prefix = ''; $alink_sufix = ''; $dcfont_family = ''; $dchfont_family = ''; $main_dual_color_style_inline = ''; $main_dual_high_style_inline = ''; $main_dual_color_responsive = ''; $main_dual_high_responsive = ''; $dual_ba_back_inline = ''; $dual_high_back_inline = ''; $dual_inline_width = ''; $dual_ba_trans_inline = ''; $dual_high_trans_inline = ''; $dual_ba_ls_inline = ''; $dual_high_ls_inline = ''; $dual_ba_padding_inline = ''; $dual_high_padding_inline = ''; $dual_high_bcolor = ''; $dual_ba_border_inline = ''; $dual_high_border_inline = ''; $dual_design_style_css = ''; $output = ''; $ult_dual_color_settings = shortcode_atts( array( 'dual_before_txt' => '', 'dual_high_txt' => '', 'dual_after_txt' => '', 'dual_before_link' => '', 'dual_high_link' => '', 'dual_after_link' => '', 'dual_color_align' => 'center', 'heading_tag' => '', 'dual_ba_color' => '', 'dual_high_color' => '', 'dual_color_spacing' => 'no', 'dual_color_width' => '', 'dual_color_font_family' => '', 'dual_color_font_style' => '', 'dual_color_font_size' => '', 'dual_color_line_height' => '', 'dual_color_high_font_family' => '', 'dual_color_high_font_style' => '', 'dual_color_high_font_size' => '', 'dual_color_high_line_height' => '', 'dual_ba_back_color' => '', 'dual_high_back_color' => '', 'dual_ba_transform' => '', 'dual_high_transform' => '', 'dual_ba_letter_space' => '', 'dual_high_letter_space' => '', 'dual_ba_padding' => '', 'dual_high_padding' => '', 'dual_ba_border' => '', 'dual_ba_bcolor' => '', 'dual_ba_bstyle' => '', 'dual_ba_bradius' => '', 'dual_high_border' => '', 'dual_high_bcolor' => '', 'dual_high_bstyle' => '', 'dual_high_bradius' => '', 'dual_color_layout' => 'inline', 'dual_color_stack' => 'none', 'el_class' => '', 'css_dual_color_design' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; // Default Design Editor. $dual_design_style_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_dual_color_settings['css_dual_color_design'], ' ' ), 'ultimate_ribbons', $atts ); $dual_design_style_css = esc_attr( $dual_design_style_css ); $uid = 'ultv-' . wp_rand( 0000, 9999 ); if ( '' == $ult_dual_color_settings['dual_before_txt'] ) { $ult_dual_color_settings['dual_before_txt'] = 'I Love'; } if ( '' == $ult_dual_color_settings['dual_high_txt'] ) { $ult_dual_color_settings['dual_high_txt'] = 'this website'; } // Dual-Color Alignment. if ( '' != $ult_dual_color_settings['dual_color_align'] ) { $dual_align = 'text-align:' . $ult_dual_color_settings['dual_color_align'] . ';'; } // Dual-color Heading tag. if ( '' == $ult_dual_color_settings['heading_tag'] ) { $ult_dual_color_settings['heading_tag'] = 'h3'; } // Before & after Text color for dual-color. if ( '' != $ult_dual_color_settings['dual_ba_color'] ) { $dual_ba_inline = 'color:' . $ult_dual_color_settings['dual_ba_color'] . ';'; } // Highlighted text color for dual-color. if ( '' != $ult_dual_color_settings['dual_high_color'] ) { $dual_high_inline = 'color:' . $ult_dual_color_settings['dual_high_color'] . ';'; } // Before & after Background color for dual-color. if ( '' != $ult_dual_color_settings['dual_ba_back_color'] ) { $dual_ba_back_inline = 'background-color:' . $ult_dual_color_settings['dual_ba_back_color'] . ';'; } // Highlighted background color for dual-color. if ( '' != $ult_dual_color_settings['dual_high_back_color'] ) { $dual_high_back_inline = 'background-color:' . $ult_dual_color_settings['dual_high_back_color'] . ';'; } // Text -Transform Property for Before & After heading. if ( '' != $ult_dual_color_settings['dual_ba_transform'] ) { $dual_ba_trans_inline = 'text-transform: ' . $ult_dual_color_settings['dual_ba_transform'] . ';'; } // Text -Transform Property for Highlighted heading. if ( '' != $ult_dual_color_settings['dual_high_transform'] ) { $dual_high_trans_inline = 'text-transform: ' . $ult_dual_color_settings['dual_high_transform'] . ';'; } // Letter spacing for Before & After heading. if ( '' !== $ult_dual_color_settings['dual_ba_letter_space'] ) { $dual_ba_ls_inline = 'letter-spacing:' . $ult_dual_color_settings['dual_ba_letter_space'] . 'px;'; } // Letter spacing for Highlighted heading. if ( '' !== $ult_dual_color_settings['dual_high_letter_space'] ) { $dual_high_ls_inline = 'letter-spacing:' . $ult_dual_color_settings['dual_high_letter_space'] . 'px;'; } /* Before and after padding */ if ( '' != $ult_dual_color_settings['dual_ba_padding'] ) { $dual_ba_padding_inline = $ult_dual_color_settings['dual_ba_padding']; } /* Highlighted padding */ if ( '' != $ult_dual_color_settings['dual_high_padding'] ) { $dual_high_padding_inline = $ult_dual_color_settings['dual_high_padding']; } // Border style for Before & after headings. if ( '' !== $ult_dual_color_settings['dual_ba_border'] ) { $dual_ba_border_inline .= 'border-radius:' . $ult_dual_color_settings['dual_ba_bradius'] . 'px;'; $dual_ba_border_inline .= 'border-width:' . $ult_dual_color_settings['dual_ba_bstyle'] . 'px;'; $dual_ba_border_inline .= 'border-color:' . $ult_dual_color_settings['dual_ba_bcolor'] . ';'; $dual_ba_border_inline .= 'border-style:' . $ult_dual_color_settings['dual_ba_border'] . ';'; } else { $dual_ba_border_inline .= 'border:none;'; } // Border style for Highlighted headings. if ( '' !== $ult_dual_color_settings['dual_high_border'] ) { $dual_high_border_inline .= 'border-radius:' . $ult_dual_color_settings['dual_high_bradius'] . 'px;'; $dual_high_border_inline .= 'border-width:' . $ult_dual_color_settings['dual_high_bstyle'] . 'px;'; $dual_high_border_inline .= 'border-color:' . $dual_high_bcolor . ';'; $dual_high_border_inline .= 'border-style:' . $ult_dual_color_settings['dual_high_border'] . ';'; } else { $dual_high_border_inline .= 'border:none;'; } if ( 'yes' == $ult_dual_color_settings['dual_color_spacing'] ) { if ( '' != $ult_dual_color_settings['dual_color_width'] ) { $dual_inline_width = 'margin-left:' . $ult_dual_color_settings['dual_color_width'] . 'px;'; $dual_inline_width .= 'margin-right: ' . $ult_dual_color_settings['dual_color_width'] . 'px;'; } } // Link for the Before Text. if ( '' !== $ult_dual_color_settings['dual_before_link'] ) { $href = vc_build_link( $ult_dual_color_settings['dual_before_link'] ); if ( '' !== $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $blink_prefix = ''; $blink_sufix = ''; } } // Link for the Highlighted Text. if ( '' !== $ult_dual_color_settings['dual_high_link'] ) { $href = vc_build_link( $ult_dual_color_settings['dual_high_link'] ); if ( '' !== $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $hlink_prefix = ''; $hlink_sufix = ''; } } // Link for the after Text. if ( '' !== $ult_dual_color_settings['dual_after_link'] ) { $href = vc_build_link( $ult_dual_color_settings['dual_after_link'] ); if ( '' !== $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $alink_prefix = ''; $alink_sufix = ''; } } /* ---- Before and after heading styles ---- */ if ( '' != $ult_dual_color_settings['dual_color_font_family'] ) { $dcfont_family = get_ultimate_font_family( $ult_dual_color_settings['dual_color_font_family'] ); if ( $dcfont_family ) { $main_dual_color_style_inline .= 'font-family:\'' . $dcfont_family . '\';'; } } /* ---- Before and after font style---- */ $main_dual_color_style_inline .= get_ultimate_font_style( $ult_dual_color_settings['dual_color_font_style'] ); // FIX: Before and after font size before implementing responsive param. if ( is_numeric( $ult_dual_color_settings['dual_color_font_size'] ) ) { $ult_dual_color_settings['dual_color_font_size'] = 'desktop:' . $ult_dual_color_settings['dual_color_font_size'] . 'px;'; } if ( is_numeric( $ult_dual_color_settings['dual_color_line_height'] ) ) { $ult_dual_color_settings['dual_color_line_height'] = 'desktop:' . $ult_dual_color_settings['dual_color_line_height'] . 'px;'; } // Before and after responsive {main} video styles. $args = array( 'target' => '.ult-dual-color.' . $uid . ' .ult-dual-heading-text', 'media_sizes' => array( 'font-size' => $ult_dual_color_settings['dual_color_font_size'], 'line-height' => $ult_dual_color_settings['dual_color_line_height'], ), ); $main_dual_color_responsive = get_ultimate_vc_responsive_media_css( $args ); /* ---- Highlighted heading styles ---- */ if ( '' != $ult_dual_color_settings['dual_color_high_font_family'] ) { $dchfont_family = get_ultimate_font_family( $ult_dual_color_settings['dual_color_high_font_family'] ); if ( $dchfont_family ) { $main_dual_high_style_inline .= 'font-family:\'' . $dchfont_family . '\';'; } } /* ---- Highlighted font style---- */ $main_dual_high_style_inline .= get_ultimate_font_style( $ult_dual_color_settings['dual_color_high_font_style'] ); // FIX: Highlighted font size before implementing responsive param. if ( is_numeric( $ult_dual_color_settings['dual_color_high_font_size'] ) ) { $ult_dual_color_settings['dual_color_high_font_size'] = 'desktop:' . $ult_dual_color_settings['dual_color_high_font_size'] . 'px;'; } if ( is_numeric( $ult_dual_color_settings['dual_color_high_line_height'] ) ) { $ult_dual_color_settings['dual_color_high_line_height'] = 'desktop:' . $ult_dual_color_settings['dual_color_high_line_height'] . 'px;'; } // Highlighted responsive {main} video styles. $args = array( 'target' => '.ult-dual-color.' . $uid . ' .ult-highlight-text', 'media_sizes' => array( 'font-size' => $ult_dual_color_settings['dual_color_high_font_size'], 'line-height' => $ult_dual_color_settings['dual_color_high_line_height'], ), ); $main_dual_high_responsive = get_ultimate_vc_responsive_media_css( $args ); $output = '
'; $output .= '
<' . $ult_dual_color_settings['heading_tag'] . '>'; if ( '' !== $blink_prefix ) { $output .= $blink_prefix; } $output .= ' ' . esc_attr( $ult_dual_color_settings['dual_before_txt'] ) . ' '; if ( '' !== $blink_sufix ) { $output .= $blink_sufix; } if ( '' !== $hlink_prefix ) { $output .= $hlink_prefix; } $output .= ' ' . esc_attr( $ult_dual_color_settings['dual_high_txt'] ) . ' '; if ( '' !== $hlink_sufix ) { $output .= $hlink_sufix; } if ( '' != $ult_dual_color_settings['dual_after_txt'] ) { if ( '' !== $alink_prefix ) { $output .= $alink_prefix; } $output .= ' ' . esc_attr( $ult_dual_color_settings['dual_after_txt'] ) . ' '; if ( '' !== $alink_sufix ) { $output .= $alink_sufix; } } $output .= '
'; $output .= '
'; return $output; }//end ultimate_dual_colors_module_shortcode() }//end class new Ultimate_Dual_Colors(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Dual_Color' ) ) { /** * Class WPBakeryShortCode_Ultimate_Dual_Color */ class WPBakeryShortCode_Ultimate_Dual_Color extends WPBakeryShortCode { } } } ultimate_info_circle.php000064400000130326150212230100011424 0ustar00 '80', 'visible_circle' => '70', 'start_degree' => '90', 'circle_type' => '', 'icon_position' => 'full', 'focus_on' => 'hover', 'eg_br_width' => '1', 'eg_br_style' => 'none', 'eg_border_color' => '', 'cn_br_style' => 'none', 'cn_br_width' => '1', 'cn_border_color' => '', 'highlight_style' => 'info-circle-highlight-style', 'icon_size' => '32', 'img_icon_size' => '32', 'eg_padding' => '50', 'icon_diversion' => '', 'icon_show' => 'show', 'content_icon_size' => '32', 'content_color' => '', 'content_bg' => '', 'responsive' => 'on', 'responsive_breakpoint' => '800', 'auto_slide' => 'off', 'auto_slide_duration' => '3', 'icon_launch' => '', 'icon_launch_duration' => '1', 'icon_launch_delay' => '0.2', 'el_class' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_height' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $uniq = uniqid(); $browser_info = ult_getBrowser(); global $title_style_inline, $desc_style_inline, $info_circle_id, $info_circle_data_list; /* ---- main title styles ---- */ if ( '' != $ult_info_circle['title_font'] ) { $title_font_family = get_ultimate_font_family( $ult_info_circle['title_font'] ); if ( '' != $title_font_family ) { $title_style_inline = 'font-family:\'' . $title_font_family . '\';'; } } // main heading font style. $title_style_inline .= get_ultimate_font_style( $ult_info_circle['title_font_style'] ); // attach font size if set. // responsive param for title. if ( is_numeric( $ult_info_circle['title_font_size'] ) ) { $ult_info_circle['title_font_size'] = 'desktop:' . $ult_info_circle['title_font_size'] . 'px;'; } if ( is_numeric( $ult_info_circle['title_line_height'] ) ) { $ult_info_circle['title_line_height'] = 'desktop:' . $ult_info_circle['title_line_height'] . 'px;'; } $info_circle_id = 'info-cirlce-wrap-' . wp_rand( 1000, 9999 ); $info_circle_args = array( 'target' => '#' . $info_circle_id . ' .responsive-font-class h3.new-cust-responsive-class', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_circle['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_circle['title_line_height'], ), ); $info_circle_data_list = get_ultimate_vc_responsive_media_css( $info_circle_args ); /* ---- description styles ---- */ if ( '' != $ult_info_circle['desc_font'] ) { $desc_font_family = get_ultimate_font_family( $ult_info_circle['desc_font'] ); if ( '' != $desc_font_family ) { $desc_style_inline = 'font-family:\'' . $desc_font_family . '\';'; } } // main heading font style. $desc_style_inline .= get_ultimate_font_style( $ult_info_circle['desc_font_style'] ); // attach font size if set. // Responsive param for Description. if ( is_numeric( $ult_info_circle['desc_font_size'] ) ) { $ult_info_circle['desc_font_size'] = 'desktop:' . $ult_info_circle['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_info_circle['desc_line_height'] ) ) { $ult_info_circle['desc_line_height'] = 'desktop:' . $ult_info_circle['desc_line_height'] . 'px;'; } $info_circle_desc_args = array( 'target' => '#' . $info_circle_id . ' .responsive-font-class *', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_circle['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_circle['desc_line_height'], ), ); $info_circle_desc_data_list = get_ultimate_vc_responsive_media_css( $info_circle_desc_args ); $style = ''; $style1 = ''; $style3 = ''; $ex_class = ''; if ( stripos( $browser_info['name'], 'safari' ) == true && stripos( $browser_info['version'], '11.' ) == true ) { if ( 'none' != $ult_info_circle['eg_br_style'] && '' != $ult_info_circle['eg_br_width'] && '' != $ult_info_circle['eg_border_color'] ) { $style .= 'box-shadow: 0 0 0 ' . $ult_info_circle['eg_br_width'] . 'px ' . $ult_info_circle['eg_border_color'] . ';'; } } else { if ( 'none' != $ult_info_circle['eg_br_style'] && '' != $ult_info_circle['eg_br_width'] && '' != $ult_info_circle['eg_border_color'] ) { $style .= 'border:' . $ult_info_circle['eg_br_width'] . 'px ' . $ult_info_circle['eg_br_style'] . ' ' . $ult_info_circle['eg_border_color'] . ';'; } } if ( stripos( $browser_info['name'], 'safari' ) == true && stripos( $browser_info['version'], '11.' ) == true ) { if ( 'none' != $ult_info_circle['cn_br_style'] && '' != $ult_info_circle['cn_br_width'] && '' != $ult_info_circle['cn_border_color'] ) { $style1 .= 'box-shadow: 0 0 0 ' . $ult_info_circle['cn_br_width'] . 'px ' . $ult_info_circle['cn_border_color'] . ';'; } } else { if ( 'none' != $ult_info_circle['cn_br_style'] && '' != $ult_info_circle['cn_br_width'] && '' != $ult_info_circle['cn_border_color'] ) { $style1 .= 'border:' . $ult_info_circle['cn_br_width'] . 'px ' . $ult_info_circle['cn_br_style'] . ' ' . $ult_info_circle['cn_border_color'] . ';'; } } $style1 .= 'background-color:' . $ult_info_circle['content_bg'] . ';color:' . $ult_info_circle['content_color'] . ';'; $style1 .= 'width:' . $ult_info_circle['eg_padding'] . '%;height:' . $ult_info_circle['eg_padding'] . '%;margin:' . ( ( 100 - $ult_info_circle['eg_padding'] ) / 2 ) . '%;'; if ( '' != $ult_info_circle['el_class'] ) { $ex_class = $ult_info_circle['el_class']; } if ( 'on' == $ult_info_circle['responsive'] ) { $ex_class .= ' info-circle-responsive'; } if ( 'show' == $ult_info_circle['icon_show'] ) { $ult_info_circle['content_icon_size'] = $ult_info_circle['content_icon_size']; } else { $ult_info_circle['content_icon_size'] = ''; } if ( '' != $ult_info_circle['edge_radius'] ) { $style .= 'width:' . $ult_info_circle['edge_radius'] . '%;'; } $style .= 'opacity:0;'; if ( '' == $ult_info_circle['circle_type'] ) { $ult_info_circle['circle_type'] = 'info-c-full-br'; } if ( 'full' == $ult_info_circle['icon_position'] ) { $circle_type_extended = 'full-circle'; } else { if ( 90 == $ult_info_circle['icon_position'] ) { $circle_type_extended = 'left-circle'; } elseif ( 270 == $ult_info_circle['icon_position'] ) { $circle_type_extended = 'right-circle'; } elseif ( 180 == $ult_info_circle['icon_position'] ) { $circle_type_extended = 'top-circle'; } elseif ( 0 == $ult_info_circle['icon_position'] ) { $circle_type_extended = 'bottom-circle'; } else { $circle_type_extended = 'full-circle'; } } $connector_position = ''; if ( is_rtl() ) { $connector_position = 'right:' . esc_attr( $ult_info_circle['img_icon_size'] / 2 ) . 'px;'; } else { $connector_position = 'left:' . esc_attr( $ult_info_circle['img_icon_size'] / 2 ) . 'px;'; } if ( '' != $ult_info_circle['visible_circle'] && 100 != $ult_info_circle['visible_circle'] && 'full-circle' != $circle_type_extended ) { $clipped_circle = 'clipped-info-circle'; } $output = '
'; $output .= '
'; $output .= '
'; $output .= do_shortcode( $content ); if ( 'full' != $ult_info_circle['icon_position'] ) { $output .= '
'; } $output .= '
'; $output .= '
'; $output .= '
'; $output .= '
'; if ( 'on' == $ult_info_circle['responsive'] ) { $output .= '
  • '; if ( $ult_info_circle['img_icon_size'] <= 120 ) { $output .= '

    '; } else { $output .= '

    '; } $output .= '
'; } $output .= '
'; return $output; } /** * Redirect to menu position. * * @param string $atts . * @param string $content . * @return string $output . */ public function info_circle_item( $atts, $content = null ) { global $title_style_inline, $desc_style_inline, $info_circle_id, $info_circle_data_list, $info_circle_desc_data_list; // Do nothing. $contents = ''; $radius = ''; $icon_size = ''; $icon_html = ''; $style = ''; $output = ''; $style = ''; $target = ''; $link_title = ''; $rel = ''; $padding_style = ''; $ult_info_circle_settings = shortcode_atts( array( 'info_title' => '', 'info_icon' => '', 'icon_color' => '', 'icon_bg_color' => '', 'info_img' => '', 'icon_type' => 'selector', 'icon_br_style' => 'none', 'icon_br_width' => '1', 'icon_br_padding' => '', 'icon_border_color' => '', 'contents' => '', 'el_class' => '', 'ilink' => '', ), $atts ); $icon_html = ''; $output = ''; $icon_type_class = ''; if ( 'selector' == $ult_info_circle_settings['icon_type'] ) { $icon_html .= ''; $icon_type_class = 'ult-info-circle-icon'; } else { $img = apply_filters( 'ult_get_img_single', $ult_info_circle_settings['info_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_info_circle_settings['info_img'], 'alt' ); if ( '' == $alt ) { $alt = 'icon'; } $icon_html .= '' . esc_attr( $alt ) . ''; $icon_type_class = 'ult-info-circle-img'; } if ( '' != $ult_info_circle_settings['icon_bg_color'] ) { $style .= 'background:' . $ult_info_circle_settings['icon_bg_color'] . ';'; } else { $ult_info_circle_settings['el_class'] .= ' info-circle-icon-without-background '; } if ( '' != $ult_info_circle_settings['icon_color'] ) { $style .= 'color:' . $ult_info_circle_settings['icon_color'] . ';'; } if ( '' != $ult_info_circle_settings['icon_br_padding'] ) { $padding_style = 'data-padding-style=' . $ult_info_circle_settings['icon_br_padding']; $style .= 'padding:' . $ult_info_circle_settings['icon_br_padding'] . 'px;'; } if ( 'none' != $ult_info_circle_settings['icon_br_style'] && '' != $ult_info_circle_settings['icon_br_width'] && '' != $ult_info_circle_settings['icon_border_color'] ) { $style .= 'border-style:' . $ult_info_circle_settings['icon_br_style'] . ';'; $style .= 'border-width:' . $ult_info_circle_settings['icon_br_width'] . 'px;'; $style .= 'border-color:' . $ult_info_circle_settings['icon_border_color'] . ';'; } $href = vc_build_link( $ult_info_circle_settings['ilink'] ); if ( ! empty( $href['url'] ) ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $output .= '
'; } else { $output .= '
'; $output .= $icon_html; $output .= '
'; } $output .= '
'; if ( ! empty( $href['url'] ) ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $output .= '
' . $icon_html . '

' . $ult_info_circle_settings['info_title'] . '

' . do_shortcode( $content ) . '
'; } else { $output .= '
' . $icon_html . '

' . $ult_info_circle_settings['info_title'] . '

' . do_shortcode( $content ) . '
'; } return $output; } /** * Add info circle. */ public function add_info_circle() { if ( function_exists( 'vc_map' ) ) { $thumbnail_tab = 'Thumbnail'; $information_tab = 'Information Area'; $connector_tab = 'Connector'; $reponsive_tab = 'Responsive'; vc_map( array( 'name' => __( 'Info Circle', 'ultimate_vc' ), 'base' => 'info_circle', 'class' => 'vc_info_circle', 'icon' => 'vc_info_circle', 'category' => 'Ultimate VC Addons', 'as_parent' => array( 'only' => 'info_circle_item' ), 'description' => __( 'Information Circle', 'ultimate_vc' ), 'content_element' => true, 'show_settings_on_create' => true, 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select area to display thumbnail icons', 'ultimate_vc' ), 'param_name' => 'icon_position', 'value' => array( __( 'Complete', 'ultimate_vc' ) => 'full', __( 'Top', 'ultimate_vc' ) => '180', __( 'Bottom', 'ultimate_vc' ) => '0', __( 'Left', 'ultimate_vc' ) => '90', __( 'Right', 'ultimate_vc' ) => '270', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Clipped Circle', 'ultimate_vc' ), 'param_name' => 'visible_circle', 'value' => '70', 'suffix' => '%', 'dependency' => array( 'element' => 'icon_position', 'value' => array( '180', '270', '90', '0' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Information Circle', 'ultimate_vc' ), 'param_name' => 'edge_radius', 'value' => 80, 'suffix' => '%', 'description' => __( 'Size of circle relative to container width.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Position of First Thumbnail', 'ultimate_vc' ), 'param_name' => 'start_degree', 'value' => 90, 'max' => 360, 'suffix' => '° degree', 'description' => __( 'The degree from where Info Circle will be displayed.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_position', 'value' => array( 'full' ), ), 'group' => $thumbnail_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Distance Between Thumbnails & Information Circle', 'ultimate_vc' ), 'param_name' => 'eg_padding', 'value' => array( __( 'Extra large', 'ultimate_vc' ) => '50', __( 'Large', 'ultimate_vc' ) => '60', __( 'Medium', 'ultimate_vc' ) => '70', __( 'Small', 'ultimate_vc' ) => '80', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Thumbnail Icon Size', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'suffix' => 'px', 'group' => $thumbnail_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Responsive Icon/image Size', 'ultimate_vc' ), 'param_name' => 'img_icon_size', 'value' => 32, 'suffix' => 'px', 'dependency' => array( 'element' => 'responsive', 'value' => array( 'on' ), ), 'group' => $thumbnail_tab, 'description' => __( 'This size of the thumbnails on breakpoint.', 'smile' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Display Icon', 'ultimate_vc' ), 'param_name' => 'icon_show', 'value' => array( __( 'Yes', 'ultimate_vc' ) => 'show', __( 'No', 'ultimate_vc' ) => 'not-show', ), 'description' => __( 'Select whether you want to show icon in information circle.', 'ultimate_vc' ), 'group' => $information_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon Size', 'ultimate_vc' ), 'param_name' => 'content_icon_size', 'value' => 32, 'suffix' => 'px', 'dependency' => array( 'element' => 'icon_show', 'value' => array( 'show' ), ), 'group' => $information_tab, ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'content_bg', 'value' => '', 'group' => $information_tab, ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'content_color', 'value' => '', 'group' => $information_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Line Style', 'ultimate_vc' ), 'param_name' => 'eg_br_style', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', ), 'group' => $connector_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Width', 'ultimate_vc' ), 'param_name' => 'eg_br_width', 'value' => 1, 'min' => 0, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'eg_br_style', 'value' => array( 'solid', 'dashed', 'dotted' ), ), 'group' => $connector_tab, ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Line Color', 'ultimate_vc' ), 'param_name' => 'eg_border_color', 'value' => '', 'dependency' => array( 'element' => 'eg_br_style', 'value' => array( 'solid', 'dashed', 'dotted' ), ), 'group' => $connector_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'cn_br_style', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'group' => $information_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'cn_br_width', 'value' => 1, 'min' => 0, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'cn_br_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => $information_tab, ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border color', 'ultimate_vc' ), 'param_name' => 'cn_border_color', 'value' => '', 'dependency' => array( 'element' => 'cn_br_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => $information_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Appear Information Circle on', 'ultimate_vc' ), 'param_name' => 'focus_on', 'value' => array( __( 'Hover', 'ultimate_vc' ) => 'hover', __( 'Click', 'ultimate_vc' ) => 'click', ), 'description' => __( 'Select on which event information should appear in information circle.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Autoplay', 'ultimate_vc' ), 'param_name' => 'auto_slide', 'value' => array( __( 'No', 'ultimate_vc' ) => 'off', __( 'Yes', 'ultimate_vc' ) => 'on', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Autoplay Time', 'ultimate_vc' ), 'param_name' => 'auto_slide_duration', 'value' => 3, 'suffix' => 'seconds', 'description' => __( 'Duration before info circle should display next information on thumbnails.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'auto_slide', 'value' => array( 'on' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation of Active Thumbnail', 'ultimate_vc' ), 'param_name' => 'highlight_style', 'value' => array( __( 'None', 'ultimate_vc' ) => 'info-circle-highlight-style', __( 'Zoom InOut', 'ultimate_vc' ) => 'info-circle-pulse', __( 'Zoom Out', 'ultimate_vc' ) => 'info-circle-push', __( 'Zoom In', 'ultimate_vc' ) => 'info-circle-pop', ), 'description' => __( 'Select animation style for active thumbnails.', 'ultimate_vc' ), 'group' => $thumbnail_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation of Thumbnails when Page Loads', 'ultimate_vc' ), 'param_name' => 'icon_launch', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Linear', 'ultimate_vc' ) => 'linear', __( 'Elastic', 'ultimate_vc' ) => 'easeOutElastic', __( 'Bounce', 'ultimate_vc' ) => 'easeOutBounce', ), 'description' => __( 'Select Animation Style.', 'ultimate_vc' ), 'group' => $thumbnail_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Duration', 'ultimate_vc' ), 'param_name' => 'icon_launch_duration', 'value' => 1, 'suffix' => 'seconds', 'description' => __( 'Specify animation duration.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_launch', 'not_empty' => true, ), 'group' => $thumbnail_tab, ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Animation Delay', 'ultimate_vc' ), 'param_name' => 'icon_launch_delay', 'value' => 0.2, 'suffix' => 'seconds', 'description' => __( 'Delay of animatin start in-between thumbnails.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_launch', 'not_empty' => true, ), 'group' => $thumbnail_tab, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Responsive Nature', 'ultimate_vc' ), 'param_name' => 'responsive', 'value' => array( __( 'True', 'ultimate_vc' ) => 'on', __( 'False', 'ultimate_vc' ) => 'off', ), 'description' => __( 'Select true to change its display style on low resolution.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Breakpoint', 'ultimate_vc' ), 'param_name' => 'responsive_breakpoint', 'value' => 800, 'suffix' => 'px', 'description' => __( 'Break point is the point of screen resolution from where you can set your info-circle style into list style to the minimum screen resolution.', 'smile' ), 'dependency' => array( 'element' => 'responsive', 'value' => array( 'on' ), ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Custom class.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => __( 'Title Settings', 'ultimate_vc' ), 'param_name' => 'title_typography', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Description Settings', 'ultimate_vc' ), 'param_name' => 'desc_typography', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), ), 'js_view' => 'VcColumnView', ) ); vc_map( array( 'name' => __( 'Info Circle Item', 'ultimate_vc' ), 'base' => 'info_circle_item', 'class' => 'vc_info_circle_item', 'icon' => 'vc_info_circle_item', 'category' => 'Ultimate VC Addons', 'content_element' => true, 'as_child' => array( 'only' => 'info_circle' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'info_title', 'value' => '', 'admin_label' => true, ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), 'group' => __( 'Design' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon For Information Circle & Thumbnail ', 'ultimate_vc' ), 'param_name' => 'info_icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Design' ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon', 'ultimate_vc' ), 'param_name' => 'info_img', 'admin_label' => true, 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => __( 'Design' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Background Color', 'ultimate_vc' ), 'param_name' => 'icon_bg_color', 'value' => '', 'description' => __( 'Select the color for icon background.', 'ultimate_vc' ), 'group' => __( 'Design' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Select the color for icon.', 'ultimate_vc' ), 'group' => __( 'Design' ), ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'icon_br_style', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'group' => __( 'Design' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Thickness', 'ultimate_vc' ), 'param_name' => 'icon_br_width', 'value' => 1, 'min' => 0, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'icon_br_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => __( 'Design' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'icon_br_padding', 'value' => '', 'min' => 0, 'max' => '', 'suffix' => 'px', 'dependency' => array( 'element' => 'icon_br_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => __( 'Design' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_border_color', 'value' => '', 'dependency' => array( 'element' => 'icon_br_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => __( 'Design' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Custom class.', 'ultimate_vc' ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'ilink', 'value' => '', 'description' => __( 'Add link to Icon/image on Info Circle', 'ultimate_vc' ), ), ), ) ); } } } } if ( class_exists( 'WPBakeryShortCodesContainer' ) ) { if ( ! class_exists( 'WPBakeryShortCode_info_circle' ) ) { /** * WPBakeryShortCode_info_circle class */ class WPBakeryShortCode_Info_Circle extends WPBakeryShortCodesContainer { } } if ( ! class_exists( 'WPBakeryShortCode_Info_Circle_Item' ) ) { /** * WPBakeryShortCode_Info_Circle_Item class */ class WPBakeryShortCode_Info_Circle_Item extends WPBakeryShortCode { } } } if ( class_exists( 'Ultimate_Info_Circle' ) ) { $ultimate_info_circle = new Ultimate_Info_Circle(); } ultimate_google_trends.php000064400000026672150212230100012013 0ustar00 __( 'Google Trends', 'ultimate_vc' ), 'base' => 'ultimate_google_trends', 'class' => 'vc_google_trends', 'controls' => 'full', 'show_settings_on_create' => true, 'icon' => 'vc_google_trends', 'description' => __( 'Display Google Trends to show insights.', 'ultimate_vc' ), 'category' => 'Ultimate VC Addons', 'params' => array( array( 'type' => 'textarea', 'class' => '', 'heading' => __( 'Comparison Terms', 'ultimate_vc' ), 'param_name' => 'gtrend_query', 'value' => '', 'description' => __( 'Enter maximum 5 terms separated by comma. Example:', 'ultimate_vc' ) . ' ' . __( 'Google, Facebook, LinkedIn', 'ultimate_vc' ) . '', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Location', 'ultimate_vc' ), 'param_name' => 'location_by', 'admin_label' => true, 'value' => array( __( 'Worldwide', 'ultimate_vc' ) => '', __( 'Argentina', 'ultimate_vc' ) => 'AR', __( 'Australia', 'ultimate_vc' ) => 'AU', __( 'Austria', 'ultimate_vc' ) => 'AT', __( 'Bangladesh', 'ultimate_vc' ) => 'BD', __( 'Belgium', 'ultimate_vc' ) => 'BE', __( 'Brazil', 'ultimate_vc' ) => 'BR', __( 'Bulgaria', 'ultimate_vc' ) => 'BG', __( 'Canada', 'ultimate_vc' ) => 'CA', __( 'Chile', 'ultimate_vc' ) => 'CL', __( 'China', 'ultimate_vc' ) => 'CN', __( 'Colombia', 'ultimate_vc' ) => 'CO', __( 'Costa Rica', 'ultimate_vc' ) => 'CR', __( 'Croatia', 'ultimate_vc' ) => 'HR', __( 'Czech Republic', 'ultimate_vc' ) => 'CZ', __( 'Denmark', 'ultimate_vc' ) => 'DK', __( 'Dominican Republic', 'ultimate_vc' ) => 'DO', __( 'Ecuador', 'ultimate_vc' ) => 'EC', __( 'Egypt', 'ultimate_vc' ) => 'EG', __( 'El Salvador', 'ultimate_vc' ) => 'SV', __( 'Estonia', 'ultimate_vc' ) => 'EE', __( 'Finland', 'ultimate_vc' ) => 'FI', __( 'France', 'ultimate_vc' ) => 'FR', __( 'Germany', 'ultimate_vc' ) => 'DE', __( 'Ghana', 'ultimate_vc' ) => 'GH', __( 'Greece', 'ultimate_vc' ) => 'GR', __( 'Guatemala', 'ultimate_vc' ) => 'GT', __( 'Honduras', 'ultimate_vc' ) => 'HN', __( 'Hong Kong', 'ultimate_vc' ) => 'HK', __( 'Hungary', 'ultimate_vc' ) => 'HU', __( 'India', 'ultimate_vc' ) => 'IN', __( 'Indonesia', 'ultimate_vc' ) => 'ID', __( 'Ireland', 'ultimate_vc' ) => 'IE', __( 'Israel', 'ultimate_vc' ) => 'IL', __( 'Italy', 'ultimate_vc' ) => 'IT', __( 'Japan', 'ultimate_vc' ) => 'JP', __( 'Kenya', 'ultimate_vc' ) => 'KE', __( 'Latvia', 'ultimate_vc' ) => 'LV', __( 'Lithuania', 'ultimate_vc' ) => 'LT', __( 'Malaysia', 'ultimate_vc' ) => 'MY', __( 'Mexico', 'ultimate_vc' ) => 'MX', __( 'Netherlands', 'ultimate_vc' ) => 'NL', __( 'New Zealand', 'ultimate_vc' ) => 'NZ', __( 'Nigeria', 'ultimate_vc' ) => 'NG', __( 'Norway', 'ultimate_vc' ) => 'NO', __( 'Pakistan', 'ultimate_vc' ) => 'PK', __( 'Panama', 'ultimate_vc' ) => 'PA', __( 'Peru', 'ultimate_vc' ) => 'PE', __( 'Philippines', 'ultimate_vc' ) => 'PH', __( 'Poland', 'ultimate_vc' ) => 'PL', __( 'Portugal', 'ultimate_vc' ) => 'PT', __( 'Puerto Rico', 'ultimate_vc' ) => 'PR', __( 'Romania', 'ultimate_vc' ) => 'RO', __( 'Russia', 'ultimate_vc' ) => 'RU', __( 'Saudi Arabia', 'ultimate_vc' ) => 'SA', __( 'Senegal', 'ultimate_vc' ) => 'SN', __( 'Serbia', 'ultimate_vc' ) => 'RS', __( 'Singapore', 'ultimate_vc' ) => 'SG', __( 'Slovakia', 'ultimate_vc' ) => 'SK', __( 'Slovenia', 'ultimate_vc' ) => 'SI', __( 'South Africa', 'ultimate_vc' ) => 'ZA', __( 'South Korea', 'ultimate_vc' ) => 'KR', __( 'Spain', 'ultimate_vc' ) => 'ES', __( 'Sweden', 'ultimate_vc' ) => 'SE', __( 'Switzerland', 'ultimate_vc' ) => 'CH', __( 'Taiwan', 'ultimate_vc' ) => 'TW', __( 'Thailand', 'ultimate_vc' ) => 'TH', __( 'Turkey', 'ultimate_vc' ) => 'TR', __( 'Uganda', 'ultimate_vc' ) => 'UG', __( 'Ukraine', 'ultimate_vc' ) => 'UA', __( 'United Arab Emirates', 'ultimate_vc' ) => 'AE', __( 'United Kingdom', 'ultimate_vc' ) => 'GB', __( 'United States', 'ultimate_vc' ) => 'US', __( 'Uruguay', 'ultimate_vc' ) => 'UY', __( 'Venezuela', 'ultimate_vc' ) => 'VE', __( 'Vietnam', 'ultimate_vc' ) => 'VN', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Graph type', 'ultimate_vc' ), 'param_name' => 'graph_type', 'admin_label' => true, 'value' => array( __( 'Interest over time', 'ultimate_vc' ) => 'TIMESERIES_GRAPH_0', __( 'Interest over time with average', 'ultimate_vc' ) => 'TIMESERIES_GRAPH_AVERAGES_CHART', __( 'Regional interest in map', 'ultimate_vc' ) => 'GEO_MAP_0_0', __( 'Regional interest in table', 'ultimate_vc' ) => 'GEO_TABLE_0_0', __( 'Related searches (Topics)', 'ultimate_vc' ) => 'TOP_ENTITIES_0_0', __( 'Related searches (Queries)', 'ultimate_vc' ) => 'TOP_QUERIES_0_0', ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Frame Width (optional)', 'ultimate_vc' ), 'param_name' => 'gtrend_width', 'value' => '', 'description' => __( 'For Example: 500', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Frame Height (optional)', 'ultimate_vc' ), 'param_name' => 'gtrend_height', 'value' => '', 'description' => __( 'For Example: 350', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_gtrend_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** * Render function for Ultimate Google Trends Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function display_ultimate_trends( $atts, $content = null ) { $width = ''; $height = ''; $css_design_style = ''; $ult_trend_settings = shortcode_atts( array( 'gtrend_width' => '', 'gtrend_height' => '', 'graph_type' => 'TIMESERIES_GRAPH_0', 'graph_type_2' => '', 'search_by' => 'q', 'location_by' => '', 'gtrend_query' => '', 'gtrend_query_2' => '', 'el_class' => '', 'css_gtrend_design' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $css_design_style = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_trend_settings['css_gtrend_design'], ' ' ), 'ultimate_google_trends', $atts ); $css_design_style = esc_attr( $css_design_style ); if ( 'q' === $ult_trend_settings['search_by'] ) { $graph_type_new = $ult_trend_settings['graph_type']; $gtrend_query_new = $ult_trend_settings['gtrend_query']; } else { $graph_type_new = $ult_trend_settings['graph_type_2']; $gtrend_query_new = $ult_trend_settings['gtrend_query_2']; } if ( '' != $ult_trend_settings['gtrend_width'] ) { $width = $ult_trend_settings['gtrend_width']; $width = '&w=' . $width; } if ( '' != $ult_trend_settings['gtrend_height'] ) { $height = $ult_trend_settings['gtrend_height']; $height = '&h=' . $height; } $id = uniqid( 'vc-trends-' ); $output = ''; // phpcs:ignore:WordPress.WP.EnqueuedResources.NonEnqueuedScript return $output; } } new Ultimate_Google_Trends(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Google_Trends' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Google_Trends extends WPBakeryShortCode { } } } ultimate_swatch_book.php000064400000107533150212230100011457 0ustar00 __( 'Swatch Book', 'ultimate_vc' ), 'base' => 'swatch_container', 'class' => 'vc_swatch_container', 'icon' => 'vc_swatch_container', 'category' => 'Ultimate VC Addons', 'deprecated' => '3.13.5', 'as_parent' => array( 'only' => 'swatch_item' ), 'description' => __( 'Interactive swatch strips.', 'ultimate_vc' ), 'content_element' => true, 'show_settings_on_create' => true, 'js_view' => 'VcColumnView', 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Swatch Book Style', 'ultimate_vc' ), 'param_name' => 'swatch_style', 'value' => array( __( 'Style 1', 'ultimate_vc' ) => 'style-1', __( 'Style 2', 'ultimate_vc' ) => 'style-2', __( 'Style 3', 'ultimate_vc' ) => 'style-3', __( 'Style 4', 'ultimate_vc' ) => 'style-4', __( 'Style 5', 'ultimate_vc' ) => 'style-5', __( 'Custom Style', 'ultimate_vc' ) => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Index of Center Strip', 'ultimate_vc' ), 'param_name' => 'swatch_index_center', 'value' => 1, 'min' => 1, 'max' => 100, 'suffix' => '', 'description' => __( 'The index of the “centered” item, the one that will have an angle of 0 degrees when the swatch book is opened', 'ultimate_vc' ), 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Space Between Two Swatches', 'ultimate_vc' ), 'param_name' => 'swatch_space_degree', 'value' => 1, 'min' => 1, 'max' => 1000, 'suffix' => '', 'description' => __( 'The space between the items (in degrees)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Transition Speed', 'ultimate_vc' ), 'param_name' => 'swatch_trans_speed', 'value' => 500, 'min' => 1, 'max' => 10000, 'suffix' => 'ms', 'description' => __( 'The speed and transition timing functions', 'ultimate_vc' ), 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Distance From Open Item To Its Next Sibling', 'ultimate_vc' ), 'param_name' => 'swatch_distance_sibling', 'value' => 1, 'min' => 1, 'max' => 10000, 'suffix' => '', 'description' => __( 'Distance From Opened item’s next siblings (neighbor : 4)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Swatch book will be initially closed', 'ultimate_vc' ), 'param_name' => 'swatch_init_closed', 'value' => '', 'options' => array( 'closed' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Index of the item that will be opened initially', 'ultimate_vc' ), 'param_name' => 'swatch_open_at', 'value' => 1, 'min' => 1, 'max' => 100, 'suffix' => '', 'dependency' => array( 'element' => 'swatch_style', 'value' => 'custom', ), 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Width', 'ultimate_vc' ), 'param_name' => 'swatch_width', 'value' => 130, 'min' => 100, 'max' => 1000, 'suffix' => '', 'group' => 'Initial Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Height', 'ultimate_vc' ), 'param_name' => 'swatch_height', 'value' => 400, 'min' => 100, 'max' => 1000, 'suffix' => '', 'group' => 'Initial Settings', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Background Transparent Pattern', 'ultimate_vc' ), 'param_name' => 'swatch_trans_bg_img', 'value' => '', 'group' => 'Initial Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Main Strip Title Text', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_text', 'value' => '', 'description' => '', 'group' => 'Initial Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Main Strip Highlight Text', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_highlight_text', 'value' => '', 'group' => 'Initial Settings', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'main_strip_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Advanced Settings', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'main_strip_font_style', 'group' => 'Advanced Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Main Strip Title Font Size', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_font_size', 'value' => 16, 'min' => 1, 'max' => 72, 'suffix' => 'px', 'group' => 'Advanced Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Main Strip Title Font Style', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_font_style', 'value' => array( __( 'Normal', 'ultimate_vc' ) => 'normal', __( 'Bold', 'ultimate_vc' ) => 'bold', __( 'Italic', 'ultimate_vc' ) => 'italic', ), 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main Strip Title Color:', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_color', 'value' => '', 'description' => '', 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main Strip Title Background Color:', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_bg_color', 'value' => '', 'group' => 'Advanced Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Main Strip Title Highlight Font Size', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_highlight_font_size', 'value' => 16, 'min' => 1, 'max' => 72, 'suffix' => 'px', 'group' => 'Advanced Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Main Strip Title Highlight Font Weight', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_highlight_font_weight', 'value' => array( __( 'Normal', 'ultimate_vc' ) => 'normal', __( 'Bold', 'ultimate_vc' ) => 'bold', __( 'Italic', 'ultimate_vc' ) => 'italic', ), 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main Strip Title Highlight Color', 'ultimate_vc' ), 'param_name' => 'swatch_main_strip_highlight_color', 'value' => '', 'group' => 'Advanced Settings', ), ), ) ); // vc_map. vc_map( array( 'name' => __( 'Swatch Book Item', 'ultimate_vc' ), 'base' => 'swatch_item', 'class' => 'vc_swatch_item', 'icon' => 'vc_swatch_item', 'content_element' => true, 'as_child' => array( 'only' => 'swatch_container' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Strip Title Text', 'ultimate_vc' ), 'param_name' => 'swatch_strip_text', 'value' => '', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( 'Font Icon Manager' => 'selector', 'Custom Image Icon' => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Strip Title Font Size', 'ultimate_vc' ), 'param_name' => 'swatch_strip_font_size', 'value' => 16, 'min' => 1, 'max' => 72, 'suffix' => 'px', 'group' => 'Advanced Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Strip Title Font Weight', 'ultimate_vc' ), 'param_name' => 'swatch_strip_font_weight', 'value' => array( __( 'Normal', 'ultimate_vc' ) => 'normal', __( 'Bold', 'ultimate_vc' ) => 'bold', __( 'Italic', 'ultimate_vc' ) => 'italic', ), 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Strip Title Color:', 'ultimate_vc' ), 'param_name' => 'swatch_strip_font_color', 'value' => '', 'description' => '', 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Strip Title Background Color:', 'ultimate_vc' ), 'param_name' => 'swatch_strip_title_bg_color', 'value' => '', 'group' => 'Advanced Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Strip Background Color:', 'ultimate_vc' ), 'param_name' => 'swatch_strip_bg_color', 'value' => '', 'group' => 'Advanced Settings', ), ), ) ); // vc_map. } } /** * Render function for Swatch Book Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function swatch_container( $atts, $content = null ) { $ult_swatch_settings = shortcode_atts( array( 'swatch_style' => 'style-1', 'swatch_index_center' => '1', 'swatch_space_degree' => '1', 'swatch_trans_speed' => '500', 'swatch_distance_sibling' => '1', 'swatch_init_closed' => 'on', 'swatch_open_at' => '1', 'swatch_width' => '130', 'swatch_height' => '400', 'swatch_trans_bg_img' => '', 'swatch_main_strip_text' => '', 'swatch_main_strip_highlight_text' => '', 'swatch_main_strip_font_size' => '16', 'swatch_main_strip_font_style' => 'normal', 'swatch_main_strip_color' => '', 'swatch_main_strip_highlight_font_size' => '16', 'swatch_main_strip_highlight_font_weight' => 'normal', 'swatch_main_strip_highlight_color' => '', 'swatch_main_strip_bg_color' => '', 'main_strip_font_family' => '', 'main_strip_font_style' => '', ), $atts ); $output = ''; $img = ''; $style = ''; $highlight_style = ''; $main_style = ''; $uid = uniqid(); if ( '' !== $ult_swatch_settings['swatch_trans_bg_img'] ) { $img = apply_filters( 'ult_get_img_single', $ult_swatch_settings['swatch_trans_bg_img'], 'url' ); $this->swatch_trans_bg_img = $ult_swatch_settings['swatch_trans_bg_img']; $style .= 'background-image: url(' . esc_url( $img ) . ');'; } if ( '' !== $ult_swatch_settings['swatch_width'] ) { $style .= 'width:' . $ult_swatch_settings['swatch_width'] . 'px;'; $this->swatch_width = $ult_swatch_settings['swatch_width']; } if ( '' !== $ult_swatch_settings['swatch_height'] ) { $style .= 'height:' . $ult_swatch_settings['swatch_height'] . 'px;'; $this->swatch_height = $ult_swatch_settings['swatch_height']; } if ( '' !== $ult_swatch_settings['swatch_main_strip_highlight_font_size'] ) { $highlight_style .= 'font-size:' . $ult_swatch_settings['swatch_main_strip_highlight_font_size'] . 'px;'; } if ( '' !== $ult_swatch_settings['swatch_main_strip_highlight_font_weight'] ) { $highlight_style .= 'font-weight:' . $ult_swatch_settings['swatch_main_strip_highlight_font_weight'] . ';'; } if ( '' !== $ult_swatch_settings['swatch_main_strip_highlight_color'] ) { $highlight_style .= 'color:' . $ult_swatch_settings['swatch_main_strip_highlight_color'] . ';'; } if ( '' != $ult_swatch_settings['main_strip_font_family'] ) { $mhfont_family = get_ultimate_font_family( $ult_swatch_settings['main_strip_font_family'] ); $main_style .= 'font-family:\'' . $mhfont_family . '\';'; } $main_style .= get_ultimate_font_style( $ult_swatch_settings['main_strip_font_style'] ); if ( '' !== $ult_swatch_settings['swatch_main_strip_font_size'] ) { $main_style .= 'font-size:' . $ult_swatch_settings['swatch_main_strip_font_size'] . 'px;'; } if ( '' !== $ult_swatch_settings['swatch_main_strip_font_style'] ) { $main_style .= 'font-weight:' . $ult_swatch_settings['swatch_main_strip_font_style'] . ';'; } if ( '' !== $ult_swatch_settings['swatch_main_strip_color'] ) { $main_style .= 'color:' . $ult_swatch_settings['swatch_main_strip_color'] . ';'; } if ( '' !== $ult_swatch_settings['swatch_main_strip_bg_color'] ) { $main_style .= 'background:' . $ult_swatch_settings['swatch_main_strip_bg_color'] . ';'; } $output .= '
'; $output .= do_shortcode( $content ); $output .= '
'; $output .= '

' . $ult_swatch_settings['swatch_main_strip_text'] . '

'; $output .= '
' . $ult_swatch_settings['swatch_main_strip_highlight_text'] . '
'; $output .= '
'; $output .= '
'; $output .= ''; return $output; } /** * Render function for Swatch Book Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function swatch_item( $atts, $content = null ) { $ult_swatcht_settings = shortcode_atts( array( 'swatch_strip_text' => '', 'icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_animation' => '', 'swatch_strip_font_size' => '', 'swatch_strip_font_weight' => '', 'swatch_strip_font_color' => '', 'swatch_strip_bg_color' => '', 'swatch_strip_title_bg_color' => '', 'el_class' => '', ), $atts ); $output = ''; $box_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_swatcht_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_swatcht_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_swatcht_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_swatcht_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_swatcht_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_swatcht_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_swatcht_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_swatcht_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_swatcht_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_swatcht_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_swatcht_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_swatcht_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_swatcht_settings['icon_border_spacing'] ) . '" icon_animation="' . esc_attr( $ult_swatcht_settings['icon_animation'] ) . '"]' ); $style = ''; if ( '' !== $this->swatch_trans_bg_img ) { $img = apply_filters( 'ult_get_img_single', $this->swatch_trans_bg_img, 'url' ); $style .= 'background-image: url(' . esc_url( $img ) . ');'; } if ( '' !== $ult_swatcht_settings['swatch_strip_bg_color'] ) { $style .= 'background-color: ' . esc_attr( $ult_swatcht_settings['swatch_strip_bg_color'] ) . ';'; } if ( '' !== $this->swatch_width ) { $style .= 'width:' . esc_attr( $this->swatch_width ) . 'px;'; } if ( '' !== $this->swatch_height ) { $style .= 'height:' . esc_attr( $this->swatch_height ) . 'px;'; } $output .= '
'; $output .= '' . $box_icon . ''; $output .= '

' . $ult_swatcht_settings['swatch_strip_text'] . '

'; $output .= '
'; return $output; } } } global $ultimate_swatch_book; $ultimate_swatch_book = new Ultimate_Swatch_Book(); if ( class_exists( 'WPBakeryShortCodesContainer' ) ) { if ( ! class_exists( 'WPBakeryShortCode_Swatch_Container' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Swatch_Container extends WPBakeryShortCodesContainer { /** * Extended the class of the WPBakeryShortCodesContainer. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function content( $atts, $content = null ) { global $ultimate_swatch_book; return $ultimate_swatch_book->swatch_ocntainer( $atts, $content ); } } } if ( ! class_exists( 'WPBakeryShortCode_Swatch_Item' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Swatch_Item extends WPBakeryShortCode { /** * Extended the class of the WPBakeryShortCodesContainer. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function content( $atts, $content = null ) { global $ultimate_swatch_book; return $ultimate_swatch_book->swatch_item( $atts, $content ); } } } } ultimate_ihover.php000064400000133467150212230100010455 0ustar00 'circle', 'el_class' => '', 'thumb_height_width' => '250', 'res_thumb_height_width' => '', 'responsive_size' => 'off', 'align' => 'center', 'gutter_width' => '30', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; // Shape. $shape = ''; if ( '' != $ult_ihover_setting['thumb_shape'] ) : $glob_ihover_shape = $ult_ihover_setting['thumb_shape']; $shape = ' data-shape="' . $ult_ihover_setting['thumb_shape'] . '" '; endif; // Height/Width. $width = ''; $height = ''; if ( '' != $ult_ihover_setting['thumb_height_width'] ) : $glob_thumb_height_width = $ult_ihover_setting['thumb_height_width']; $width = ' data-width="' . esc_attr( $ult_ihover_setting['thumb_height_width'] ) . '" '; $height = ' data-height="' . esc_attr( $ult_ihover_setting['thumb_height_width'] ) . '" '; endif; // Responsive Height/Width. $res_width = ''; $res_height = ''; if ( 'on' == $ult_ihover_setting['responsive_size'] && '' != $ult_ihover_setting['res_thumb_height_width'] ) { $res_width = ' data-res_width="' . esc_attr( $ult_ihover_setting['res_thumb_height_width'] ) . '" '; $res_height = ' data-res_height="' . esc_attr( $ult_ihover_setting['res_thumb_height_width'] ) . '" '; } // Gutter Width. if ( '' != $ult_ihover_setting['gutter_width'] ) : $glob_gutter_width = $ult_ihover_setting['gutter_width']; endif; // Extra Class. $ex_class = ''; if ( '' != $ult_ihover_setting['el_class'] ) : $ex_class = $ult_ihover_setting['el_class']; endif; $container_style = ''; if ( '' != $ult_ihover_setting['align'] ) { $container_style = 'text-align:' . $ult_ihover_setting['align'] . '; ';} $output .= '
'; $output .= ' '; $output .= '
'; return $output; } /** * Render function for Ultimate iHover item Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ult_ihover_item_callback( $atts, $content = null ) { global $glob_gutter_width, $glob_thumb_height_width, $glob_ihover_shape; global $glob_gutter_width; global $glob_thumb_height_width; global $glob_ihover_effectdirection; // Item. $title_responsive_font_line_height = ''; $desc_font_size = ''; $desc_font_line_height = ''; $item_output = ''; $item_output = ''; $target = ''; $link_title = ''; $rel = ''; $url = ''; $ult_ihover_settings = shortcode_atts( array( 'thumb_img' => '', 'title' => '', 'heading_tag' => '', 'title_text_typography' => '', 'title_font' => '', 'title_font_style' => '', 'title_responsive_font_size' => 'desktop:22px;', 'title_responsive_line_height' => 'desktop:28px;', 'title_font_color' => '#ffffff', 'desc_text_typography' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_responsive_font_size' => 'desktop:12px;', 'desc_responsive_line_height' => 'desktop:18px;', 'desc_font_color' => '#bbbbbb', 'info_color_bg' => 'rgba(0,0,0,0.75)', 'hover_effect' => 'effect1', 'effect_direction' => 'right_to_left', 'spacer_border' => 'solid', 'spacer_border_color' => 'rgba(255,255,255,0.75)', 'spacer_width' => '100', 'spacer_border_width' => '1', 'block_click' => '', 'block_link' => '', 'thumbnail_border_styling' => 'solid', 'block_border_color' => 'rgba(255,255,255,0.2)', 'spinner_top_left_border_color' => '#ecab18', 'spinner_bottom_right_border_color' => '#1ad280', 'block_border_size' => '20', 'effect_scale' => 'scale_up', 'effect_top_bottom' => 'top_to_bottom', 'effect_left_right' => 'left_to_right', 'title_margin' => '', 'divider_margin' => '', 'description_margin' => '', ), $atts ); $content = wpb_js_remove_wpautop( $content, true ); // fix unclosed/unwanted paragraph tags in $content. $info_style = ''; $title_style = ''; $desc_style = ''; $thumbnail_border_style = ''; if ( '' != $ult_ihover_settings['info_color_bg'] ) : $info_style .= 'background-color: ' . $ult_ihover_settings['info_color_bg'] . '; '; endif; if ( '' != $ult_ihover_settings['title_font'] ) { $font_family = get_ultimate_font_family( $ult_ihover_settings['title_font'] ); $title_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_ihover_settings['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_ihover_settings['title_font_style'] ); } if ( '' != $ult_ihover_settings['title_font_color'] ) { $title_style .= 'color:' . $ult_ihover_settings['title_font_color'] . ';'; } if ( '' != $ult_ihover_settings['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_ihover_settings['desc_font'] ); $desc_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_ihover_settings['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_ihover_settings['desc_font_style'] ); } if ( '' != $ult_ihover_settings['desc_font_color'] ) { $desc_style .= 'color:' . $ult_ihover_settings['desc_font_color'] . ';'; } $spacer_line_style = ''; $spacer_style = ''; if ( '' != $ult_ihover_settings['spacer_border'] ) { $spacer_line_style .= 'border-style:' . $ult_ihover_settings['spacer_border'] . ';'; if ( '' != $ult_ihover_settings['spacer_border_color'] ) { $spacer_line_style .= 'border-color:' . $ult_ihover_settings['spacer_border_color'] . ';'; } if ( '' != $ult_ihover_settings['spacer_width'] ) { $spacer_line_style .= 'width:' . $ult_ihover_settings['spacer_width'] . 'px;'; } if ( '' != $ult_ihover_settings['spacer_border_width'] ) { $spacer_line_style .= 'border-width:' . $ult_ihover_settings['spacer_border_width'] . 'px;'; /* spacer height */ $spacer_style .= 'height:' . $ult_ihover_settings['spacer_border_width'] . 'px;'; } } $thumb_url = ''; $thumb_alt = ''; if ( '' != $ult_ihover_settings['thumb_img'] ) { $img = apply_filters( 'ult_get_img_single', $ult_ihover_settings['thumb_img'], 'url' ); $thumb_alt = apply_filters( 'ult_get_img_single', $ult_ihover_settings['thumb_img'], 'alt' ); if ( '' == $thumb_alt ) { $thumb_alt = 'image'; } $thumb_url = $img; } if ( '' != $ult_ihover_settings['thumbnail_border_styling'] && 'none' != $ult_ihover_settings['thumbnail_border_styling'] ) { $thumbnail_border_style .= 'border-style: ' . $ult_ihover_settings['thumbnail_border_styling'] . '; '; if ( '' != $ult_ihover_settings['block_border_color'] ) : $thumbnail_border_style .= 'border-color: ' . $ult_ihover_settings['block_border_color'] . '; '; endif; if ( '' != $ult_ihover_settings['block_border_size'] ) : $thumbnail_border_style .= 'border-width: ' . $ult_ihover_settings['block_border_size'] . 'px;'; endif; } $height_width = ''; $img_width = ''; $img_width = ''; if ( '' != $glob_thumb_height_width ) { $height_width .= 'height: ' . $glob_thumb_height_width . 'px; '; $height_width .= 'width: ' . $glob_thumb_height_width . 'px; '; } $effect = ''; if ( '' != $ult_ihover_settings['hover_effect'] ) : $effect = $ult_ihover_settings['hover_effect']; endif; $spinner_border_color = null; if ( 'effect20' == $effect ) { if ( '' != $ult_ihover_settings['spinner_top_left_border_color'] ) : $spinner_border_color .= 'border-top-color: ' . $ult_ihover_settings['spinner_top_left_border_color'] . '; border-left-color : ' . $ult_ihover_settings['spinner_top_left_border_color'] . '; '; endif; if ( '' != $ult_ihover_settings['spinner_bottom_right_border_color'] ) : $spinner_border_color .= 'border-bottom-color: ' . $ult_ihover_settings['spinner_bottom_right_border_color'] . '; border-right-color : ' . $ult_ihover_settings['spinner_bottom_right_border_color'] . '; '; endif; } $scale = ''; switch ( $effect ) { case 'effect6': if ( '' != $ult_ihover_settings['effect_scale'] ) : $scale = 'ult-ih-' . $ult_ihover_settings['effect_scale']; endif; break; } // Directions: [left, right, top, bottom]. $direction = ''; switch ( $effect ) { case 'effect2': case 'effect3': case 'effect4': case 'effect7': case 'effect8': case 'effect9': case 'effect11': case 'effect12': case 'effect13': case 'effect14': case 'effect18': if ( '' != $ult_ihover_settings['effect_direction'] ) : $direction = 'ult-ih-' . $ult_ihover_settings['effect_direction']; endif; break; } $top_bottom = ''; switch ( $effect ) { case 'effect10': case 'effect1': case 'effect20': if ( '' != $ult_ihover_settings['effect_top_bottom'] ) : $top_bottom = 'ult-ih-' . $ult_ihover_settings['effect_top_bottom']; endif; break; } $left_right = ''; switch ( $effect ) { case 'effect16': if ( '' != $ult_ihover_settings['effect_left_right'] ) : $left_right = 'ult-ih-' . $ult_ihover_settings['effect_left_right']; endif; break; } $gutter_margin = ''; if ( '' != $glob_gutter_width ) { $gutter_margin = 'margin: ' . ( $glob_gutter_width / 2 ) . 'px'; } $heading_block = ''; $description_block = ''; if ( '' != $ult_ihover_settings['title_margin'] ) { $heading_block .= $ult_ihover_settings['title_margin']; } if ( '' != $ult_ihover_settings['description_margin'] ) { $description_block .= $ult_ihover_settings['description_margin']; } if ( '' != $ult_ihover_settings['divider_margin'] ) { $spacer_style .= $ult_ihover_settings['divider_margin']; } if ( '' != $ult_ihover_settings['block_link'] ) { $href = vc_build_link( $ult_ihover_settings['block_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; } $item_id = 'ult-ih-list-item-' . wp_rand( 1000, 9999 ); // responsive font size and line height for title. $args = array( 'target' => '#' . $item_id . ' .ult-ih-heading', 'media_sizes' => array( 'font-size' => $ult_ihover_settings['title_responsive_font_size'], 'line-height' => $ult_ihover_settings['title_responsive_line_height'], ), ); $title_responsive = get_ultimate_vc_responsive_media_css( $args ); // Assigning tag to title. $ult_ihover_settings['heading_tag'] = ( isset( $ult_ihover_settings['heading_tag'] ) && trim( $ult_ihover_settings['heading_tag'] ) != '' ) ? $ult_ihover_settings['heading_tag'] : 'h3'; // resposnive font size and line height for description. $args = array( 'target' => '#' . $item_id . ' .ult-ih-description, #' . $item_id . ' .ult-ih-description p', 'media_sizes' => array( 'font-size' => $ult_ihover_settings['desc_responsive_font_size'], 'line-height' => $ult_ihover_settings['desc_responsive_line_height'], ), ); $desc_responsive = get_ultimate_vc_responsive_media_css( $args ); $item_output .= '
  • '; if ( '' != $ult_ihover_settings['block_click'] ) { $item_output .= '
    '; } else { $item_output .= '
    '; } $height_widthe20 = ''; $img_width = ''; $img_width = ''; if ( '' != $glob_thumb_height_width && 'effect20' == $effect ) { $glob_thumb_height_width = $glob_thumb_height_width; $height_widthe20 .= 'height: ' . $glob_thumb_height_width . 'px; '; $height_widthe20 .= 'width: ' . $glob_thumb_height_width . 'px; '; } switch ( $effect ) { case 'effect8': $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' ' . esc_attr( $thumb_alt ) . ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= $this->common_structure( $desc_responsive, $title_responsive, $heading_block, $title_style, $ult_ihover_settings, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content ); $item_output .= '
    '; $item_output .= '
    '; break; case 'effect1': case 'effect5': case 'effect18': $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' ' . esc_attr( $thumb_alt ) . ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= $this->common_structure( $desc_responsive, $title_responsive, $heading_block, $title_style, $ult_ihover_settings, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content ); $item_output .= '
    '; $item_output .= '
    '; break; case 'effect20': $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' ' . esc_attr( $thumb_alt ) . ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= $this->common_structure( $desc_responsive, $title_responsive, $heading_block, $title_style, $ult_ihover_settings, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content ); $item_output .= '
    '; $item_output .= '
    '; break; default: $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' ' . esc_attr( $thumb_alt ) . ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= $this->common_structure( $desc_responsive, $title_responsive, $heading_block, $title_style, $ult_ihover_settings, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content ); $item_output .= '
    '; $item_output .= '
    '; break; } // Check anchor. if ( '' != $ult_ihover_settings['block_click'] ) { $item_output .= '
    '; } else { $item_output .= '
    '; } $item_output .= '
  • '; return $item_output; } /** * Render function for Ultimate iHover item Module. * * @param string $desc_responsive have a value string. * @param string $title_responsive have a value string. * @param string $heading_block have a value string. * @param string $title_style have a value string. * @param array $ult_ihover_settings have a value string. * @param string $spacer_style have a value string. * @param string $spacer_line_style have a value string. * @param string $description_block have a value string. * @param string $desc_style have a value string. * @param string $content value has been set to null. * @access public */ public function common_structure( $desc_responsive, $title_responsive, $heading_block, $title_style, $ult_ihover_settings, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content ) { $item_output = ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' <' . $ult_ihover_settings['heading_tag'] . ' class="ult-ih-heading ult-responsive" style="' . esc_attr( $title_style ) . '" ' . $title_responsive . '>' . $ult_ihover_settings['title'] . ''; $item_output .= '
    '; $item_output .= '
    '; $item_output .= ' '; $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; if ( '' != $content ) { $item_output .= $content; } $item_output .= '
    '; $item_output .= '
    '; $item_output .= '
    '; return $item_output; } /** * Function that initializes settings of Ultimate iHover Module. * * @method ult_ihover_init */ public function ult_ihover_init() { // Register "container" content element. It will hold all your inner (child) content elements. if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'iHover', 'ultimate_vc' ), 'base' => 'ult_ihover', 'as_parent' => array( 'only' => 'ult_ihover_item' ), // Use only|except attributes to limit child shortcodes (separate multiple values with comma). 'content_element' => true, 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'icon' => 'ult_ihover', 'class' => 'ult_ihover', 'description' => __( 'Image hover effects with information.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Thumbnail Shape', 'ultimate_vc' ), 'param_name' => 'thumb_shape', 'value' => array( 'Circle' => 'circle', 'Square' => 'square', ), 'admin_label' => true, ), array( 'type' => 'number', 'heading' => __( 'Thumbnail Height & Width', 'ultimate_vc' ), 'param_name' => 'thumb_height_width', 'admin_label' => true, 'suffix' => 'px', 'value' => '', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Responsive Size', 'ultimate_vc' ), 'param_name' => 'responsive_size', 'default_set' => true, 'value' => '', 'options' => array( 'on' => array( 'label' => __( 'Add responsive size below 768px.', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), ), array( 'type' => 'number', 'heading' => __( 'Responsive Thumbnail Height & Width', 'ultimate_vc' ), 'param_name' => 'res_thumb_height_width', 'suffix' => 'px', 'value' => '', 'dependency' => array( 'element' => 'responsive_size', 'value' => 'on', ), ), array( 'type' => 'number', 'heading' => __( 'Spacing Between Two Thumbnails', 'ultimate_vc' ), 'param_name' => 'gutter_width', 'suffix' => 'px', 'value' => '', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'iHover Alignment', 'ultimate_vc' ), 'param_name' => 'align', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), ), 'js_view' => 'VcColumnView', ) ); vc_map( array( 'name' => __( 'iHover Item', 'ultimate_vc' ), 'base' => 'ult_ihover_item', 'content_element' => true, 'icon' => 'ult_ihover', 'class' => 'ult_ihover', 'as_child' => array( 'only' => 'ult_ihover' ), // Use only|except attributes to limit parent (separate multiple values with comma). 'is_container' => false, 'params' => array( // General. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'title', 'admin_label' => true, 'value' => '', 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image', 'ultimate_vc' ), 'param_name' => 'thumb_img', 'value' => '', 'description' => __( 'Upload image.', 'ultimate_vc' ), ), array( 'type' => 'textarea_html', 'holder' => '', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Provide the description for the iHover.', 'ultimate_vc' ), 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), // Effects. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Effect', 'ultimate_vc' ), 'param_name' => 'hover_effect', 'admin_label' => true, 'value' => array( __( 'Effect 1', 'ultimate_vc' ) => 'effect1', __( 'Effect 2', 'ultimate_vc' ) => 'effect2', __( 'Effect 3', 'ultimate_vc' ) => 'effect3', __( 'Effect 4', 'ultimate_vc' ) => 'effect4', __( 'Effect 5', 'ultimate_vc' ) => 'effect5', __( 'Effect 6', 'ultimate_vc' ) => 'effect6', __( 'Effect 7', 'ultimate_vc' ) => 'effect7', __( 'Effect 8', 'ultimate_vc' ) => 'effect8', __( 'Effect 9', 'ultimate_vc' ) => 'effect9', __( 'Effect 10', 'ultimate_vc' ) => 'effect10', __( 'Effect 11', 'ultimate_vc' ) => 'effect11', __( 'Effect 12', 'ultimate_vc' ) => 'effect12', __( 'Effect 13', 'ultimate_vc' ) => 'effect13', __( 'Effect 14', 'ultimate_vc' ) => 'effect14', __( 'Effect 15', 'ultimate_vc' ) => 'effect15', __( 'Effect 16', 'ultimate_vc' ) => 'effect16', __( 'Effect 17', 'ultimate_vc' ) => 'effect17', __( 'Effect 18', 'ultimate_vc' ) => 'effect18', __( 'Effect 19', 'ultimate_vc' ) => 'effect19', __( 'Effect 20', 'ultimate_vc' ) => 'effect20', ), 'description' => __( 'Select the Hover Effect for iHover.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Effect Direction', 'ultimate_vc' ), 'param_name' => 'effect_direction', 'value' => array( __( 'Towards Left', 'ultimate_vc' ) => 'right_to_left', __( 'Towards Right', 'ultimate_vc' ) => 'left_to_right', __( 'Towards Top', 'ultimate_vc' ) => 'bottom_to_top', __( 'Towards Bottom', 'ultimate_vc' ) => 'top_to_bottom', ), 'description' => __( 'Select the Hover Effect Direction for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect2', 'effect3', 'effect4', 'effect7', 'effect8', 'effect9', 'effect11', 'effect12', 'effect13', 'effect14', 'effect18' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Effect Scale', 'ultimate_vc' ), 'param_name' => 'effect_scale', 'value' => array( __( 'Scale Up', 'ultimate_vc' ) => 'scale_up', __( 'Scale Down', 'ultimate_vc' ) => 'scale_down', __( 'Scale Down Up', 'ultimate_vc' ) => 'scale_down_up', ), 'description' => __( 'Select the Hover Effect Scale for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => 'effect6', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Effect Direction', 'ultimate_vc' ), 'param_name' => 'effect_top_bottom', 'value' => array( __( 'Top to Bottom', 'ultimate_vc' ) => 'top_to_bottom', __( 'Bottom to Top', 'ultimate_vc' ) => 'bottom_to_top', ), 'description' => __( 'Select the Hover Effect Direction for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect10' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hover Effect Direction', 'ultimate_vc' ), 'param_name' => 'effect_left_right', 'value' => array( __( 'Left to Right', 'ultimate_vc' ) => 'left_to_right', __( 'Right to Left', 'ultimate_vc' ) => 'right_to_left', ), 'description' => __( 'Select the Hover Effect Direction for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => 'effect16', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'On Click', 'ultimate_vc' ), 'param_name' => 'block_click', 'value' => array( __( 'Do Nothing', 'ultimate_vc' ) => '', __( 'Link', 'ultimate_vc' ) => 'link', ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Apply Link to:', 'ultimate_vc' ), 'param_name' => 'block_link', 'value' => '', 'description' => __( 'Provide the link for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'block_click', 'value' => 'link', ), ), array( 'type' => 'colorpicker', 'param_name' => 'title_font_color', 'heading' => __( 'Title Color', 'ultimate_vc' ), 'group' => 'Design', 'value' => '#ffffff', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Description Color', 'ultimate_vc' ), 'group' => 'Design', 'value' => '', ), array( 'type' => 'colorpicker', 'param_name' => 'info_color_bg', 'heading' => __( 'iHover Background Color', 'ultimate_vc' ), 'group' => 'Design', 'value' => '', ), array( 'type' => 'ult_param_heading', 'param_name' => 'thumbnail_border_styling_text', 'text' => __( 'Thumbnail Border Styling', 'ultimate_vc' ), 'value' => '', 'group' => 'Design', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect1', 'effect2', 'effect3', 'effect4', 'effect5', 'effect6', 'effect7', 'effect8', 'effect9', 'effect10', 'effect11', 'effect12', 'effect13', 'effect14', 'effect15', 'effect16', 'effect17', 'effect18', 'effect19' ), ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'spinner_border_styling_text', 'text' => __( 'Spinner Border Styling', 'ultimate_vc' ), 'value' => '', 'group' => 'Design', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect20' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'thumbnail_border_styling', 'value' => array( __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'None', 'ultimate_vc' ) => 'none', ), 'description' => __( 'Select Thumbnail Border Style for iHover.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect1', 'effect2', 'effect3', 'effect4', 'effect5', 'effect6', 'effect7', 'effect8', 'effect9', 'effect10', 'effect11', 'effect12', 'effect13', 'effect14', 'effect15', 'effect16', 'effect17', 'effect18', 'effect19' ), ), 'group' => 'Design', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'block_border_color', 'value' => '', 'dependency' => array( 'element' => 'thumbnail_border_styling', 'value' => 'solid', ), 'group' => 'Design', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Spinner - Top-Left', 'ultimate_vc' ), 'param_name' => 'spinner_top_left_border_color', 'value' => '#ecab18', 'description' => __( 'Select Spinner - Top-Left Border Color.', 'ultimate' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect20' ), ), 'group' => 'Design', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Spinner - Bottom-Right', 'ultimate_vc' ), 'param_name' => 'spinner_bottom_right_border_color', 'value' => '#1ad280', 'description' => __( 'Select Spinner - Bottom Right Border Color.', 'ultimate' ), 'dependency' => array( 'element' => 'hover_effect', 'value' => array( 'effect20' ), ), 'group' => 'Design', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Thickness', 'ultimate_vc' ), 'param_name' => 'block_border_size', 'value' => '', 'suffix' => 'px', 'dependency' => array( 'element' => 'thumbnail_border_styling', 'value' => 'solid', ), 'group' => 'Design', ), // Divider. array( 'type' => 'ult_param_heading', 'param_name' => 'thumbnail_divider_styling_text', 'text' => __( 'Heading & Description Divider', 'ultimate_vc' ), 'value' => '', 'group' => 'Design', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Divider - Style', 'ultimate_vc' ), 'param_name' => 'spacer_border', 'value' => array( __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', __( 'None', 'ultimate_vc' ) => 'none', ), 'description' => __( "Select Heading & Description's Divider Border Style.", 'ultimate_vc' ), 'group' => 'Design', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Divider - Border Color', 'ultimate_vc' ), 'param_name' => 'spacer_border_color', 'value' => 'rgba(255,255,255,0.75)', 'description' => __( 'Select Divider Border Color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'spacer_border', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => 'Design', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Divider - Line Width (optional)', 'ultimate_vc' ), 'param_name' => 'spacer_width', 'value' => '', 'suffix' => 'px', 'description' => __( 'Width of Divider Border. Default: 100%;', 'ultimate_vc' ), 'dependency' => array( 'element' => 'spacer_border', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => 'Design', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Divider - Border Thickness', 'ultimate_vc' ), 'param_name' => 'spacer_border_width', 'value' => '', 'suffix' => 'px', 'description' => __( 'Height of Divider Border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'spacer_border', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), 'group' => 'Design', ), array( 'type' => 'ult_param_heading', 'param_name' => 'thumbnail_spacing_styling_text', 'text' => __( 'Spacing', 'ultimate_vc' ), 'value' => '', 'description' => __( 'Add Space Between Title, Divider and Description. Just put only numbers in textbox. All values will consider in px.', 'ultimate_vc' ), 'group' => 'Design', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_margins', 'heading' => __( 'Title Margins', 'ultimate_vc' ), 'param_name' => 'title_margin', 'positions' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'group' => 'Design', ), array( 'type' => 'ultimate_margins', 'heading' => __( 'Divider Margins', 'ultimate_vc' ), 'param_name' => 'divider_margin', 'positions' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'group' => 'Design', ), array( 'type' => 'ultimate_margins', 'heading' => __( 'Description Margins', 'ultimate_vc' ), 'param_name' => 'description_margin', 'positions' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'group' => 'Design', ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'text' => __( 'Title settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_responsive_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '22', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_responsive_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '28', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'text' => __( 'Description settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_responsive_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '12', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_responsive_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '18', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), ), ) ); } } /** * Load plugin css and javascript files which you may need on front end of your site. * * @method ult_ihover_scripts */ public function ult_ihover_scripts() { Ultimate_VC_Addons::ultimate_register_style( 'ult_ihover_css', 'ihover' ); Ultimate_VC_Addons::ultimate_register_script( 'ult_ihover_js', 'ihover', false, array( 'jquery' ), ULTIMATE_VERSION, true ); } } // Finally initialize code. new ULT_IHover(); if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ult_Ihover' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Ihover extends WPBakeryShortCodesContainer { } } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Ihover_Item' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Ihover_Item extends WPBakeryShortCode { } } } ultimate_info_list.php000064400000136173150212230100011144 0ustar00connector_animate = ''; $this->connect_color_style = ''; $this->icon_style = ''; $this->icon_style = ''; if ( Ultimate_VC_Addons::$uavc_editor_enable ) { add_action( 'init', array( $this, 'add_info_list' ) ); } if ( function_exists( 'vc_is_inline' ) ) { if ( ! vc_is_inline() ) { add_shortcode( 'info_list', array( $this, 'info_list' ) ); add_shortcode( 'info_list_item', array( $this, 'info_list_item' ) ); } } else { add_shortcode( 'info_list', array( $this, 'info_list' ) ); add_shortcode( 'info_list_item', array( $this, 'info_list_item' ) ); } } /** * Render function for Ultimate Info List Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function info_list( $atts, $content = null ) { $this->icon_style = ''; $this->connector_animate = ''; $this->icon_font = ''; $this->border_col = ''; $info_list_link_html = ''; $ult_info_list_settings = shortcode_atts( array( 'position' => 'left', 'style' => 'square with_bg', 'connector_animation' => '', 'icon_color' => '#333333', 'icon_bg_color' => '#ffffff', 'eg_br_style' => 'dashed', 'eg_br_width' => '1', 'connector_color' => '#333333', 'border_color' => '#333333', 'font_size_icon' => '24', 'icon_border_style' => 'none', 'icon_border_size' => '1', 'el_class' => '', 'css_info_list' => '', ), $atts ); $this->connect_color_style = ''; $ult_info_list_settings['css_info_list'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_info_list_settings['css_info_list'], ' ' ), 'info_list', $atts ); $ult_info_list_settings['css_info_list'] = esc_attr( $ult_info_list_settings['css_info_list'] ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $eg_br_width_plus = ''; if ( 'left' == $ult_info_list_settings['position'] && 'none' != $ult_info_list_settings['eg_br_style'] && '' != $ult_info_list_settings['eg_br_width'] && '' != $ult_info_list_settings['connector_color'] ) { if ( is_rtl() ) { $this->connect_color_style = 'border-left-width: ' . $ult_info_list_settings['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-left-style: ' . $ult_info_list_settings['eg_br_style'] . ';'; } else { $this->connect_color_style = 'border-right-width: ' . $ult_info_list_settings['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-right-style: ' . $ult_info_list_settings['eg_br_style'] . ';'; } $this->connect_color_style .= 'border-color: ' . $ult_info_list_settings['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_settings['style'] || 'circle with_bg' == $ult_info_list_settings['style'] || 'hexagon' == $ult_info_list_settings['style'] ) && (int) $ult_info_list_settings['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_settings['font_size_icon'] * 3 ) + ( (int) $ult_info_list_settings['icon_border_size'] * 2 ) - ( (int) $ult_info_list_settings['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'left: ' . $eg_br_width_plus . 'px;'; } } if ( 'right' == $ult_info_list_settings['position'] && 'none' != $ult_info_list_settings['eg_br_style'] && '' != $ult_info_list_settings['eg_br_width'] && '' != $ult_info_list_settings['connector_color'] ) { if ( is_rtl() ) { $this->connect_color_style = 'border-right-width: ' . $ult_info_list_settings['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-right-style: ' . $ult_info_list_settings['eg_br_style'] . ';'; } else { $this->connect_color_style = 'border-left-width: ' . $ult_info_list_settings['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-left-style: ' . $ult_info_list_settings['eg_br_style'] . ';'; } $this->connect_color_style .= 'border-color: ' . $ult_info_list_settings['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_settings['style'] || 'circle with_bg' == $ult_info_list_settings['style'] || 'hexagon' == $ult_info_list_settings['style'] ) && (int) $ult_info_list_settings['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_settings['font_size_icon'] * 3 ) + ( (int) $ult_info_list_settings['icon_border_size'] * 2 ) - ( (int) $ult_info_list_settings['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'right: ' . $eg_br_width_plus . 'px;'; } } if ( 'top' == $ult_info_list_settings['position'] && 'none' != $ult_info_list_settings['eg_br_style'] && '' != $ult_info_list_settings['eg_br_width'] && '' != $ult_info_list_settings['connector_color'] ) { $this->connect_color_style = 'border-top-width: ' . $ult_info_list_settings['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-top-style: ' . $ult_info_list_settings['eg_br_style'] . ';'; $this->connect_color_style .= 'border-color: ' . $ult_info_list_settings['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_settings['style'] || 'circle with_bg' == $ult_info_list_settings['style'] ) && (int) $ult_info_list_settings['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_settings['font_size_icon'] * 3 ) + ( (int) $ult_info_list_settings['icon_border_size'] * 2 ) - ( (int) $ult_info_list_settings['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'top: ' . $eg_br_width_plus . 'px;'; } } if ( 'none' == $ult_info_list_settings['eg_br_style'] && ( 'left' == $ult_info_list_settings['position'] || 'right' == $ult_info_list_settings['position'] || 'top' == $ult_info_list_settings['position'] ) ) { $this->connect_color_style = 'border: none !important;'; } $this->border_col = $ult_info_list_settings['border_color']; if ( 'square with_bg' == $ult_info_list_settings['style'] || 'circle with_bg' == $ult_info_list_settings['style'] || 'hexagon' == $ult_info_list_settings['style'] ) { $this->icon_font = 'font-size:' . ( $ult_info_list_settings['font_size_icon'] * 3 ) . 'px;'; if ( '' !== $ult_info_list_settings['icon_border_size'] ) { $this->icon_style .= 'font-size:' . $ult_info_list_settings['font_size_icon'] . 'px;'; if ( 'hexagon' !== $ult_info_list_settings['style'] ) { $this->icon_style .= 'border-width:' . $ult_info_list_settings['icon_border_size'] . 'px;'; $this->icon_style .= 'border-style:' . $ult_info_list_settings['icon_border_style'] . ';'; } $this->icon_style .= 'background:' . $ult_info_list_settings['icon_bg_color'] . ';'; $this->icon_style .= 'color:' . $ult_info_list_settings['icon_color'] . ';'; if ( 'hexagon' == $ult_info_list_settings['style'] ) { $this->icon_style .= 'border-color:' . $ult_info_list_settings['icon_bg_color'] . ';'; } else { $this->icon_style .= 'border-color:' . $ult_info_list_settings['border_color'] . ';'; } } } else { $big_size = ( $ult_info_list_settings['font_size_icon'] * 3 ) + ( $ult_info_list_settings['icon_border_size'] * 2 ); if ( '' !== $ult_info_list_settings['icon_border_size'] ) { $this->icon_font = 'font-size:' . $big_size . 'px;'; $this->icon_style .= 'font-size:' . $ult_info_list_settings['font_size_icon'] . 'px;'; $this->icon_style .= 'border-width:' . $ult_info_list_settings['icon_border_size'] . 'px;'; $this->icon_style .= 'border-style:' . $ult_info_list_settings['icon_border_style'] . ';'; $this->icon_style .= 'color:' . $ult_info_list_settings['icon_color'] . ';'; $this->icon_style .= 'border-color:' . $ult_info_list_settings['border_color'] . ';'; } } $this->icon_size = $ult_info_list_settings['font_size_icon']; if ( 'top' == $ult_info_list_settings['position'] ) { $this->connector_animate = 'fadeInLeft'; } else { $this->connector_animate = $ult_info_list_settings['connector_animation']; } $output = '
    '; $output .= ''; $output .= '
    '; return $output; } /** * Render function for Ultimate Info List Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function info_list_item( $atts, $content = null ) { // Do nothing. $icon_color = ''; $icon_bg_color = ''; $ult_info_list_item = shortcode_atts( array( 'list_title' => '', 'heading_tag' => 'h3', 'animation' => '', 'list_icon' => '', 'icon_img' => '', 'icon_type' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '16', 'title_font_line_height' => '24', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '13', 'desc_font_color' => '', 'desc_font_line_height' => '18', 'info_list_link' => '', 'info_list_link_apply' => '', ), $atts ); $css_trans = ''; $style = ''; $ico_col = ''; $connector_trans = ''; $icon_html = ''; $title_style = ''; $desc_style = ''; $info_list_link_html = ''; $target = ''; $link_title = ''; $rel = ''; $is_link = false; if ( '' != $ult_info_list_item['info_list_link'] ) { $href = vc_build_link( $ult_info_list_item['info_list_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; if ( '' != $url ) { $info_list_link_html = ''; } $is_link = true; } /* title */ if ( '' != $ult_info_list_item['title_font'] ) { $font_family = get_ultimate_font_family( $ult_info_list_item['title_font'] ); $title_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_info_list_item['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_info_list_item['title_font_style'] ); } if ( is_numeric( $ult_info_list_item['title_font_size'] ) ) { $ult_info_list_item['title_font_size'] = 'desktop:' . $ult_info_list_item['title_font_size'] . 'px;'; } if ( is_numeric( $ult_info_list_item['title_font_line_height'] ) ) { $ult_info_list_item['title_font_line_height'] = 'desktop:' . $ult_info_list_item['title_font_line_height'] . 'px;'; } $info_list_id = 'Info-list-wrap-' . wp_rand( 1000, 9999 ); $info_list_args = array( 'target' => '#' . $info_list_id . ' ' . $ult_info_list_item['heading_tag'], // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_list_item['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_list_item['title_font_line_height'], ), ); $info_list_data_list = get_ultimate_vc_responsive_media_css( $info_list_args ); if ( '' != $ult_info_list_item['title_font_color'] ) { $title_style .= 'color:' . $ult_info_list_item['title_font_color'] . ';'; } /* description */ if ( '' != $ult_info_list_item['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_info_list_item['desc_font'] ); $desc_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_info_list_item['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_info_list_item['desc_font_style'] ); } if ( is_numeric( $ult_info_list_item['desc_font_size'] ) ) { $ult_info_list_item['desc_font_size'] = 'desktop:' . $ult_info_list_item['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_info_list_item['desc_font_line_height'] ) ) { $ult_info_list_item['desc_font_line_height'] = 'desktop:' . $ult_info_list_item['desc_font_line_height'] . 'px;'; } $info_list_desc_args = array( 'target' => '#' . $info_list_id . ' .icon_description_text', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_list_item['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_list_item['desc_font_line_height'], ), ); $info_list_desc_data_list = get_ultimate_vc_responsive_media_css( $info_list_desc_args ); if ( '' != $ult_info_list_item['desc_font_color'] ) { $desc_style .= 'color:' . $ult_info_list_item['desc_font_color'] . ';'; } if ( 'none' !== $ult_info_list_item['animation'] ) { $css_trans = 'data-animation="' . $ult_info_list_item['animation'] . '" data-animation-delay="03"'; } if ( $this->connector_animate ) { $connector_trans = 'data-animation="' . $this->connector_animate . '" data-animation-delay="03"'; } if ( '' != $icon_color ) { $ico_col = 'style="color:' . $icon_color . '";'; } if ( '' != $icon_bg_color ) { $style .= 'background:' . $icon_bg_color . '; color:' . $icon_bg_color . ';'; } if ( '' != $icon_bg_color ) { $style .= 'border-color:' . $this->border_col . ';'; } if ( 'custom' == $ult_info_list_item['icon_type'] ) { $img = apply_filters( 'ult_get_img_single', $ult_info_list_item['icon_img'], 'url', 'large' ); $alt = apply_filters( 'ult_get_img_single', $ult_info_list_item['icon_img'], 'alt' ); if ( '' == $alt ) { $alt = 'icon'; } $icon_html .= '
    '; $icon_html .= '' . esc_attr( $alt ) . ''; if ( $is_link && 'icon' == $ult_info_list_item['info_list_link_apply'] ) { $icon_html .= $info_list_link_html; } $icon_html .= '
    '; // } } else { $icon_html .= '
    '; $icon_html .= ''; if ( $is_link && 'icon' == $ult_info_list_item['info_list_link_apply'] ) { $icon_html .= $info_list_link_html; } $icon_html .= '
    '; } $output = '
  • '; $output .= $icon_html; $output .= '
    '; if ( '' != $ult_info_list_item['list_title'] ) { $output .= '<' . $ult_info_list_item['heading_tag'] . ' class="ult-responsive info-list-heading" ' . $info_list_data_list . ' style="' . esc_attr( $title_style ) . '">'; if ( $is_link && 'title' == $ult_info_list_item['info_list_link_apply'] ) { $output .= '' . $ult_info_list_item['list_title'] . ''; } else { $output .= $ult_info_list_item['list_title']; } $output .= ''; } $output .= '
    ' . wpb_js_remove_wpautop( $content, true ) . '
    '; $output .= '
    '; $output .= '
    '; if ( $is_link && 'container' == $ult_info_list_item['info_list_link_apply'] ) { $output .= $info_list_link_html; } $output .= '
  • '; return $output; } /** * Shortcode Functions for frontend editor.. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function front_info_list( $atts, $content = null ) { // Do nothing. $ult_info_list_front = shortcode_atts( array( 'position' => 'left', 'style' => 'square with_bg', 'connector_animation' => '', 'icon_color' => '#333333', 'icon_bg_color' => '#ffffff', 'eg_br_style' => 'dashed', 'eg_br_width' => '1', 'connector_color' => '#333333', 'border_color' => '#333333', 'font_size_icon' => '24', 'icon_border_style' => 'none', 'icon_border_size' => '1', 'el_class' => '', ), $atts ); $eg_br_width_plus = ''; if ( 'left' == $ult_info_list_front['position'] && 'none' != $ult_info_list_front['eg_br_style'] && '' != $ult_info_list_front['eg_br_width'] && '' != $ult_info_list_front['connector_color'] ) { $this->connect_color_style = 'border-right-width: ' . $ult_info_list_front['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-right-style: ' . $ult_info_list_front['eg_br_style'] . ';'; $this->connect_color_style .= 'border-color: ' . $ult_info_list_front['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_front['style'] || 'circle with_bg' == $ult_info_list_front['style'] || 'hexagon' == $ult_info_list_front['style'] ) && (int) $ult_info_list_front['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_front['font_size_icon'] * 3 ) + ( (int) $ult_info_list_front['icon_border_size'] * 2 ) - ( (int) $ult_info_list_front['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'left: ' . $eg_br_width_plus . 'px;'; } } if ( 'right' == $ult_info_list_front['position'] && 'none' != $ult_info_list_front['eg_br_style'] && '' != $ult_info_list_front['eg_br_width'] && '' != $ult_info_list_front['connector_color'] ) { $this->connect_color_style = 'border-left-width: ' . $ult_info_list_front['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-left-style: ' . $ult_info_list_front['eg_br_style'] . ';'; $this->connect_color_style .= 'border-color: ' . $ult_info_list_front['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_front['style'] || 'circle with_bg' == $ult_info_list_front['style'] || 'hexagon' == $ult_info_list_front['style'] ) && (int) $ult_info_list_front['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_front['font_size_icon'] * 3 ) + ( (int) $ult_info_list_front['icon_border_size'] * 2 ) - ( (int) $ult_info_list_front['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'right: ' . $eg_br_width_plus . 'px;'; } } if ( 'top' == $ult_info_list_front['position'] && 'none' != $ult_info_list_front['eg_br_style'] && '' != $ult_info_list_front['eg_br_width'] && '' != $ult_info_list_front['connector_color'] ) { $this->connect_color_style = 'border-top-width: ' . $ult_info_list_front['eg_br_width'] . 'px;'; $this->connect_color_style .= 'border-top-style: ' . $ult_info_list_front['eg_br_style'] . ';'; $this->connect_color_style .= 'border-color: ' . $ult_info_list_front['connector_color'] . ';'; if ( ( 'square with_bg' == $ult_info_list_front['style'] || 'circle with_bg' == $ult_info_list_front['style'] ) && (int) $ult_info_list_front['eg_br_width'] > 1 ) { $eg_br_width_plus = ( ( $ult_info_list_front['font_size_icon'] * 3 ) + ( (int) $ult_info_list_front['icon_border_size'] * 2 ) - ( (int) $ult_info_list_front['eg_br_width'] ) ) / 2; $this->connect_color_style .= 'top: ' . $eg_br_width_plus . 'px;'; } } if ( 'none' == $ult_info_list_front['eg_br_style'] && ( 'left' == $ult_info_list_front['position'] || 'right' == $ult_info_list_front['position'] || 'top' == $ult_info_list_front['position'] ) ) { $this->connect_color_style = 'border: none !important;'; } $this->border_col = $ult_info_list_front['border_color']; if ( 'square with_bg' == $ult_info_list_front['style'] || 'circle with_bg' == $ult_info_list_front['style'] || 'hexagon' == $ult_info_list_front['style'] ) { $this->icon_font = 'font-size:' . ( $ult_info_list_front['font_size_icon'] * 3 ) . 'px;'; if ( '' !== $ult_info_list_front['icon_border_size'] ) { $this->icon_style = 'font-size:' . $ult_info_list_front['font_size_icon'] . 'px;'; $this->icon_style .= 'border-width:0px;'; $this->icon_style .= 'border-style:none;'; $this->icon_style .= 'background:' . $ult_info_list_front['icon_bg_color'] . ';'; $this->icon_style .= 'color:' . $ult_info_list_front['icon_color'] . ';'; if ( 'hexagon' == $ult_info_list_front['style'] ) { $this->icon_style .= 'border-color:' . $ult_info_list_front['icon_bg_color'] . ';'; } else { $this->icon_style .= 'border-color:' . $ult_info_list_front['border_color'] . ';'; } } } else { $big_size = ( $ult_info_list_front['font_size_icon'] * 3 ) + ( $ult_info_list_front['icon_border_size'] * 2 ); if ( '' !== $ult_info_list_front['icon_border_size'] ) { $this->icon_font = 'font-size:' . $big_size . 'px;'; $this->icon_style = 'font-size:' . $ult_info_list_front['font_size_icon'] . 'px;'; $this->icon_style .= 'border-width:' . $ult_info_list_front['icon_border_size'] . 'px;'; $this->icon_style .= 'border-style:' . $ult_info_list_front['icon_border_style'] . ';'; $this->icon_style .= 'color:' . $ult_info_list_front['icon_color'] . ';'; $this->icon_style .= 'border-color:' . $ult_info_list_front['border_color'] . ';'; } } if ( 'top' == $ult_info_list_front['position'] ) { $this->connector_animate = 'fadeInLeft'; } else { $this->connector_animate = $ult_info_list_front['connector_animation']; } $output = '
    '; $output .= ''; $output .= '
    '; return $output; } /** * Frontend List for Ultimate Info List Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function front_info_list_item( $atts, $content = null ) { // Do nothing. $icon_color = ''; $icon_bg_color = ''; $icon_type = ''; $ult_info_list_front_item = shortcode_atts( array( 'list_title' => '', 'animation' => '', 'list_icon' => '', 'icon_img' => '', 'icon_type' => '', ), $atts ); $css_trans = ''; $style = ''; $ico_col = ''; $connector_trans = ''; $icon_html = ''; if ( 'none' !== $ult_info_list_front_item['animation'] ) { $css_trans = 'data-animation="' . esc_attr( $ult_info_list_front_item['animation'] ) . '" data-animation-delay="03"'; } if ( $this->connector_animate ) { $connector_trans = 'data-animation="' . esc_attr( $this->connector_animate ) . '" data-animation-delay="02"'; } if ( '' != $icon_color ) { $ico_col = 'style="color:' . $icon_color . '";'; } if ( '' != $icon_bg_color ) { $style .= 'background:' . $icon_bg_color . '; color:' . $icon_bg_color . ';'; } if ( '' != $icon_bg_color ) { $style .= 'border-color:' . $this->border_col . ';'; } if ( 'selector' == $ult_info_list_front_item['icon_type'] ) { $icon_html .= '
    '; $icon_html .= ''; $icon_html .= '
    '; } else { $img = apply_filters( 'ult_get_img_single', $ult_info_list_front_item['icon_img'], 'url', 'large' ); $icon_html .= '
    '; $icon_html .= 'icon'; $img = apply_filters( 'ult_get_img_single', $ult_info_list_front_item['icon_img'], 'url' ); $icon_html .= '
    '; $icon_html .= 'icon'; $icon_html .= '
    '; } $output = '
  • '; $output .= $icon_html; $output .= '
    '; $output .= '<' . $heading_tag . '>' . $ult_info_list_front_item['list_title'] . ''; $output .= wpb_js_remove_wpautop( $content, true ); $output .= '
    '; $output .= '
    '; $output .= '
  • '; return $output; } /** * Render function for Ultimate Heading Module. * * @access public */ public function add_info_list() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Info List', 'ultimate_vc' ), 'base' => 'info_list', 'class' => 'vc_info_list', 'icon' => 'vc_icon_list', 'category' => 'Ultimate VC Addons', 'as_parent' => array( 'only' => 'info_list_item' ), 'description' => __( 'Text blocks connected together in one list.', 'ultimate_vc' ), 'content_element' => true, 'show_settings_on_create' => true, 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Position', 'ultimate_vc' ), 'param_name' => 'position', 'value' => array( __( 'Icon to the Left', 'ultimate_vc' ) => 'left', __( 'Icon to the Right', 'ultimate_vc' ) => 'right', __( 'Icon at Top', 'ultimate_vc' ) => 'top', ), 'description' => __( 'Select the icon position for icon list.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Style of Image or Icon + Color', 'ultimate_vc' ), 'param_name' => 'style', 'value' => array( __( 'Square With Background', 'ultimate_vc' ) => 'square with_bg', __( 'Circle With Background', 'ultimate_vc' ) => 'circle with_bg', __( 'Hexagon With Background', 'ultimate_vc' ) => 'hexagon', ), 'description' => __( 'Select the icon style for icon list.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Background Color:', 'ultimate_vc' ), 'param_name' => 'icon_bg_color', 'value' => '#ffffff', 'description' => __( 'Select the color for icon background.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'square with_bg', 'circle with_bg', 'hexagon' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color:', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Select the color for icon.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon Font Size', 'ultimate_vc' ), 'param_name' => 'font_size_icon', 'value' => 24, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'Enter value in pixels.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'style', 'value' => array( 'square with_bg', 'circle with_bg' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 0, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color:', 'ultimate_vc' ), 'param_name' => 'border_color', 'value' => '#333333', 'description' => __( 'Select the color border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'value' => array( 'solid', 'dashed', 'dotted', 'double', 'inset', 'outset' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Line Style', 'ultimate_vc' ), 'param_name' => 'eg_br_style', 'value' => array( __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'None', 'ultimate_vc' ) => 'none', ), 'group' => 'Connector', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Width', 'ultimate_vc' ), 'param_name' => 'eg_br_width', 'value' => 1, 'min' => 0, 'max' => 10, 'suffix' => 'px', 'dependency' => array( 'element' => 'eg_br_style', 'value' => array( 'solid', 'dashed', 'dotted' ), ), 'group' => 'Connector', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Line Color:', 'ultimate_vc' ), 'param_name' => 'connector_color', 'value' => '#333333', 'dependency' => array( 'element' => 'eg_br_style', 'value' => array( 'solid', 'dashed', 'dotted' ), ), 'description' => __( 'Select the color for connector line.', 'ultimate_vc' ), 'group' => 'Connector', ), array( 'type' => 'checkbox', 'class' => '', 'heading' => __( 'Line Animation: ', 'ultimate_vc' ), 'param_name' => 'connector_animation', 'value' => array( __( 'Enabled', 'ultimate_vc' ) => 'fadeInUp', ), 'dependency' => array( 'element' => 'eg_br_style', 'value' => array( 'solid', 'dashed', 'dotted' ), ), 'description' => __( 'Select wheather to animate connector or not', 'ultimate_vc' ), 'group' => 'Connector', ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the info list, and you can use this class for your customizations.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_info_list', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), 'js_view' => 'VcColumnView', ) ); // Add list item. vc_map( array( 'name' => __( 'Info List Item', 'ultimate_vc' ), 'base' => 'info_list_item', 'class' => 'vc_info_list', 'icon' => 'vc_icon_list', 'category' => 'Ultimate VC Addons', 'content_element' => true, 'as_child' => array( 'only' => 'info_list' ), 'is_container' => false, 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'list_title', 'value' => '', 'description' => __( 'Provide a title for this icon list item.', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select List Icon ', 'ultimate_vc' ), 'param_name' => 'list_icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Animation', 'ultimate_vc' ), 'param_name' => 'animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Select the animation style for icon.', 'ultimate_vc' ), ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Description about this list item', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Apply link To', 'ultimate_vc' ), 'param_name' => 'info_list_link_apply', 'value' => array( __( 'No Link', 'ultimate_vc' ) => 'no-link', __( 'Complete Container', 'ultimate_vc' ) => 'container', __( 'List Title', 'ultimate_vc' ) => 'title', __( 'Icon', 'ultimate_vc' ) => 'icon', ), ), array( 'type' => 'vc_link', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'info_list_link', 'dependency' => array( 'element' => 'info_list_link_apply', 'value' => array( 'container', 'title', 'icon' ), ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'text' => __( 'Title Settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font Line Height', 'ultimate_vc' ), 'param_name' => 'title_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'title_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'text' => __( 'Description Settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font Line Height', 'ultimate_vc' ), 'param_name' => 'desc_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), ), ) ); }//endif } } } global $a_i_o_info_list; // WPB: Beter to create singleton in AIO_Info_list I think, but it also work. if ( class_exists( 'WPBakeryShortCodesContainer' ) ) { if ( ! class_exists( 'WPBakeryShortCode_Info_List' ) ) { /** * WPBakeryShortCode_info_list initial setup */ class WPBakeryShortCode_Info_List extends WPBakeryShortCodesContainer { /** * Content. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function content( $atts, $content = null ) { global $a_i_o_info_list; return $a_i_o_info_list->front_info_list( $atts, $content ); } } } if ( ! class_exists( 'WPBakeryShortCode_Info_List_Item' ) ) { /** * WPBakeryShortCode_info_list_item initial setup */ class WPBakeryShortCode_Info_List_Item extends WPBakeryShortCode { /** * Content. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function content( $atts, $content = null ) { global $a_i_o_info_list; return $a_i_o_info_list->front_info_list_item( $atts, $content ); } } } } if ( class_exists( 'AIO_Info_List' ) ) { $a_i_o_info_list = new AIO_Info_List(); } ultimate_headings.php000064400000111330150212230100010724 0ustar00 __( 'Headings', 'ultimate_vc' ), 'base' => 'ultimate_heading', 'class' => 'vc_ultimate_heading', 'icon' => 'vc_ultimate_heading', 'category' => 'Ultimate VC Addons', 'description' => __( 'Awesome heading styles.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'heading' => __( 'Text source', 'ultimate_vc' ), 'param_name' => 'source', 'value' => array( __( 'Custom text', 'ultimate_vc' ) => '', __( 'Post or Page Title', 'ultimate_vc' ) => 'post_title', ), 'std' => '', 'description' => __( 'Select text source.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'main_heading', 'holder' => 'div', 'value' => '', 'dependency' => array( 'element' => 'source', 'is_empty' => true, ), ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h2', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H2', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => __( 'Heading Settings', 'ultimate_vc' ), 'param_name' => 'main_heading_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'main_heading_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'main_heading_style', 'group' => 'Typography', ), // Responsive Param. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'main_heading_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'main_heading_color', 'value' => '', 'group' => 'Typography', ), // responsive. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'main_heading_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'text', 'heading' => '

    ' . __( 'Enter values with respective unites. Example - 10px, 10em, 10%, etc.', 'ultimate_vc' ) . '

    ', 'param_name' => 'margin_design_tab_text', 'group' => 'Design', ), array( 'type' => 'ultimate_margins', 'heading' => __( 'Heading Margins', 'ultimate_vc' ), 'param_name' => 'main_heading_margin', 'positions' => array( 'Top' => 'top', 'Bottom' => 'bottom', ), 'group' => 'Design', ), array( 'type' => 'textarea_html', 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', 'heading' => __( 'Sub Heading (Optional)', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Sub Heading Settings', 'ultimate_vc' ), 'param_name' => 'sub_heading_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'sub_heading_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'sub_heading_style', 'group' => 'Typography', ), // responsive font size. array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font Size', 'ultimate_vc' ), 'param_name' => 'sub_heading_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'sub_heading_color', 'value' => '', 'group' => 'Typography', ), // responsive. array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'sub_heading_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_margins', 'heading' => 'Sub Heading Margins', 'param_name' => 'sub_heading_margin', 'positions' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', ), 'group' => 'Design', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'alignment', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Separator', 'ultimate_vc' ), 'param_name' => 'spacer', 'value' => array( __( 'No Separator', 'ultimate_vc' ) => 'no_spacer', __( 'Line', 'ultimate_vc' ) => 'line_only', __( 'Icon', 'ultimate_vc' ) => 'icon_only', __( 'Image', 'ultimate_vc' ) => 'image_only', __( 'Line with icon/image', 'ultimate_vc' ) => 'line_with_icon', ), 'description' => __( 'Horizontal line, icon or image to divide sections', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Separator Position', 'ultimate_vc' ), 'param_name' => 'spacer_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Between Heading & Sub-Heading', 'ultimate_vc' ) => 'middle', __( 'Bottom', 'ultimate_vc' ) => 'bottom', ), 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only', 'icon_only', 'image_only' ), ), ), array( 'type' => 'ult_img_single', 'heading' => __( 'Select Image', 'ultimate_vc' ), 'param_name' => 'spacer_img', 'dependency' => array( 'element' => 'spacer', 'value' => array( 'image_only' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'spacer_img_width', 'value' => 48, 'suffix' => 'px', 'description' => __( 'Provide image width (optional)', 'ultimate_vc' ), 'dependency' => array( 'element' => 'spacer', 'value' => array( 'image_only' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Line Style', 'ultimate_vc' ), 'param_name' => 'line_style', 'value' => array( __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Width (optional)', 'ultimate_vc' ), 'param_name' => 'line_width', 'suffix' => 'px', 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'line_height', 'value' => 1, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Line Color', 'ultimate_vc' ), 'param_name' => 'line_color', 'value' => '#333333', 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'icon_only' ), ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'ultimate_margins', 'heading' => 'Separator Margins', 'param_name' => 'spacer_margin', 'positions' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', ), 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon', 'line_only', 'icon_only', 'image_only' ), ), 'group' => 'Design', ), array( 'type' => 'number', 'heading' => __( 'Space between Line & Icon/Image', 'ultimate_vc' ), 'param_name' => 'line_icon_fixer', 'value' => '10', 'suffix' => 'px', 'dependency' => array( 'element' => 'spacer', 'value' => array( 'line_with_icon' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), ), ) ); } } /** * Render function for Ultimate Heading Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_headings_shortcode( $atts, $content = null ) { $wrapper_style = ''; $main_heading_style_inline = ''; $sub_heading_style_inline = ''; $line_style_inline = ''; $icon_inline = ''; $output = ''; $ult_heading_settings['el_class'] = ''; $ult_heading_settings = shortcode_atts( array( 'source' => '', 'main_heading' => '', 'main_heading_font_size' => '', 'main_heading_line_height' => '', 'main_heading_font_family' => '', 'main_heading_style' => '', 'main_heading_color' => '', 'main_heading_margin' => '', 'sub_heading' => '', 'sub_heading_font_size' => '', 'sub_heading_line_height' => '', 'sub_heading_font_family' => '', 'sub_heading_style' => '', 'sub_heading_color' => '', 'sub_heading_margin' => '', 'spacer' => 'no_spacer', 'spacer_position' => 'top', 'spacer_img' => '', 'spacer_img_width' => '', 'line_style' => 'solid', 'line_width' => 'auto', 'line_height' => '1', 'line_color' => '#ccc', 'icon_type' => 'selector', 'icon' => '', 'icon_color' => '', 'icon_style' => 'none', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'alignment' => 'center', 'spacer_margin' => 'top', 'line_icon_fixer' => '10', 'heading_tag' => '', 'el_class' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $wrapper_class = $ult_heading_settings['spacer']; if ( '' == $ult_heading_settings['heading_tag'] ) { $ult_heading_settings['heading_tag'] = 'h2'; } if ( 'post_title' == $ult_heading_settings['source'] ) { global $post; $ult_heading_settings['main_heading'] = $post->post_title; } // main heading styles. if ( '' != $ult_heading_settings['main_heading_font_family'] ) { $mhfont_family = get_ultimate_font_family( $ult_heading_settings['main_heading_font_family'] ); if ( $mhfont_family ) { $main_heading_style_inline .= 'font-family:\'' . $mhfont_family . '\';'; } } // main heading font style. $main_heading_style_inline .= get_ultimate_font_style( $ult_heading_settings['main_heading_style'] ); // attach font size if set. // attach font color if set. if ( '' != $ult_heading_settings['main_heading_color'] ) { $main_heading_style_inline .= 'color:' . $ult_heading_settings['main_heading_color'] . ';'; } // attach margins for main heading. if ( '' != $ult_heading_settings['main_heading_margin'] ) { $main_heading_style_inline .= $ult_heading_settings['main_heading_margin']; } /* ----- sub heading styles ----- */ if ( '' != $ult_heading_settings['sub_heading_font_family'] ) { $shfont_family = get_ultimate_font_family( $ult_heading_settings['sub_heading_font_family'] ); if ( '' != $shfont_family ) { $sub_heading_style_inline .= 'font-family:\'' . $shfont_family . '\';'; } } // sub heaing font style. $sub_heading_style_inline .= get_ultimate_font_style( $ult_heading_settings['sub_heading_style'] ); // attach font color if set. if ( '' != $ult_heading_settings['sub_heading_color'] ) { $sub_heading_style_inline .= 'color:' . $ult_heading_settings['sub_heading_color'] . ';'; } // attach margins for sub heading. if ( '' != $ult_heading_settings['sub_heading_margin'] ) { $sub_heading_style_inline .= $ult_heading_settings['sub_heading_margin']; } if ( '' != $ult_heading_settings['spacer'] ) { $wrapper_style .= $ult_heading_settings['spacer_margin']; } if ( 'line_with_icon' == $ult_heading_settings['spacer'] ) { if ( $ult_heading_settings['line_width'] < $ult_heading_settings['icon_size'] ) { $wrap_width = $ult_heading_settings['icon_size']; } else { $wrap_width = $ult_heading_settings['line_width']; } if ( 'selector' == $ult_heading_settings['icon_type'] ) { $wrapper_style .= 'height:' . $ult_heading_settings['icon_size'] . 'px;'; } $icon_style_inline = 'font-size:' . $ult_heading_settings['icon_size'] . 'px;'; } elseif ( 'line_only' == $ult_heading_settings['spacer'] ) { $wrap_width = $ult_heading_settings['line_width']; $line_style_inline = 'border-style:' . $ult_heading_settings['line_style'] . ';'; $line_style_inline .= 'border-bottom-width:' . $ult_heading_settings['line_height'] . 'px;'; $line_style_inline .= 'border-color:' . $ult_heading_settings['line_color'] . ';'; $line_style_inline .= 'width:' . $wrap_width . 'px;'; $wrapper_style .= 'height:' . $ult_heading_settings['line_height'] . 'px;'; $line = ''; $icon_inline = $line; } elseif ( 'icon_only' == $ult_heading_settings['spacer'] ) { $icon_style_inline = 'font-size:' . $ult_heading_settings['icon_size'] . 'px;'; } elseif ( 'image_only' == $ult_heading_settings['spacer'] ) { if ( ! empty( $ult_heading_settings['spacer_img_width'] ) ) { $siwidth = array( $ult_heading_settings['spacer_img_width'], $ult_heading_settings['spacer_img_width'] ); } else { $siwidth = 'full'; } $spacer_inline = ''; $icon_inline = apply_filters( 'ult_get_img_single', $ult_heading_settings['spacer_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_heading_settings['spacer_img'], 'alt' ); if ( '' !== $ult_heading_settings['spacer_img_width'] ) { $spacer_inline = 'width:' . $ult_heading_settings['spacer_img_width'] . 'px'; } $icon_inline = '' . esc_attr( $alt ) . ''; } // if spacer type is line with icon or only icon show icon or image respectively. if ( 'line_with_icon' == $ult_heading_settings['spacer'] || 'icon_only' == $ult_heading_settings['spacer'] ) { $icon_animation = ''; $icon_inline = do_shortcode( '[just_icon icon_align="' . esc_attr( $ult_heading_settings['alignment'] ) . '" icon_type="' . esc_attr( $ult_heading_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_heading_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_heading_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_heading_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_heading_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_heading_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_heading_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_heading_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_heading_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_heading_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_heading_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_heading_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_heading_settings['icon_border_spacing'] ) . '" icon_animation="' . esc_attr( $icon_animation ) . '"]' ); } if ( 'line_with_icon' == $ult_heading_settings['spacer'] ) { $data = 'data-hline_width="' . esc_attr( $wrap_width ) . '" data-hicon_type="' . esc_attr( $ult_heading_settings['icon_type'] ) . '" data-hborder_style="' . esc_attr( $ult_heading_settings['line_style'] ) . '" data-hborder_height="' . esc_attr( $ult_heading_settings['line_height'] ) . '" data-hborder_color="' . esc_attr( $ult_heading_settings['line_color'] ) . '"'; if ( 'selector' == $ult_heading_settings['icon_type'] ) { $data .= ' data-icon_width="' . esc_attr( $ult_heading_settings['icon_size'] ) . '"'; } else { $data .= ' data-icon_width="' . esc_attr( $ult_heading_settings['img_width'] ) . '"'; } if ( '' != $ult_heading_settings['line_icon_fixer'] ) { $data .= ' data-hfixer="' . esc_attr( $ult_heading_settings['line_icon_fixer'] ) . '" '; } } else { $data = ''; } $micro = wp_rand( 0000, 9999 ); $id = uniqid( 'ultimate-heading-' . $micro ); $uid = 'uvc-' . wp_rand( 0000, 9999 ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $ult_heading_settings['main_heading_font_size'] ) ) { $ult_heading_settings['main_heading_font_size'] = 'desktop:' . $ult_heading_settings['main_heading_font_size'] . 'px;'; } if ( is_numeric( $ult_heading_settings['main_heading_line_height'] ) ) { $ult_heading_settings['main_heading_line_height'] = 'desktop:' . $ult_heading_settings['main_heading_line_height'] . 'px;'; } // responsive {main} heading styles. $args = array( 'target' => '.uvc-heading.' . $id . ' ' . $ult_heading_settings['heading_tag'], 'media_sizes' => array( 'font-size' => $ult_heading_settings['main_heading_font_size'], 'line-height' => $ult_heading_settings['main_heading_line_height'], ), ); $main_heading_responsive = get_ultimate_vc_responsive_media_css( $args ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $ult_heading_settings['sub_heading_font_size'] ) ) { $ult_heading_settings['sub_heading_font_size'] = 'desktop:' . $ult_heading_settings['sub_heading_font_size'] . 'px;'; } if ( is_numeric( $ult_heading_settings['sub_heading_line_height'] ) ) { $ult_heading_settings['sub_heading_line_height'] = 'desktop:' . $ult_heading_settings['sub_heading_line_height'] . 'px;'; } // responsive {sub} heading styles. $args = array( 'target' => '.uvc-heading.' . $id . ' .uvc-sub-heading ', 'media_sizes' => array( 'font-size' => $ult_heading_settings['sub_heading_font_size'], 'line-height' => $ult_heading_settings['sub_heading_line_height'], ), ); $sub_heading_responsive = get_ultimate_vc_responsive_media_css( $args ); $output = '
    '; if ( 'top' == $ult_heading_settings['spacer_position'] ) { $output .= $this->ultimate_heading_spacer( $wrapper_class, $wrapper_style, $icon_inline ); } if ( '' != $ult_heading_settings['main_heading'] ) { $output .= '
    <' . $ult_heading_settings['heading_tag'] . ' style="' . esc_attr( $main_heading_style_inline ) . '">' . $ult_heading_settings['main_heading'] . '
    '; } if ( 'middle' == $ult_heading_settings['spacer_position'] ) { $output .= $this->ultimate_heading_spacer( $wrapper_class, $wrapper_style, $icon_inline ); } if ( '' != $content ) { $output .= '
    ' . do_shortcode( $content ) . '
    '; } if ( 'bottom' == $ult_heading_settings['spacer_position'] ) { $output .= $this->ultimate_heading_spacer( $wrapper_class, $wrapper_style, $icon_inline ); } $output .= '
    '; $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } /** * Render the spacer function for Ultimate Heading Module. * * @param string $wrapper_class get the class. * @param string $wrapper_style get the style. * @param string $icon_inline get the line style. * @access public */ public function ultimate_heading_spacer( $wrapper_class, $wrapper_style, $icon_inline ) { $ult_heading_settings['spacer'] = '
    ' . $icon_inline . '
    '; return $ult_heading_settings['spacer']; } } // end class. new Ultimate_Headings(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Heading' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Heading extends WPBakeryShortCode { } } } ultimate_font_manager.php000064400000075053150212230100011615 0ustar00 "ultimate_google_fonts", "heading" => __("Font Family", "smile"), "param_name" => "heading_font" ), 2) ultimate_google_fonts_style - for respective google font style or default style For Ex - array( "type" => "ultimate_google_fonts_style", "heading" => __("Font Style", "smile"), "param_name" => "heading_style" ), # In respective comoponent shortcode process function 1) Get font family - For Ex - $font_family = get_ultimate_font_family($heading_font); 2) Get font style - For Ex - $font_style = get_ultimate_font_style($heading_style); // deprecated since 3.7.0 - automatically detected font and enqueue accordingly 3) Enqueue the respective fonts - Note send number of font param as a parameter in array For Ex - $args = array( $heading_font ); enquque_ultimate_google_fonts($args); */ if ( ! class_exists( 'Ultimate_Google_Font_Manager' ) ) { /** * Function that initializes Ultimate Parallax. * * @class Ultimate_Google_Font_Manager */ class Ultimate_Google_Font_Manager { /** * Constructor function that constructs default values for the Ultimate Parallax. * * @method __construct */ public function __construct() { add_option( 'ultimate_google_fonts', array() ); add_option( 'ultimate_selected_google_fonts', array() ); add_action( 'wp_ajax_ultimate_google_fonts_refresh', array( $this, 'refresh_google_fonts_list' ) ); add_action( 'wp_ajax_get_google_fonts', array( $this, 'get_google_fonts_list' ) ); add_action( 'wp_ajax_add_google_font', array( $this, 'add_selected_google_font' ) ); add_action( 'wp_ajax_delete_google_font', array( $this, 'delete_selected_google_font' ) ); add_action( 'wp_ajax_update_google_font', array( $this, 'update_selected_google_font' ) ); add_action( 'wp_ajax_get_font_variants', array( $this, 'get_font_variants_callback' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_selected_ultimate_google_fonts' ) ); } /** * Google font manager menu. * * @since ---- * @access public */ public function google_font_manager_menu() { $current_theme = wp_get_theme(); if ( 'Smile' == $current_theme ) { $page = add_submenu_page( 'smile_dashboard', __( 'Google Font Manager', 'ultimate_vc' ), __( 'Google Fonts', 'ultimate_vc' ), 'administrator', 'Ultimate_Font_Manager', array( $this, 'ultimate_font_manager_dashboard' ) ); } else { $page = add_submenu_page( 'bsf-dashboard', __( 'Google Font Manager', 'ultimate_vc' ), __( 'Google Fonts', 'ultimate_vc' ), 'administrator', 'ultimate-font-manager', array( $this, 'ultimate_font_manager_dashboard' ) ); } add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_google_font_scripts' ) ); } /** * Google font admin scripts. * * @since ---- * @access public */ public function admin_google_font_scripts() { wp_register_script( 'ultimate-google-fonts-script', UAVC_URL . 'admin/js/google-fonts-admin.js', array( 'jquery' ), ULTIMATE_VERSION, false ); wp_enqueue_script( 'ultimate-google-fonts-script' ); wp_localize_script( 'ultimate-google-fonts-script', 'uavc', array( 'google_font_nonce' => wp_create_nonce( 'uavc-google-font-nonce' ), 'get_google_fonts' => wp_create_nonce( 'uavc-get-google-fonts-nonce' ), 'add_google_fonts' => wp_create_nonce( 'uavc-add-google-fonts-nonce' ), 'delete_google_fonts' => wp_create_nonce( 'uavc-delete-google-fonts-nonce' ), 'update_google_fonts' => wp_create_nonce( 'uavc-update-google-fonts-nonce' ), ) ); Ultimate_VC_Addons::ultimate_register_style( 'ultimate-google-fonts-style', UAVC_URL . 'admin/css/google-fonts-admin.css', true ); wp_enqueue_style( 'ultimate-google-fonts-style' ); } /** * Enqueue Google font. * * @since ---- * @access public */ public function enqueue_selected_ultimate_google_fonts() { $selected_fonts = get_option( 'ultimate_selected_google_fonts' ); $subset_main_array = array(); if ( ! empty( $selected_fonts ) ) { $count = count( $selected_fonts ); $font_call = ''; foreach ( $selected_fonts as $key => $sfont ) { $variants_array = array(); if ( 0 != $key ) { $font_call .= '|'; } $font_call .= $sfont['font_family']; if ( isset( $sfont['variants'] ) ) : $variants = $sfont['variants']; if ( ! empty( $variants ) ) { $font_call .= ':'; foreach ( $variants as $variant ) { $variant_selected = $variant['variant_selected']; if ( 'true' == $variant_selected || is_admin() ) { array_push( $variants_array, $variant['variant_value'] ); } } $variants_count = count( $variants_array ); if ( 0 != $variants_count ) { $font_call .= 'normal,'; } foreach ( $variants_array as $vkey => $variant ) { $font_call .= $variant; if ( ( $variants_count - 1 ) != $vkey && $variants_count > 0 ) { $font_call .= ','; } } } endif; if ( ! empty( $sfont['subsets'] ) ) { $subset_array = array(); foreach ( $sfont['subsets'] as $tsubset ) { if ( 'true' == $tsubset['subset_selected'] || true == $tsubset['subset_selected'] ) { array_push( $subset_main_array, $tsubset['subset_value'] ); } } } } $subset_string = ''; if ( ! empty( $subset_main_array ) ) { $subset_main_array = array_unique( $subset_main_array ); $subset_string = '&subset='; $subset_count = count( $subset_main_array ); $subset_main_array = array_values( $subset_main_array ); foreach ( $subset_main_array as $skey => $subset ) { if ( '' !== $subset ) { $subset_string .= $subset; if ( ( $skey != $subset_count - 1 ) ) { $subset_string .= ','; } } } } $font_call = str_replace( '||', '|', $font_call ); $link = 'https://fonts.googleapis.com/css?family=' . $font_call; $font_api_call = $link . $subset_string; wp_register_style( 'ultimate-selected-google-fonts-style', $font_api_call, array(), null );// @codingStandardsIgnoreLine. wp_enqueue_style( 'ultimate-selected-google-fonts-style' ); } } /** * Google font manager Dashboard menu. * * @since ---- * @access public */ public function ultimate_font_manager_dashboard() { ?>

     

    $sfont ) { ?>
    $svariants ) { $variant_style = $variant_font; if ( preg_match( '/italic/i', $svariants['variant_value'] ) ) { $variant_style .= 'font-style:italic;'; } $weight = 'normal'; if ( $weight = preg_replace( '/\D/', '', $svariants['variant_value'] ) ) { // @codingStandardsIgnoreLine. $variant_style .= 'font-weight:' . $weight . ';'; } $tlid = $lid . '-' . $svkey; ?> />
    $ssubset ) { $slid = $lid . '-subset-' . $sbkey; ?> />
    items; $google_font_count = count( $google_fonts ); update_option( 'ultimate_google_fonts', $google_fonts ); $response['count'] = ( $google_font_count - $temp_count ); $response['message'] = __( ( $google_font_count - $temp_count ) . ' new fonts added. ', 'ultimate_vc' ); } else { $response['count'] = 0; $response['message'] = __( 'Fonts could not be downloaded as there might be some issue with file_get_contents or wp_remote_get due to your server configuration.', 'ultimate_vc' ); } echo wp_json_encode( $response ); die(); } /** * Get Google font list. * * @since ---- * @access public */ public function get_google_fonts_list() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'uavc-get-google-fonts-nonce', 'security' ); $google_fonts = get_option( 'ultimate_google_fonts' ); $response = array(); $fonts = array(); $search = ''; if ( ! empty( $google_fonts ) ) : $selected_google_fonts = get_option( 'ultimate_selected_google_fonts' ); $temp_selected = array(); if ( ! empty( $selected_google_fonts ) ) { foreach ( $selected_google_fonts as $selected_font ) { array_push( $temp_selected, $selected_font['font_name'] ); } } $start_count = $_POST['start']; $fetch_count = $_POST['fetch']; $search = trim( $_POST['search'] ); $font_slice_array = array(); if ( '' != $search ) { $temp = array(); foreach ( $google_fonts as $tkey => $tfont ) { if ( stripos( $tfont->family, $search ) !== false ) { array_push( $temp, $google_fonts[ $tkey ] ); } } $font_slice_array = $temp; } else { $font_slice_array = array_slice( $google_fonts, $start_count, $fetch_count ); } $count = count( $font_slice_array ); foreach ( $font_slice_array as $key => $tempfont ) { $fontinfo = array(); if ( in_array( $tempfont->family, $temp_selected ) ) { $already_selected = 'true'; } else { $already_selected = 'false'; } $font_call = str_replace( ' ', '+', $tempfont->family ); $variants = $tempfont->variants; $subsets = $tempfont->subsets; $fontinfo = array( 'font_name' => $tempfont->family, 'font_call' => $font_call, 'variants' => $variants, 'subsets' => $subsets, 'selected' => $already_selected, ); array_push( $fonts, $fontinfo ); } endif; $response['fonts'] = $fonts; $response['fonts_count'] = count( $google_fonts ); if ( '' != $search ) { $response['is_search'] = 'true'; } else { $response['is_search'] = 'false'; } echo wp_json_encode( $response ); die(); } /** * Add selected Google font. * * @since ---- * @access public */ public function add_selected_google_font() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'uavc-add-google-fonts-nonce', 'security' ); $font_family = $_POST['font_family']; $font_name = $_POST['font_name']; $variants = $_POST['variants']; $subsets = $_POST['subsets']; $fonts = get_option( 'ultimate_selected_google_fonts' ); if ( empty( $fonts ) ) { $fonts = array(); } $new_font = array( 'font_family' => $font_family, 'font_name' => $font_name, 'variants' => $variants, 'subsets' => $subsets, ); array_push( $fonts, $new_font ); update_option( 'ultimate_selected_google_fonts', $fonts ); echo 'Added'; die(); } /** * Delete selected Google font. * * @since ---- * @access public */ public function delete_selected_google_font() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'uavc-delete-google-fonts-nonce', 'security' ); $font_name = $_POST['font_name']; $fonts = get_option( 'ultimate_selected_google_fonts' ); foreach ( $fonts as $key => $font ) { if ( $font['font_name'] == $font_name ) { unset( $fonts[ $key ] ); } } $fonts = array_values( $fonts ); update_option( 'ultimate_selected_google_fonts', $fonts ); echo 'Deleted'; die(); } /** * Update selected Google font. * * @since ---- * @access public */ public function update_selected_google_font() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'uavc-update-google-fonts-nonce', 'security' ); $font_name = $_POST['font_name']; $variants = $_POST['variants']; $subsets = $_POST['subsets']; $fonts = get_option( 'ultimate_selected_google_fonts' ); foreach ( $fonts as $key => $font ) { if ( $font['font_name'] == $font_name ) { $fonts[ $key ]['variants'] = $variants; $fonts[ $key ]['subsets'] = $subsets; $x = $key; } } update_option( 'ultimate_selected_google_fonts', $fonts ); echo 'Updated'; die(); } /** * Get Google font callback. * * @since ---- * @access public */ public function get_font_variants_callback() { if ( ! current_user_can( 'manage_options' ) ) { return false; } check_ajax_referer( 'uavc-get-font-variants-nonce', 'security' ); $font_name = $_POST['font_name']; $fonts = get_option( 'ultimate_selected_google_fonts' ); $font_variants = array(); $json_variants = array(); $default_variant_styles = array( 0 => array( 'label' => 'Underline', 'style' => 'text-decoration:underline;', 'type' => 'checkbox', 'group' => 'ultimate_defaults_styles', 'class' => 'ultimate_defaults_styles', ), 1 => array( 'label' => 'Italic', 'style' => 'font-style:italic;', 'type' => 'checkbox', 'group' => 'ultimate_defaults_styles', 'class' => 'ultimate_defaults_styles', ), 2 => array( 'label' => 'Bold', 'style' => 'font-weight:bold;', 'type' => 'checkbox', 'group' => 'ultimate_defaults_styles', 'class' => 'ultimate_defaults_styles', ), ); foreach ( $fonts as $key => $font ) { if ( $font['font_name'] == $font_name ) { $font_variants = $fonts[ $key ]['variants']; } } if ( ! empty( $font_variants ) ) { $is_italic = false; $is_weight = false; $uniq_grp = uniqid( '_' ); $pre_default_variants = array(); foreach ( $font_variants as $key => $variant ) { if ( 'true' == $variant['variant_selected'] ) : $temp_array = array(); $is_weight = false; $is_italic = false; if ( preg_match( '/italic/i', $variant['variant_value'] ) && $weight = preg_replace( '/\D/', '', $variant['variant_value'] ) ) { // @codingStandardsIgnoreLine. $temp_array['label'] = $variant['variant_value']; $temp_array['style'] = 'font-style:italic;font-weight:' . $weight . ';'; $is_italic = true; $is_weight = true; } elseif ( preg_match( '/italic/i', $variant['variant_value'] ) ) { $temp_array['label'] = $variant['variant_value']; $temp_array['style'] = 'font-style:italic;'; $is_italic = true; } elseif ( $weight = preg_replace( '/\D/', '', $variant['variant_value'] ) ) { // @codingStandardsIgnoreLine. $temp_array['label'] = $variant['variant_value']; $temp_array['style'] = 'font-weight:' . $weight . ';'; $is_weight = true; } $temp_array['type'] = 'radio'; $temp_array['group'] = 'style_by_google' . $uniq_grp; $temp_array['class'] = 'style_by_google'; array_push( $json_variants, $temp_array ); endif; } array_push( $pre_default_variants, $default_variant_styles[0] ); // 2 for bold if ( false == $is_italic ) { array_push( $pre_default_variants, $default_variant_styles[1] ); // 2 for bold } if ( false == $is_weight ) { array_push( $pre_default_variants, $default_variant_styles[2] ); // 2 for bold } $json_variants = array_merge( $pre_default_variants, $json_variants ); } else { $json_variants = $default_variant_styles; } echo wp_json_encode( $json_variants ); die(); } } // Instantiate the Google Font Manager. new Ultimate_Google_Font_Manager(); } if ( ! function_exists( 'enquque_ultimate_google_fonts' ) ) { /** * Enqueue Google font. * * @since ---- * @param mixed $enqueue_fonts enqip fonts. * @access public */ function enquque_ultimate_google_fonts( $enqueue_fonts ) { $selected_fonts = apply_filters( 'enquque_selected_ultimate_google_fonts_optimzed', get_option( 'ultimate_selected_google_fonts' ) ); $skip_font_enqueue = apply_filters( 'enquque_ultimate_google_fonts_skip', false ); if ( true == $skip_font_enqueue ) { return ''; } $fonts = array(); $subset_call = ''; if ( ! empty( $enqueue_fonts ) ) { foreach ( $enqueue_fonts as $key => $efont ) { $font_name = ''; $font_call = ''; $font_variant = ''; $font_arr = array(); $font_call_arr = array(); $font_weight_arr = array(); $font_arr = explode( '|', $efont ); if ( isset( $font_arr[1] ) ) { $font_call_arr = explode( ':', $font_arr[1] ); if ( isset( $font_arr[2] ) ) { $font_weight_arr = explode( ':', $font_arr[2] ); } if ( isset( $font_call_arr[1] ) && '' != $font_call_arr[1] ) { $font_call = $font_call_arr[1]; $font_name = $font_call_arr[1]; foreach ( $selected_fonts as $sfont ) { if ( $font_name == $sfont['font_family'] ) { if ( ! empty( $sfont['subsets'] ) ) { $subset_array = array(); foreach ( $sfont['subsets'] as $tsubset ) { if ( 'true' == $tsubset['subset_selected'] ) { array_push( $subset_array, $tsubset['subset_value'] ); } } if ( ! empty( $subset_array ) ) : $subset_call = '&subset='; $j = count( $subset_array ); foreach ( $subset_array as $subkey => $subset ) { $subset_call .= $subset; if ( ( $j - 1 ) != $subkey ) { $subset_call .= ','; } } endif; } } } if ( isset( $font_weight_arr[1] ) && '' != $font_weight_arr[1] ) { $font_variant = $font_weight_arr[1]; } $eq_name = str_replace( ' ', '-', $font_name ); if ( '' != $font_variant || 'regular' != $font_variant ) { $font_call .= ':' . $font_variant; $eq_name .= '-' . $font_variant; } $link = 'https://fonts.googleapis.com/css?family=' . $font_call . $subset_call; if ( ! wp_script_is( 'ultimate-' . $eq_name, 'registered' ) ) { wp_register_style( 'ultimate-' . $eq_name, $link );// @codingStandardsIgnoreLine. wp_enqueue_style( 'ultimate-' . $eq_name ); } elseif ( wp_script_is( 'ultimate-' . $eq_name, 'registered' ) ) { wp_enqueue_style( 'ultimate-' . $eq_name ); } } } else // font is without varients. { $eq_name = $font_arr[0]; $link = 'https://fonts.googleapis.com/css?family=' . $eq_name; if ( '' != $eq_name ) { if ( ! wp_script_is( 'ultimate-' . $eq_name, 'registered' ) ) { wp_register_style( 'ultimate-' . $eq_name, $link );// @codingStandardsIgnoreLine. wp_enqueue_style( 'ultimate-' . $eq_name ); } elseif ( wp_script_is( 'ultimate-' . $eq_name, 'registered' ) ) { wp_enqueue_style( 'ultimate-' . $eq_name ); } } } } } } } if ( ! function_exists( 'get_ultimate_font_family' ) ) { /** * Get ultimate font family. * * @since ---- * @param mixed $font_attributes attr variable. * @access public */ function get_ultimate_font_family( $font_attributes ) { if ( ! empty( $font_attributes ) ) { $font_family_arr = explode( '|', $font_attributes ); $font_family_str = $font_family_arr[0]; $font_family = explode( ':', $font_family_str ); if ( isset( $font_family[1] ) && '' != $font_family[1] ) { return $font_family[1]; } else { return ''; } } else { return ''; } } } if ( ! function_exists( 'get_ultimate_font_style' ) ) { /** * Get ultimate font style. * * @since ---- * @param mixed $font_style font style. * @access public */ function get_ultimate_font_style( $font_style ) { $weight_match = 0; $temp = ''; if ( '' != $font_style ) { $font_styles = explode( ',', $font_style ); // split by comma. foreach ( $font_styles as $fstyle ) { $temp .= $fstyle; // convert to css. if ( preg_match( '/font-weight:/i', $fstyle ) ) { $weight_match++; } } } // hack to font weight to normal if font weight not available. if ( 0 == $weight_match ) { $temp .= 'font-weight:normal;'; } return $temp; } } if ( ! function_exists( 'enquque_ultimate_google_fonts_optimzed' ) ) { /** * Get enquque ultimate google fonts optimzed. * * @since ---- * @param mixed $enqueue_fonts enquip fonts. * @access public */ function enquque_ultimate_google_fonts_optimzed( $enqueue_fonts ) { $selected_fonts = apply_filters( 'enquque_selected_ultimate_google_fonts', get_option( 'ultimate_selected_google_fonts' ) ); $skip_font_enqueue = apply_filters( 'enquque_ultimate_google_fonts_skip', false ); if ( true == $skip_font_enqueue ) { return ''; } $main = array(); $subset_main_array = array(); $fonts = array(); $subset_call = ''; if ( ! empty( $enqueue_fonts ) ) { $font_count = 0; foreach ( $enqueue_fonts as $key => $efont ) { $font_name = ''; $font_call = ''; $font_variant = ''; $font_arr = array(); $font_call_arr = array(); $font_weight_arr = array(); $font_arr = explode( '|', $efont ); $font_name = trim( $font_arr[0] ); if ( ! isset( $main[ $font_name ] ) ) { $main[ $font_name ] = array(); } if ( ! empty( $font_name ) ) : $font_count++; if ( isset( $font_arr[1] ) ) { $font_call_arr = explode( ':', $font_arr[1] ); if ( isset( $font_arr[2] ) ) { $font_weight_arr = explode( ':', $font_arr[2] ); } if ( isset( $font_call_arr[1] ) && '' != $font_call_arr[1] ) { $font_variant = $font_call_arr[1]; $pre_font_call = $font_name; if ( '' != $font_variant && 'regular' !== $font_variant ) { $main[ $font_name ]['varients'][] = $font_variant; array_push( $main[ $font_name ]['varients'], $font_variant ); if ( ! empty( $main[ $font_name ]['varients'] ) ) { $main[ $font_name ]['varients'] = array_values( array_unique( $main[ $font_name ]['varients'] ) ); } } } } foreach ( $selected_fonts as $sfont ) { if ( $sfont['font_family'] == $font_name ) { if ( ! empty( $sfont['subsets'] ) ) { $subset_array = array(); foreach ( $sfont['subsets'] as $tsubset ) { if ( 'true' == $tsubset['subset_selected'] ) { array_push( $subset_array, $tsubset['subset_value'] ); } } if ( ! empty( $subset_array ) ) : $subset_call = ''; $j = count( $subset_array ); foreach ( $subset_array as $subkey => $subset ) { $subset_call .= $subset; if ( ( $j - 1 ) != $subkey ) { $subset_call .= ','; } } array_push( $subset_main_array, $subset_call ); endif; } } } endif; } $link = 'https://fonts.googleapis.com/css?family='; $main_count = count( $main ); $mcount = 0; foreach ( $main as $font => $font_data ) { if ( '' !== $font ) { $link .= $font; if ( 'Open+Sans+Condensed' == $font && empty( $font_data['varients'] ) ) { $link .= ':300'; } if ( ! empty( $font_data['varients'] ) ) { $link .= ':regular,'; $varient_count = count( $font_data['varients'] ); foreach ( $font_data['varients'] as $vkey => $varient ) { $link .= $varient; if ( ( $varient_count - 1 ) != $vkey ) { $link .= ','; } } } if ( ! empty( $font_data['subset'] ) ) { $subset_string .= '&subset=' . $font_data['subset']; } if ( ( $main_count - 1 ) != $mcount ) { $link .= '|'; } $mcount++; } } $subset_string = ''; if ( ! empty( $subset_array ) ) { $subset_main_array = array_unique( $subset_main_array ); $subset_string = '&subset='; $subset_count = count( $subset_main_array ); $subset_main_array = array_values( $subset_main_array ); foreach ( $subset_main_array as $skey => $subset ) { if ( '' !== $subset ) { $subset_string .= $subset; if ( ( $subset_count - 1 ) != $skey ) { $subset_string .= ','; } } } } $font_api_call = $link . $subset_string; if ( $font_count > 0 ) { wp_enqueue_style( 'ultimate-google-fonts', $font_api_call, array(), null );// @codingStandardsIgnoreLine. } } } } ultimate_info_tables.php000064400000071641150212230100011441 0ustar00 __( 'Info Tables', 'ultimate_vc' ), 'base' => 'ultimate_info_table', 'class' => 'vc_ultimate_info_table', 'icon' => 'vc_ultimate_info_table', 'category' => 'Ultimate VC Addons', 'description' => __( 'Create nice looking info tables.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Design Style', 'ultimate_vc' ), 'param_name' => 'design_style', 'value' => array( __( 'Design 01', 'ultimate_vc' ) => 'design01', __( 'Design 02', 'ultimate_vc' ) => 'design02', __( 'Design 03', 'ultimate_vc' ) => 'design03', __( 'Design 04', 'ultimate_vc' ) => 'design04', __( 'Design 05', 'ultimate_vc' ) => 'design05', __( 'Design 06', 'ultimate_vc' ) => 'design06', ), 'description' => __( 'Select Info table design you would like to use', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Color Scheme', 'ultimate_vc' ), 'param_name' => 'color_scheme', 'value' => array( __( 'Black', 'ultimate_vc' ) => 'black', __( 'Red', 'ultimate_vc' ) => 'red', __( 'Blue', 'ultimate_vc' ) => 'blue', __( 'Yellow', 'ultimate_vc' ) => 'yellow', __( 'Green', 'ultimate_vc' ) => 'green', __( 'Gray', 'ultimate_vc' ) => 'gray', __( 'Design Your Own', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Which color scheme would like to use?', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main background Color', 'ultimate_vc' ), 'param_name' => 'color_bg_main', 'value' => '', 'description' => __( 'Select normal background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main text Color', 'ultimate_vc' ), 'param_name' => 'color_txt_main', 'value' => '', 'description' => __( 'Select normal background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlight background Color', 'ultimate_vc' ), 'param_name' => 'color_bg_highlight', 'value' => '', 'description' => __( 'Select highlight background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlight text Color', 'ultimate_vc' ), 'param_name' => 'color_txt_highlight', 'value' => '', 'description' => __( 'Select highlight background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Heading', 'ultimate_vc' ), 'param_name' => 'package_heading', 'admin_label' => true, 'value' => '', 'description' => __( 'The title of Info Table', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-4', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Sub Heading', 'ultimate_vc' ), 'param_name' => 'package_sub_heading', 'value' => '', 'description' => __( ' Describe the info table in one line', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'sub_heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h5', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H5', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-4', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'No Icon', 'ultimate_vc' ) => 'none', __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'attach_image', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => '', 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => '', 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => '', 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => '', 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Features', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Describe the Info Table in brief.', 'ultimate_vc' ), 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Add link', 'ultimate_vc' ), 'param_name' => 'use_cta_btn', 'value' => array( __( 'No Link', 'ultimate_vc' ) => '', __( 'Call to Action Button', 'ultimate_vc' ) => 'true', __( 'Link to Complete Box', 'ultimate_vc' ) => 'box', ), 'description' => __( 'Do you want to display call to action button?', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Call to action button text', 'ultimate_vc' ), 'param_name' => 'package_btn_text', 'value' => '', 'description' => __( 'Enter call to action button text', 'ultimate_vc' ), 'dependency' => array( 'element' => 'use_cta_btn', 'value' => array( 'true' ), ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Call to action link', 'ultimate_vc' ), 'param_name' => 'package_link', 'value' => '', 'description' => __( 'Select / enter the link for call to action button', 'ultimate_vc' ), 'dependency' => array( 'element' => 'use_cta_btn', 'value' => array( 'true', 'box' ), ), ), /* typoraphy - heading */ array( 'type' => 'ult_param_heading', 'text' => __( 'Heading Settings', 'ultimate_vc' ), 'param_name' => 'heading_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'heading_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'heading_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'heading_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'heading_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'heading_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - sub heading */ array( 'type' => 'ult_param_heading', 'text' => __( 'Sub-Heading Settings', 'ultimate_vc' ), 'param_name' => 'subheading_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'subheading_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'subheading_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'subheading_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'subheading_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'subheading_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - feature*/ array( 'type' => 'ult_param_heading', 'text' => __( 'Features Settings', 'ultimate_vc' ), 'param_name' => 'features_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'features_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'features_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'features_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'features_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'features_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - button */ array( 'type' => 'ult_param_heading', 'text' => __( 'Button Settings', 'ultimate_vc' ), 'param_name' => 'button_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'button_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'button_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'button_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'button_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'button_font_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'number', 'class' => 'font-size', 'heading' => __( 'Minimum Height For Info Table', 'ultimate_vc' ), 'param_name' => 'features_min_ht', 'min' => 10, 'suffix' => 'px', 'description' => __( 'Adjust height of your price Info Table.', 'ultimate_vc' ), ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the icon box, and you can use this class for your customizations.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_info_tables', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), // params. ) );// vc_map. } } /** * Ultimate IP Shortcode. * * @method ultimate_it_shortcode * @param array $atts Attributes. * @param string $content Content. */ public function ultimate_it_shortcode( $atts, $content = null ) { $design_style = ''; $ult_infotbl_settings = shortcode_atts( array( 'design_style' => 'design01', ), $atts ); $output = ''; require_once __ULTIMATE_ROOT__ . '/templates/info-tables/info-table-' . $ult_infotbl_settings['design_style'] . '.php'; $design_func = 'ult_info_table_generate_' . $ult_infotbl_settings['design_style']; $output .= $design_func( $atts, $content ); $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } } // class Ultimate_Info_Table. new Ultimate_Info_Table(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Info_Table' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Info_Table extends WPBakeryShortCode { } } } ultimate_hotspot.php000064400000113475150212230100010656 0ustar00= 0 ) { if ( function_exists( 'vc_add_shortcode_param' ) ) { vc_add_shortcode_param( 'ultimate_hotspot_param', array( $this, 'ultimate_hotspot_param_callback' ), UAVC_URL . 'admin/vc_extend/js/vc-hotspot-param.js' ); } } else { if ( function_exists( 'add_shortcode_param' ) ) { add_shortcode_param( 'ultimate_hotspot_param', array( $this, 'ultimate_hotspot_param_callback' ), UAVC_URL . 'admin/vc_extend/js/vc-hotspot-param.js' ); } } } /** * Render function for Ultimate Hotspot Param callback. * * @param array $settings represts module attribuits. * @param string $value value has been set to null. * @access public */ public function ultimate_hotspot_param_callback( $settings, $value ) { $dependency = ''; $class = isset( $settings['class'] ) ? $settings['class'] : ''; $output = '
    '; $output .= 'image'; $output .= '
    '; $output .= ''; $output .= '
    '; return $output; } /** * Function that register styles and scripts for Ultimate Hotspot Module. * * @param array $hook has a file type. * @method enqueue_admin_assets */ public function enqueue_admin_assets( $hook ) { if ( 'post.php' == $hook || 'post-new.php' == $hook || 'edit.php' == $hook ) { $bsf_dev_mode = bsf_get_option( 'dev_mode' ); if ( 'enable' === $bsf_dev_mode ) { wp_register_script( 'hotspt-admin-js', UAVC_URL . 'admin/vc_extend/js/admin_enqueue_js.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), ULTIMATE_VERSION, true ); wp_enqueue_script( 'hotspt-admin-js' ); } } } /** * Render function for Ultimate Hotspot Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ult_hotspot_callback( $atts, $content = null ) { global $tooltip_continuous_animation; $ult_hots_setting = shortcode_atts( array( 'main_img' => '', 'main_img_size' => '', 'main_img_width' => '', 'el_class' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $content = wpb_js_remove_wpautop( $content, true ); // fix unclosed/unwanted paragraph tags in $content. $mnimg = ''; $alt = ''; if ( '' !== $ult_hots_setting['main_img'] ) { $mnimg = apply_filters( 'ult_get_img_single', $ult_hots_setting['main_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_hots_setting['main_img'], 'alt' ); } $cust_size = ''; if ( 'main_img_custom' == $ult_hots_setting['main_img_size'] ) { if ( '' != $ult_hots_setting['main_img_width'] ) { $cust_size .= 'width:' . $ult_hots_setting['main_img_width'] . 'px;'; } } $output = "
    "; $output .= "
    " . do_shortcode( $content ) . '
    '; $output .= "
    "; $output .= '
    '; return $output; } /** * Function that initializes settings of Ultimate Hotspot Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @method ult_hotspot_items_callback */ public function ult_hotspot_items_callback( $atts, $content = null ) { global $hotspot_icon, $hotspot_icon_bg_color, $hotspot_icon_color, $hotspot_icon_size; $ult_hots_settings = shortcode_atts( array( 'hotspot_content' => '', 'hotspot_label' => '', 'hotspot_position' => '0,0', 'tooltip_content' => '', 'tooltip_width' => '300', 'tooltip_padding' => '', 'tooltip_position' => '', 'icon_type' => '', 'icon' => 'Defaults-map-marker', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_img' => '', 'img_width' => '60', 'link_style' => '', 'icon_link' => '', 'icon_size' => '', 'alignment' => 'center', 'tooltip_trigger' => '', 'tooltip_animation' => '', 'tooltip_continuous_animation' => '', 'glow_color' => '', 'enable_bubble_arrow' => 'on', 'tooltip_custom_bg_color' => '#fff', 'tooltip_custom_color' => '#4c4c4c', 'tooltip_font' => '', 'tooltip_font_style' => '', 'tooltip_font_size' => '', 'tooltip_font_line_height' => '', 'tooltip_custom_border_size' => '', 'tooltip_align' => '', 'el_sub_class' => '', ), $atts ); // Animation effects. $glow = ''; $pulse = ''; if ( '' != $ult_hots_settings['tooltip_continuous_animation'] ) { switch ( $ult_hots_settings['tooltip_continuous_animation'] ) { case 'on': $pulse = 'ult-pulse'; break; case 'glow': if ( '' !== $ult_hots_settings['glow_color'] ) { $ult_hots_settings['glow_color'] = 'style=background-color:' . $ult_hots_settings['glow_color'] . ';'; } else { $ult_hots_settings['glow_color'] = ''; } $glow = "
    '; break; } } if ( trim( $content ) !== '' ) { $ult_hots_settings['hotspot_content'] = $content; } /** Tooltip [Content] Styling *--------------------------------------*/ $font_args = array(); $tooltip_content_style = ''; $tooltip_base_style = ''; $hotspot_tooltip_id = ''; if ( '' != $ult_hots_settings['tooltip_font'] ) { $font_family = get_ultimate_font_family( $ult_hots_settings['tooltip_font'] ); $tooltip_content_style .= 'font-family:' . $font_family . ';'; array_push( $font_args, $ult_hots_settings['tooltip_font'] ); } if ( '' != $ult_hots_settings['tooltip_font_style'] ) { $tooltip_content_style .= get_ultimate_font_style( $ult_hots_settings['tooltip_font_style'] ); } if ( is_numeric( $ult_hots_settings['tooltip_font_size'] ) ) { $ult_hots_settings['tooltip_font_size'] = 'desktop:' . $ult_hots_settings['tooltip_font_size'] . 'px;'; } if ( is_numeric( $ult_hots_settings['tooltip_font_line_height'] ) ) { $ult_hots_settings['tooltip_font_line_height'] = 'desktop:' . $ult_hots_settings['tooltip_font_line_height'] . 'px;'; } $hotspot_tooltip_id = 'hotspot-tooltip-' . wp_rand( 1000, 9999 ); $hotspot_tooltip_args = array( 'target' => '#' . $hotspot_tooltip_id . ' .ult-tooltipster-content', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_hots_settings['tooltip_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_hots_settings['tooltip_font_line_height'], ), ); $hotspot_tooltip_data_list = get_ultimate_vc_responsive_media_css( $hotspot_tooltip_args ); // Width. if ( '' != $ult_hots_settings['tooltip_width'] ) { $tooltip_content_style .= 'width:' . $ult_hots_settings['tooltip_width'] . 'px;'; } // Padding. if ( '' != $ult_hots_settings['tooltip_padding'] ) { $tooltip_content_style .= $ult_hots_settings['tooltip_padding']; } /** * Tooltip [Base] Styling options */ // Background. if ( '' != $ult_hots_settings['tooltip_custom_bg_color'] ) { $tooltip_base_style .= 'background-color:' . $ult_hots_settings['tooltip_custom_bg_color'] . ';'; } if ( '' != $ult_hots_settings['tooltip_custom_color'] ) { $tooltip_base_style .= 'color:' . $ult_hots_settings['tooltip_custom_color'] . ';'; } // Border Styling. if ( '' != $ult_hots_settings['tooltip_custom_border_size'] ) { $bstyle = str_replace( '|', '', $ult_hots_settings['tooltip_custom_border_size'] ); $tooltip_base_style .= $bstyle; } if ( '' != $ult_hots_settings['tooltip_align'] ) { $tooltip_base_style .= 'text-align:' . $ult_hots_settings['tooltip_align'] . ';'; } $data = ''; if ( '' != $hotspot_tooltip_id ) { $data .= 'data-mycust-id="' . esc_attr( $hotspot_tooltip_id ) . '" ';} if ( '' != $hotspot_tooltip_data_list ) { $data .= $hotspot_tooltip_data_list;} if ( '' != $tooltip_content_style ) { $data .= 'data-tooltip-content-style="' . esc_attr( $tooltip_content_style ) . '"'; } if ( '' != $tooltip_base_style ) { $data .= 'data-tooltip-base-style="' . esc_attr( $tooltip_base_style ) . '"'; } if ( '' != $ult_hots_settings['enable_bubble_arrow'] && 'on' == $ult_hots_settings['enable_bubble_arrow'] ) { $data .= ' data-bubble-arrow="true" '; } else { $data .= ' data-bubble-arrow="false" '; } $ult_hots_settings['hotspot_position'] = explode( ',', $ult_hots_settings['hotspot_position'] ); if ( 'custom' == $ult_hots_settings['icon_type'] ) { $temp_icon_size = ( $ult_hots_settings['img_width'] / 2 ); } else { $temp_icon_size = ( $ult_hots_settings['icon_size'] / 2 ); } $hotspot_x_position = $ult_hots_settings['hotspot_position'][0]; $hotspot_y_position = ( isset( $ult_hots_settings['hotspot_position'][1] ) ) ? $ult_hots_settings['hotspot_position'][1] : '0'; $tooltip_offsety = ''; // set offsetY for tooltip. $tooltip_offsety = $temp_icon_size; if ( '' != $ult_hots_settings['tooltip_animation'] ) { $data .= 'data-tooltipanimation="' . esc_attr( $ult_hots_settings['tooltip_animation'] ) . '"';} if ( '' != $ult_hots_settings['tooltip_trigger'] ) { $data .= 'data-trigger="' . esc_attr( $ult_hots_settings['tooltip_trigger'] ) . '"';} if ( '' != $tooltip_offsety ) { $data .= 'data-tooltip-offsety="' . esc_attr( $tooltip_offsety ) . '"';} if ( '' != $ult_hots_settings['tooltip_position'] ) { $data .= 'data-arrowposition="' . esc_attr( $ult_hots_settings['tooltip_position'] ) . '"';} $icon_animation = ''; $icon_inline = do_shortcode( '[just_icon icon_align="' . esc_attr( $ult_hots_settings['alignment'] ) . '" icon_type="' . esc_attr( $ult_hots_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_hots_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_hots_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_hots_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_hots_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_hots_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_hots_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_hots_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_hots_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_hots_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_hots_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_hots_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_hots_settings['icon_border_spacing'] ) . '" icon_animation="' . esc_attr( $icon_animation ) . '"]' ); $url = ''; $link_title = ''; $target = ''; $rel = ''; // Hotspot has simple link. if ( 'link' == $ult_hots_settings['link_style'] && '' != $ult_hots_settings['icon_link'] ) { $href = vc_build_link( $ult_hots_settings['icon_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; } $output = "
    "; $output .= "
    "; if ( 'link' == $ult_hots_settings['link_style'] ) { $output .= " "; $output .= $icon_inline; $output .= ' '; } else { $output .= " "; $output .= $icon_inline; $output .= "" . esc_html( str_replace( '"', '\'', $ult_hots_settings['hotspot_content'] ) ) . ''; $output .= ' '; } $output .= '
    '; $output .= $glow; $output .= '
    '; return $output; } /** * Function that initializes settings of Ultimate Hotspot Module. * * @method ult_hotspot_init */ public function ult_hotspot_init() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Hotspot', 'ultimate_vc' ), 'base' => 'ult_hotspot', 'as_parent' => array( 'only' => 'ult_hotspot_items' ), 'content_element' => true, 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'icon' => 'ult_hotspot', 'class' => 'ult_hotspot', 'description' => __( 'Display Hotspot on Image.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Select Hotspot Image', 'ultimate_vc' ), 'param_name' => 'main_img', 'value' => '', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Image Size', 'ultimate_vc' ), 'param_name' => 'main_img_size', 'value' => array( 'Default / Full Size' => 'main_img_original', 'Custom' => 'main_img_custom', ), ), array( 'type' => 'number', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'class' => '', 'value' => '', 'suffix' => 'px', 'param_name' => 'main_img_width', 'dependency' => array( 'element' => 'main_img_size', 'value' => 'main_img_custom', ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra Class Name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), ), 'js_view' => 'ULTHotspotContainerView', ) ); global $ultimate_hostspot_image; vc_map( array( 'name' => __( 'Hotspot Item', 'ultimate_vc' ), 'base' => 'ult_hotspot_items', 'content_element' => true, 'as_child' => array( 'only' => 'ult_hotspot' ), 'icon' => 'ult_hotspot', 'class' => 'ult_hotspot', 'js_view' => 'ULTHotspotSingleView', 'is_container' => false, 'params' => array( array( 'type' => 'ultimate_hotspot_param', 'heading' => 'Position', 'param_name' => 'hotspot_position', ), // Hotspot Icon. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), 'group' => 'Icon', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Icon', ), // link style. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'On Click HotSpot Item:', 'ultimate_vc' ), 'param_name' => 'link_style', 'value' => array( __( 'Tooltip', 'ultimate_vc' ) => 'tooltip', __( 'Simple Link', 'ultimate_vc' ) => 'link', ), 'description' => __( 'Display tooltip or just link for the hotspot icon.', 'ultimate_vc' ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'icon_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_style', 'value' => 'link', ), ), // Link style. // TOOLTIP. array( 'type' => 'textarea_html', 'class' => '', 'value' => 'Tooltip content goes here!', 'heading' => __( 'Hotspot Tooltip Content', 'ultimate_vc' ), 'param_name' => 'content', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), 'admin_label' => true, 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), array( 'type' => 'textfield', 'heading' => __( 'Extra Class Name', 'ultimate_vc' ), 'param_name' => 'el_sub_class', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), // Tooltip. array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Tooltip Text Color', 'ultimate_vc' ), 'param_name' => 'tooltip_custom_color', 'value' => '#4c4c4c', 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'tooltip_custom_bg_color', 'value' => '#fff', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), 'group' => 'Tooltip', ), array( 'type' => 'number', 'class' => '', 'value' => '300', 'heading' => __( 'Width', 'ultimate_vc' ), 'param_name' => 'tooltip_width', 'group' => 'Tooltip', 'suffix' => 'px', 'description' => __( 'Tooltip Default width: auto.', 'ultimate' ), 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Trigger On', 'ultimate_vc' ), 'param_name' => 'tooltip_trigger', 'value' => array( 'Hover' => 'hover', 'Click' => 'click', ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Position', 'ultimate_vc' ), 'param_name' => 'tooltip_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Bottom', 'ultimate_vc' ) => 'bottom', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'ultimate_border', 'heading' => __( 'Border', 'ultimate_vc' ), 'param_name' => 'tooltip_custom_border_size', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '1', __( 'Right', 'ultimate_vc' ) => '1', __( 'Bottom', 'ultimate_vc' ) => '1', __( 'Left', 'ultimate_vc' ) => '1', ), 'radius' => array( __( 'Top Left', 'ultimate_vc' ) => '3', __( 'Top Right', 'ultimate_vc' ) => '3', __( 'Bottom Right', 'ultimate_vc' ) => '3', __( 'Bottom Left', 'ultimate_vc' ) => '3', ), 'label_color' => __( 'Border Color', 'ultimate_vc' ), 'label_radius' => __( 'Border Radius', 'ultimate_vc' ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Arrow', 'ultimate_vc' ), 'param_name' => 'enable_bubble_arrow', 'value' => 'on', 'default_set' => true, 'options' => array( 'on' => array( 'label' => __( 'Enable Tooltip Arrow?', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Appear Animation', 'ultimate_vc' ), 'param_name' => 'tooltip_animation', 'value' => array( __( 'Fade', 'ultimate_vc' ) => 'fade', __( 'Grow', 'ultimate_vc' ) => 'glow', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Slide', 'ultimate_vc' ) => 'slide', __( 'Fall', 'ultimate_vc' ) => 'fall', __( 'Euclid', 'ultimate_vc' ) => 'euclid', ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'tooltip_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'group' => 'Tooltip', 'dependency' => array( 'element' => 'link_style', 'value' => 'tooltip', ), ), // Typography. array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'tooltip_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'tooltip_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'tooltip_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'tooltip_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Text Align', 'ultimate_vc' ), 'param_name' => 'tooltip_align', 'value' => array( __( 'Left', 'ultimate_vc' ) => 'left', __( 'Center', 'ultimate_vc' ) => 'center', __( 'Right', 'ultimate_vc' ) => 'right', __( 'Justify', 'ultimate_vc' ) => 'justify', ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation For Hotspot', 'ultimate_vc' ), 'param_name' => 'tooltip_continuous_animation', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Pulse', 'ultimate_vc' ) => 'on', __( 'Glow', 'ultimate_vc' ) => 'glow', ), 'description' => __( 'Select animation effect for hotspot icon/image.', 'ultimate_vc' ), 'group' => 'Animation', ), array( 'type' => 'colorpicker', 'heading' => __( 'Glow Color', 'ultimate_vc' ), 'param_name' => 'glow_color', 'value' => '', 'group' => 'Animation', 'dependency' => array( 'element' => 'tooltip_continuous_animation', 'value' => 'glow', ), ), ), ) ); } } /** * Function that register styles and scripts for Ultimate Hotspot Module. * * @method ult_hotspot_scripts */ public function ult_hotspot_scripts() { $bsf_dev_mode = bsf_get_option( 'dev_mode' ); if ( 'enable' === $bsf_dev_mode ) { $js_path = '../assets/js/'; $css_path = '../assets/css/'; $ext = ''; } else { $js_path = '../assets/min-js/'; $css_path = '../assets/min-css/'; $ext = '.min'; } // css. Ultimate_VC_Addons::ultimate_register_style( 'ult_hotspot_css', 'hotspot' ); Ultimate_VC_Addons::ultimate_register_style( 'ult_hotspot_tooltipster_css', 'hotspot-tooltipster' ); // js. Ultimate_VC_Addons::ultimate_register_script( 'ult_hotspot_js', 'hotspot', false, array( 'jquery' ), ULTIMATE_VERSION, false ); Ultimate_VC_Addons::ultimate_register_script( 'ult_hotspot_tooltipster_js', 'hotspot-tooltipster', false, array( 'jquery' ), ULTIMATE_VERSION, false ); } } new ULT_HotSpot(); if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ult_Hotspot' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Hotspot extends WPBakeryShortCodesContainer { } } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Hotspot_Items' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Hotspot_Items extends WPBakeryShortCode { } } } ultimate_hightlight_box.php000064400000063663150212230100012164 0ustar00 __( 'Hightlight Box', 'ultimate_vc' ), 'base' => 'ultimate_ctation', 'class' => 'vc_ctaction_icon', 'icon' => 'vc_icon_ctaction', 'category' => 'Ultimate VC Addons', 'params' => array( array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Text ', 'ultimate_vc' ), 'param_name' => 'content', 'admin_label' => true, 'value' => '', 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), array( 'type' => 'dropdown', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'content_alignment', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'ctaction-text-center', __( 'Left', 'ultimate_vc' ) => 'ctaction-text-left', __( 'Right', 'ultimate_vc' ) => 'ctaction-text-right', ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Background', 'ultimate_vc' ), 'param_name' => 'ctaction_background', 'value' => '#e74c3c', 'group' => 'Background', ), array( 'type' => 'colorpicker', 'heading' => __( 'Background Hover', 'ultimate_vc' ), 'param_name' => 'ctaction_background_hover', 'value' => '#c0392b', 'group' => 'Background', ), array( 'type' => 'vc_link', 'param_name' => 'ctaction_link', 'heading' => __( 'Link', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'heading' => __( 'Enable Icon', 'ultimate_vc' ), 'param_name' => 'enable_icon', 'value' => '', 'options' => array( 'enable_icon_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Effect', 'ultimate_vc' ), 'param_name' => 'effect', 'value' => array( __( 'Slide Left', 'ultimate_vc' ) => 'right-push', __( 'Slide Right', 'ultimate_vc' ) => 'left-push', __( 'Slide Top', 'ultimate_vc' ) => 'bottom-push', __( 'Slide Bottom', 'ultimate_vc' ) => 'top-push', ), 'description' => __( 'Select an effect for highlight box.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'enable_icon', 'value' => array( 'enable_icon_value' ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'enable_icon', 'value' => array( 'enable_icon_value' ), ), 'group' => 'Icon', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Icon', ), array( 'type' => 'attach_image', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'smile' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Icon', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'text_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'text_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'text_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'text_color', 'value' => '#ffffff', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'text_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Width Override', 'ultimate_vc' ), 'param_name' => 'ctaction_override', 'value' => array( __( 'Default Width', 'ultimate_vc' ) => '0', __( "Apply 1st parent element's width", 'ultimate_vc' ) => '1', __( "Apply 2nd parent element's width", 'ultimate_vc' ) => '2', __( "Apply 3rd parent element's width", 'ultimate_vc' ) => '3', __( "Apply 4th parent element's width", 'ultimate_vc' ) => '4', __( "Apply 5th parent element's width", 'ultimate_vc' ) => '5', __( "Apply 6th parent element's width", 'ultimate_vc' ) => '6', __( "Apply 7th parent element's width", 'ultimate_vc' ) => '7', __( "Apply 8th parent element's width", 'ultimate_vc' ) => '8', __( "Apply 9th parent element's width", 'ultimate_vc' ) => '9', __( 'Full Width', 'ultimate_vc' ) => 'full', __( 'Maximum Full Width', 'ultimate_vc' ) => 'ex-full', ), 'description' => __( "By default, the map will be given to the WPBakery Page Builder row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output..", 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Top Padding', 'ultimate_vc' ), 'param_name' => 'ctaction_padding_top', 'edit_field_class' => 'vc_column vc_col-sm-3', 'value' => '20', 'suffix' => 'px', 'group' => 'Background', ), array( 'type' => 'number', 'heading' => __( 'Bottom Padding', 'ultimate_vc' ), 'param_name' => 'ctaction_padding_bottom', 'edit_field_class' => 'vc_column vc_col-sm-3', 'value' => '20', 'suffix' => 'px', 'group' => 'Background', ), array( 'type' => 'number', 'heading' => __( 'Left Padding', 'ultimate_vc' ), 'param_name' => 'ctaction_padding_left', 'edit_field_class' => 'vc_column vc_col-sm-3', 'value' => '', 'suffix' => 'px', 'group' => 'Background', ), array( 'type' => 'number', 'heading' => __( 'Right Padding', 'ultimate_vc' ), 'param_name' => 'ctaction_padding_right', 'edit_field_class' => 'vc_column vc_col-sm-3', 'value' => '', 'suffix' => 'px', 'group' => 'Background', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'ultimate_spacing', 'heading' => 'Margin ', 'param_name' => 'highlight_margin', 'mode' => 'margin', 'unit' => 'px', 'positions' => array( 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing to FlipBox.', 'ultimate_vc' ), ), ), ) ); } } /** * Render function for Highlight Box Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function call_to_action_shortcode( $atts, $content ) { $output = ''; $style = ''; $data = ''; $text_style_inline = ''; $ctaction_link_html = ''; $icon_inline = ''; $target = ''; $link_title = ''; $rel = ''; $ult_high_settings = shortcode_atts( array( 'content_alignment' => 'ctaction-text-center', 'ctaction_background' => '#e74c3c', 'ctaction_background_hover' => '#c0392b', 'text_font_family' => '', 'text_font_style' => '', 'text_font_size' => '32', 'text_color' => '#ffffff', 'text_line_height' => '', 'ctaction_link' => '', 'ctaction_override' => '0', 'ctaction_padding_top' => '20', 'ctaction_padding_bottom' => '20', 'ctaction_padding_left' => '', 'ctaction_padding_right' => '', 'enable_icon' => '', 'icon_type' => 'selector', 'icon' => '', 'icon_color' => '', 'icon_style' => 'none', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'effect' => 'right-push', 'el_class' => '', 'highlight_margin' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $ult_high_settings['el_class'] .= ' ' . $ult_high_settings['content_alignment']; /* typography */ if ( '' != $ult_high_settings['text_font_family'] ) { $temp = get_ultimate_font_family( $ult_high_settings['text_font_family'] ); $text_style_inline .= 'font-family:' . $temp . ';'; } $text_style_inline .= get_ultimate_font_style( $ult_high_settings['text_font_style'] ); // responsive param. if ( is_numeric( $ult_high_settings['text_font_size'] ) ) { $ult_high_settings['text_font_size'] = 'desktop:' . $ult_high_settings['text_font_size'] . 'px;'; } if ( is_numeric( $ult_high_settings['text_line_height'] ) ) { $ult_high_settings['text_line_height'] = 'desktop:' . $ult_high_settings['text_line_height'] . 'px;'; } $highlight_box_id = 'highlight-box-wrap-' . wp_rand( 1000, 9999 ); $highlight_box_args = array( 'target' => '#' . $highlight_box_id . '', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_high_settings['text_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_high_settings['text_line_height'], ), ); $data_list = get_ultimate_vc_responsive_media_css( $highlight_box_args ); if ( '' != $ult_high_settings['text_color'] ) { $text_style_inline .= 'color:' . $ult_high_settings['text_color'] . ';'; } if ( '' != $ult_high_settings['ctaction_background'] ) { $data .= ' data-background="' . esc_attr( $ult_high_settings['ctaction_background'] ) . '" '; $text_style_inline .= 'background:' . $ult_high_settings['ctaction_background'] . ';'; } if ( '' != $ult_high_settings['ctaction_background_hover'] ) { $data .= ' data-background-hover="' . esc_attr( $ult_high_settings['ctaction_background_hover'] ) . '" '; } $data .= ' data-override="' . esc_attr( $ult_high_settings['ctaction_override'] ) . '" '; if ( '' != $ult_high_settings['ctaction_padding_top'] ) { $text_style_inline .= 'padding-top:' . $ult_high_settings['ctaction_padding_top'] . 'px;'; } if ( '' != $ult_high_settings['ctaction_padding_bottom'] ) { $text_style_inline .= 'padding-bottom:' . $ult_high_settings['ctaction_padding_bottom'] . 'px;'; } if ( '' != $ult_high_settings['ctaction_padding_left'] ) { $text_style_inline .= 'padding-left:' . $ult_high_settings['ctaction_padding_left'] . 'px;'; } if ( '' != $ult_high_settings['ctaction_padding_right'] ) { $text_style_inline .= 'padding-right:' . $ult_high_settings['ctaction_padding_right'] . 'px;'; } $text_style_inline .= $ult_high_settings['highlight_margin']; if ( '' != $ult_high_settings['ctaction_link'] ) { $href = vc_build_link( $ult_high_settings['ctaction_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; if ( '' != $url ) { $ctaction_link_html = ''; } } if ( 'enable_icon_value' == $ult_high_settings['enable_icon'] ) { $icon_inline = do_shortcode( '[just_icon icon_align="center" icon_type="' . esc_attr( $ult_high_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_high_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_high_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_high_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_high_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_high_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_high_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_high_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_high_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_high_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_high_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_high_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_high_settings['icon_border_spacing'] ) . '"]' ); } else { $ult_high_settings['effect'] = 'no-effect'; } $output .= '
    '; if ( '' != $icon_inline ) { $output .= '
    ' . $icon_inline . '
    '; } $output .= '
    ' . do_shortcode( $content ) . '
    '; $output .= $ctaction_link_html . '
    '; $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } } } if ( class_exists( 'Ultimate_Highlight_Box' ) ) { $ultimate_highlight_box = new Ultimate_Highlight_Box(); } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Ctation' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Ctation extends WPBakeryShortCode { } } ultimate_range_slider.php000064400000064762150212230100011620 0ustar00 '', 'title_box_color' => '', 'title_border' => 'border-style:solid;|border-width:2px;border-radius:0px;|border-color:#30eae9;', 'title_box' => '', 'title_box_width' => '', 'title_box_height' => '', 'title_padding' => '', 'el_class' => '', 'slider_data' => '', 'slider_bar_size' => '', 'title_font' => '', 'title_font_size' => '', 'title_line_height' => '', 'title_color' => '', 'title_font_style' => '', 'desc_font' => '', 'desc_font_size' => '', 'desc_line_height' => '', 'desc_color' => '', 'desc_font_style' => '', 'desc_width' => '', 'adaptive_height' => '', 'desc_padding' => '', 'desc_margin' => '', ), $atts ); $steps_count = 0; $title_count = 1; $desc_count = 1; $output = ''; // slider color setting setting. $slider_color_data = ''; $slider_color_data .= '' != $ult_range_settings['slider_color'] ? " data-slider_color = '" . esc_attr( $ult_range_settings['slider_color'] ) . "'" : ''; // Title box style. $title_box_data = '' != $ult_range_settings['title_box_color'] ? 'data-title-background = ' . esc_attr( $ult_range_settings['title_box_color'] ) . ' ' : ''; $title_box_data .= '' != $ult_range_settings['title_box'] ? ' data-title-box = ' . esc_attr( $ult_range_settings['title_box'] ) . ' ' : ' data-title-box = auto '; $title_style = " style = '"; // title box style var. $arrow_style = ''; $none_style = 'ult-tooltip-border ult-arrow'; if ( strpos( $ult_range_settings['title_border'], 'none' ) !== false ) { $none_style = ''; } else { $arrow_style = " data-arrow = '"; if ( strpos( $ult_range_settings['title_border'], 'border-width:0px' ) !== false ) { $none_style = ''; } $temp_array = array(); $temp_border = str_replace( '|', '', $ult_range_settings['title_border'] ); $title_style .= $temp_border; $title_style .= '' == $ult_range_settings['title_box_color'] ? '' : 'background:' . $ult_range_settings['title_box_color'] . '; '; $temp_array = explode( ';', $temp_border ); if ( is_array( $temp_array ) ) { foreach ( $temp_array as $key => $value ) { if ( strpos( $value, 'border-width:' ) !== false ) { $value = str_replace( 'border-width:', '', $value ); $value = str_replace( 'px', '', $value ); $value = $value + 7; $arrow_style .= ' border-width:' . $value . 'px; '; $arrow_style .= 'margin-left:-' . $value . 'px; '; } elseif ( strpos( $value, 'border-color:' ) !== false ) { $value = str_replace( 'border-color', 'border-top-color', $value ); $value = $value . '; '; $arrow_style .= $value; } } } $arrow_style .= "'"; } $title_style .= '' !== $ult_range_settings['title_padding'] ? ' ' . $ult_range_settings['title_padding'] . ';' : ''; // title box custom width. $center_class = ''; $title_box_width_t = ''; $title_box_height_t = ''; $slider_padding = ''; if ( 'custom' == $ult_range_settings['title_box'] ) { $center_class = ' ult-tooltip-center'; $title_box_width_t = '' !== $ult_range_settings['title_box_width'] ? $ult_range_settings['title_box_width'] : '115'; $title_box_height_t = '' !== $ult_range_settings['title_box_height'] ? $ult_range_settings['title_box_height'] : '115'; $title_style .= ' width:' . $title_box_width_t . 'px;'; $title_style .= ' height:' . $title_box_height_t . 'px;'; // apply this time padding to slider for tooltip adjustment. $slider_padding = ' style = "padding:' . $title_box_height_t . 'px ' . ( ( $title_box_width_t / 2 ) + 10 ) . 'px 35px;"'; } // slider size data. $ult_range_settings['slider_bar_size'] = '' != $ult_range_settings['slider_bar_size'] ? ' ' . $ult_range_settings['slider_bar_size'] . 'px;' : ''; $slider_size_data = '' != $ult_range_settings['slider_bar_size'] ? ' data-slider_size = "' . esc_attr( $ult_range_settings['slider_bar_size'] ) . 'px"' : ''; // title data. $ult_range_settings['slider_data'] = json_decode( urldecode( $ult_range_settings['slider_data'] ), true ); // min max value data. if ( isset( $ult_range_settings['slider_data'] ) ) { foreach ( $ult_range_settings['slider_data'] as $slider_datas ) { ++$steps_count; } } $steps_data = ' data-slider_steps = "' . esc_attr( $steps_count ) . '"'; // typography data. // title. if ( '' !== $ult_range_settings['title_font'] ) { $title_font_family = function_exists( 'get_ultimate_font_family' ) ? get_ultimate_font_family( $ult_range_settings['title_font'] ) : ''; $title_style .= 'font-family:' . $title_font_family . ';'; } if ( '' !== $ult_range_settings['title_font_style'] ) { $title_style .= $ult_range_settings['title_font_style']; } $micro = wp_rand( 0000, 9999 ); $id = uniqid( 'ultimate-range-slider' . $micro ); $uid = 'urs-' . wp_rand( 0000, 9999 ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $ult_range_settings['title_font_size'] ) ) { $ult_range_settings['title_font_size'] = 'desktop:' . $ult_range_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_range_settings['title_line_height'] ) ) { $ult_range_settings['title_line_height'] = 'desktop:' . $ult_range_settings['title_line_height'] . 'px;'; } // responsive {main} heading styles. $args = array( 'target' => '#' . $id . ' .ult-content', 'media_sizes' => array( 'font-size' => $ult_range_settings['title_font_size'], 'line-height' => $ult_range_settings['title_line_height'], ), ); $title_responsive = get_ultimate_vc_responsive_media_css( $args ); $title_style .= '' !== $ult_range_settings['title_color'] ? 'color:' . $ult_range_settings['title_color'] . ';' : ''; $title_style .= "'"; $desc_style = " style = '"; if ( '' !== $ult_range_settings['desc_font'] ) { $desc_font_family = function_exists( 'get_ultimate_font_family' ) ? get_ultimate_font_family( $ult_range_settings['desc_font'] ) : ''; $desc_style .= 'font-family:' . $desc_font_family . ';'; } if ( '' !== $ult_range_settings['desc_font_style'] ) { $desc_style .= $ult_range_settings['desc_font_style']; } if ( is_numeric( $ult_range_settings['desc_font_size'] ) ) { $ult_range_settings['desc_font_size'] = 'desktop:' . $ult_range_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_range_settings['desc_line_height'] ) ) { $ult_range_settings['desc_line_height'] = 'desktop:' . $ult_range_settings['desc_line_height'] . 'px;'; } // responsive {main} heading styles. $args = array( 'target' => '#' . $id . ' .ult-description', 'media_sizes' => array( 'font-size' => $ult_range_settings['desc_font_size'], 'line-height' => $ult_range_settings['desc_line_height'], ), ); $desc_responsive = get_ultimate_vc_responsive_media_css( $args ); $desc_style .= '' !== $ult_range_settings['desc_color'] ? 'color:' . $ult_range_settings['desc_color'] . ';' : ''; // design data. $desc_style .= '' !== $ult_range_settings['desc_padding'] ? ' ' . $ult_range_settings['desc_padding'] . ';' : ''; $desc_style .= '' !== $ult_range_settings['desc_margin'] ? ' ' . $ult_range_settings['desc_margin'] . ';' : ''; $desc_style .= '' !== $ult_range_settings['desc_width'] ? ' width:' . $ult_range_settings['desc_width'] . 'px;' : ''; $desc_style .= "'"; $desc_data = '' !== $ult_range_settings['adaptive_height'] ? ' data-adaptive_height = ' . esc_attr( $ult_range_settings['adaptive_height'] ) . ' ' : ''; // typogrphy data end. $output .= '
    '; if ( isset( $ult_range_settings['slider_data'] ) ) { foreach ( $ult_range_settings['slider_data'] as $slider_datas ) { if ( isset( $slider_datas['slider_title'] ) ) { // $output .= '
    '.$slider_datas["slider_title"]; " '.$main_heading_responsive // $output .= '
    '; $output .= '
    ' . $slider_datas['slider_title']; $output .= '
    '; } ++$title_count; } } $output .= '
    '; $output .= '
    '; // description data. if ( isset( $ult_range_settings['slider_data'] ) ) { $output .= '
    '; foreach ( $ult_range_settings['slider_data'] as $slider_datas ) { if ( isset( $slider_datas['slider_desc'] ) ) { $output .= '
    ' . $slider_datas['slider_desc'] . '
    '; } ++$desc_count; } $output .= '
    '; } $output .= '
    '; // wrapper div close. return $output; } /** * Function that initializes settings of Range Slider Module. * * @method init_range_slider */ public function init_range_slider() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Range Slider', 'ultimate_vc' ), 'base' => 'ult_range_slider', 'icon' => 'vc_icon_range_slider', 'class' => '', 'content_element' => true, 'controls' => 'full', 'category' => 'Ultimate VC Addons', 'description' => __( 'Create creative range sliders.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Slider Content

    ', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'param_group', 'heading' => __( 'Slider Text Setting', 'ultimate_vc' ), 'param_name' => 'slider_data', 'description' => __( 'Add content here steps will generate based on content', 'ultimate_vc' ), 'value' => rawurlencode( wp_json_encode( array( array( 'slider_title' => '', 'slider_desc' => '', ), ) ) ), 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Slider Title', 'ultimate_vc' ), 'param_name' => 'slider_title', 'description' => '', 'admin_label' => true, ), array( 'type' => 'textarea', 'heading' => __( 'Slider Description', 'ultimate_vc' ), 'param_name' => 'slider_desc', 'value' => '', 'description' => '', ), ), ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Slider Bar Color

    ', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Slider Bar Color', 'ultimate_vc' ), 'param_name' => 'slider_color', 'value' => '#3BF7D1', 'description' => '', ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Slider Bar Width

    ', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Slider Width', 'ultimate_vc' ), 'param_name' => 'slider_bar_size', 'value' => '', 'suffix' => 'px', 'description' => __( 'If title box text or width is too long then slider width will reduce according to title box width', 'ultimate_vc' ), ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Extra Class

    ', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Title Box

    ', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Title Box', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Color', 'ultimate_vc' ), 'param_name' => 'title_color', 'value' => '#444444', 'description' => '', 'group' => 'Title Box', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'title_box_color', 'value' => '#fff', 'description' => '', 'group' => 'Title Box', ), array( 'type' => 'ultimate_border', 'heading' => __( 'Title Box Border', 'ultimate_vc' ), 'param_name' => 'title_border', 'unit' => 'px', 'value' => 'border-style:solid;|border-width:2px;border-radius:0px;|border-color:#30eae9;', // [required] px,em,%,all Default all 'group' => 'Title Box', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'radius' => array( __( 'Top Left', 'ultimate_vc' ) => '', __( 'Top Right', 'ultimate_vc' ) => '', __( 'Bottom Right', 'ultimate_vc' ) => '', __( 'Bottom Left', 'ultimate_vc' ) => '', ), ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Title Box Padding', 'ultimate_vc' ), 'param_name' => 'title_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '15', __( 'Right', 'ultimate_vc' ) => '15', __( 'Bottom', 'ultimate_vc' ) => '15', __( 'Left', 'ultimate_vc' ) => '15', ), 'group' => 'Title Box', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Title Box Size', 'ultimate_vc' ), 'param_name' => 'title_box', 'value' => array( 'Auto' => 'auto', 'Custom' => 'custom', ), 'description' => __( 'Set Title Box Size', 'ultimate_vc' ), 'group' => 'Title Box', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Width', 'ultimate_vc' ), 'param_name' => 'title_box_width', 'value' => '115', 'suffix' => 'px', 'description' => __( 'Ex: 20px', 'ultimate_vc' ), 'dependency' => array( 'element' => 'title_box', 'value' => 'custom', ), 'group' => 'Title Box', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Height', 'ultimate_vc' ), 'param_name' => 'title_box_height', 'value' => '115', 'suffix' => 'px', 'description' => __( 'Ex: 20px ', 'ultimate_vc' ), 'dependency' => array( 'element' => 'title_box', 'value' => 'custom', ), 'group' => 'Title Box', ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    Description Design Setting

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Description', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Description Color', 'ultimate_vc' ), 'param_name' => 'desc_color', 'value' => '#444', 'description' => '', 'group' => 'Description', ), array( 'type' => 'number', 'param_name' => 'desc_width', 'heading' => __( 'Width', 'ultimate_vc' ), 'value' => '', 'suffix' => 'px', 'group' => 'Description', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Adaptive Height', 'ultimate_vc' ), 'param_name' => 'adaptive_height', 'value' => '', 'options' => array( 'on' => array( 'label' => __( 'Turn on Adaptive Height', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => __( 'If you have different height of descriptions. It will automatically adapt the maximum height. ', 'smile' ), 'dependency' => '', 'group' => 'Description', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'desc_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '35', __( 'Right', 'ultimate_vc' ) => '35', __( 'Bottom', 'ultimate_vc' ) => '35', __( 'Left', 'ultimate_vc' ) => '35', ), 'group' => 'Description', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Margin', 'ultimate_vc' ), 'param_name' => 'desc_margin', 'mode' => 'margin', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', ), 'group' => 'Description', ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    For Title

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'description' => __( "Click and select font of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '16', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'text', 'param_name' => 'title_typography', 'heading' => __( '

    For Description

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'description' => __( "Click and select font of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '16', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), ), ) ); // vc_map() end. } //vc_map function check. } // init_range_slider() end. /** * Function that register styles and scripts for Range Slider Module. * * @method range_slider_scripts */ public function range_slider_scripts() { Ultimate_VC_Addons::ultimate_register_style( 'ult_range_slider_css', 'range-slider' ); Ultimate_VC_Addons::ultimate_register_script( 'ult_range_slider_js', 'range-slider', false, array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-slider' ), ULTIMATE_VERSION, true ); Ultimate_VC_Addons::ultimate_register_script( 'ult_ui_touch_punch', 'range-slider-touch-punch', false, array( 'jquery', 'jquery-ui-widget', 'jquery-ui-mouse' ), ULTIMATE_VERSION, true ); // jquery.ui.labeledslider. Ultimate_VC_Addons::ultimate_register_script( 'ult_range_tick', 'jquery-ui-labeledslider', false, array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-slider' ), ULTIMATE_VERSION, false ); } } new Ultimate_Range_Slider(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Range_Slider' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Range_Slider extends WPBakeryShortCode { } } } ultimate_countdown.php000064400000066117150212230100011176 0ustar00 __( 'Countdown', 'ultimate_vc' ), 'base' => 'ult_countdown', 'class' => 'vc_countdown', 'icon' => 'vc_countdown', 'category' => 'Ultimate VC Addons', 'description' => __( 'Countdown Timer.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Countdown Timer Style', 'ultimate_vc' ), 'param_name' => 'count_style', 'value' => array( __( 'Digit and Unit Side by Side', 'smile' ) => 'ult-cd-s1', __( 'Digit and Unit Up and Down', 'smile' ) => 'ult-cd-s2', ), 'group' => 'General Settings', ), array( 'type' => 'datetimepicker', 'class' => '', 'heading' => __( 'Target Time For Countdown', 'ultimate_vc' ), 'param_name' => 'datetime', 'value' => '', 'description' => __( 'Date and time format (yyyy/mm/dd hh:mm:ss).', 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Countdown Timer Depends on', 'ultimate_vc' ), 'param_name' => 'ult_tz', 'value' => array( __( 'WordPress Defined Timezone', 'ultimate_vc' ) => 'ult-wptz', __( "User's System Timezone", 'ultimate_vc' ) => 'ult-usrtz', ), 'group' => 'General Settings', ), array( 'type' => 'checkbox', 'class' => '', 'heading' => __( 'Select Time Units To Display In Countdown Timer', 'ultimate_vc' ), 'param_name' => 'countdown_opts', 'value' => array( __( 'Years', 'ultimate_vc' ) => 'syear', __( 'Months', 'ultimate_vc' ) => 'smonth', __( 'Weeks', 'ultimate_vc' ) => 'sweek', __( 'Days', 'ultimate_vc' ) => 'sday', __( 'Hours', 'ultimate_vc' ) => 'shr', __( 'Minutes', 'ultimate_vc' ) => 'smin', __( 'Seconds', 'ultimate_vc' ) => 'ssec', ), 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Timer Digit Border Style', 'ultimate_vc' ), 'param_name' => 'br_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'group' => 'General Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Timer Digit Border Size', 'ultimate_vc' ), 'param_name' => 'br_size', 'value' => '', 'min' => '0', 'suffix' => 'px', 'dependency' => array( 'element' => 'br_style', 'value' => array( 'solid', 'dotted', 'dashed', 'double', 'inset', 'outset' ), ), 'group' => 'General Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Timer Digit Border Color', 'ultimate_vc' ), 'param_name' => 'br_color', 'value' => '', 'dependency' => array( 'element' => 'br_style', 'value' => array( 'solid', 'dotted', 'dashed', 'double', 'inset', 'outset' ), ), 'group' => 'General Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Timer Digit Border Radius', 'ultimate_vc' ), 'param_name' => 'br_radius', 'value' => '', 'min' => '0', 'suffix' => 'px', 'dependency' => array( 'element' => 'br_style', 'value' => array( 'solid', 'dotted', 'dashed', 'double', 'inset', 'outset' ), ), 'group' => 'General Settings', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Timer Digit Background Color', 'ultimate_vc' ), 'param_name' => 'timer_bg_color', 'value' => '', 'group' => 'General Settings', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Timer Digit Background Size', 'ultimate_vc' ), 'param_name' => 'br_time_space', 'min' => '0', 'value' => '0', 'suffix' => 'px', 'group' => 'General Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Extra Class for the Wrapper.', 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Day (Singular)', 'ultimate_vc' ), 'param_name' => 'string_days', 'value' => 'Day', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Days (Plural)', 'ultimate_vc' ), 'param_name' => 'string_days2', 'value' => 'Days', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Week (Singular)', 'ultimate_vc' ), 'param_name' => 'string_weeks', 'value' => 'Week', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Weeks (Plural)', 'ultimate_vc' ), 'param_name' => 'string_weeks2', 'value' => 'Weeks', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Month (Singular)', 'ultimate_vc' ), 'param_name' => 'string_months', 'value' => 'Month', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Months (Plural)', 'ultimate_vc' ), 'param_name' => 'string_months2', 'value' => 'Months', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Year (Singular)', 'ultimate_vc' ), 'param_name' => 'string_years', 'value' => 'Year', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Years (Plural)', 'ultimate_vc' ), 'param_name' => 'string_years2', 'value' => 'Years', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Hour (Singular)', 'ultimate_vc' ), 'param_name' => 'string_hours', 'value' => 'Hour', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Hours (Plural)', 'ultimate_vc' ), 'param_name' => 'string_hours2', 'value' => 'Hours', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Minute (Singular)', 'ultimate_vc' ), 'param_name' => 'string_minutes', 'value' => 'Minute', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Minutes (Plural)', 'ultimate_vc' ), 'param_name' => 'string_minutes2', 'value' => 'Minutes', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Second (Singular)', 'ultimate_vc' ), 'param_name' => 'string_seconds', 'value' => 'Second', 'group' => 'Strings Translation', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Seconds (Plural)', 'ultimate_vc' ), 'param_name' => 'string_seconds2', 'value' => 'Seconds', 'group' => 'Strings Translation', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', 'group' => 'General Settings', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Timer Digit Settings', 'ultimate_vc' ), 'param_name' => 'countdown_typograpy', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'timer_digit_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'tick_style', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Timer Digit Text Color', 'ultimate_vc' ), 'param_name' => 'tick_col', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Timer Digit Text Size', 'ultimate_vc' ), 'param_name' => 'tick_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Timer Digit Text Line height', 'ultimate_vc' ), 'param_name' => 'tick_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Timer Unit Settings', 'ultimate_vc' ), 'param_name' => 'countdown_typograpy', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'timer_unit_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'tick_unit_style', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Timer Unit Text Color', 'ultimate_vc' ), 'param_name' => 'tick_sep_col', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Timer Unit Text Size', 'ultimate_vc' ), 'param_name' => 'tick_sep_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Timer Unit Line Height', 'ultimate_vc' ), 'param_name' => 'tick_sep_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_countdown', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** * Shortcode handler function for icon block. * * @since ---- * @param array $atts represts module attribuits. * @access public */ public function countdown_shortcode( $atts ) { $ult_uco_settings = shortcode_atts( array( 'count_style' => 'ult-cd-s1', 'datetime' => '', 'ult_tz' => 'ult-wptz', 'countdown_opts' => '', 'tick_col' => '', 'tick_size' => '36', 'tick_line_height' => '', 'tick_style' => '', 'tick_unit_style' => '', 'timer_digit_font_family' => '', 'timer_unit_font_family' => '', 'tick_sep_col' => '', 'tick_sep_size' => '13', 'tick_sep_line_height' => '', 'tick_sep_style' => '', 'br_color' => '', 'br_style' => '', 'br_size' => '', 'timer_bg_color' => '', 'br_radius' => '', 'br_time_space' => '0', 'el_class' => '', 'string_days' => 'Day', 'string_days2' => 'Days', 'string_weeks' => 'Week', 'string_weeks2' => 'Weeks', 'string_months' => 'Month', 'string_months2' => 'Months', 'string_years' => 'Year', 'string_years2' => 'Years', 'string_hours' => 'Hour', 'string_hours2' => 'Hours', 'string_minutes' => 'Minute', 'string_minutes2' => 'Minutes', 'string_seconds' => 'Second', 'string_seconds2' => 'Seconds', 'css_countdown' => '', ), $atts ); $count_frmt = ''; $labels = ''; $countdown_design_style = ''; $tdfamily = ''; $tunifamily = ''; $labels = $ult_uco_settings['string_years2'] . ',' . $ult_uco_settings['string_months2'] . ',' . $ult_uco_settings['string_weeks2'] . ',' . $ult_uco_settings['string_days2'] . ',' . $ult_uco_settings['string_hours2'] . ',' . $ult_uco_settings['string_minutes2'] . ',' . $ult_uco_settings['string_seconds2']; $labels2 = $ult_uco_settings['string_years'] . ',' . $ult_uco_settings['string_months'] . ',' . $ult_uco_settings['string_weeks'] . ',' . $ult_uco_settings['string_days'] . ',' . $ult_uco_settings['string_hours'] . ',' . $ult_uco_settings['string_minutes'] . ',' . $ult_uco_settings['string_seconds']; $countdown_opt = explode( ',', $ult_uco_settings['countdown_opts'] ); if ( is_array( $countdown_opt ) ) { foreach ( $countdown_opt as $opt ) { if ( 'syear' == $opt ) { $count_frmt .= 'Y'; } if ( 'smonth' == $opt ) { $count_frmt .= 'O'; } if ( 'sweek' == $opt ) { $count_frmt .= 'W'; } if ( 'sday' == $opt ) { $count_frmt .= 'D'; } if ( 'shr' == $opt ) { $count_frmt .= 'H'; } if ( 'smin' == $opt ) { $count_frmt .= 'M'; } if ( 'ssec' == $opt ) { $count_frmt .= 'S'; } } } if ( is_numeric( $ult_uco_settings['tick_size'] ) ) { $ult_uco_settings['tick_size'] = 'desktop:' . $ult_uco_settings['tick_size'] . 'px;'; } $countdown_design_style = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_uco_settings['css_countdown'], ' ' ), 'ult_countdown', $atts ); $countdown_design_style = esc_attr( $countdown_design_style ); $countdown_id = 'countdown-wrap-' . wp_rand( 1000, 9999 ); $data_attr = ''; if ( '' == $count_frmt ) { $count_frmt = 'DHMS'; } if ( '' == $ult_uco_settings['br_size'] || '' == $ult_uco_settings['br_color'] || '' == $ult_uco_settings['br_style'] ) { if ( '' == $ult_uco_settings['timer_bg_color'] ) { $ult_uco_settings['el_class'] .= ' ult-cd-no-border'; } } else { $data_attr .= 'data-br-color="' . esc_attr( $ult_uco_settings['br_color'] ) . '" data-br-style="' . esc_attr( $ult_uco_settings['br_style'] ) . '" data-br-size="' . esc_attr( $ult_uco_settings['br_size'] ) . '" '; } // Responsive param. if ( is_numeric( $ult_uco_settings['tick_sep_size'] ) ) { $ult_uco_settings['tick_sep_size'] = 'desktop:' . $ult_uco_settings['tick_sep_size'] . 'px;'; } if ( is_numeric( $ult_uco_settings['tick_sep_line_height'] ) ) { $ult_uco_settings['tick_sep_line_height'] = 'desktop:' . $ult_uco_settings['tick_sep_line_height'] . 'px;'; } $count_down_id = 'count-down-wrap-' . wp_rand( 1000, 9999 ); $count_down_sep_args = array( 'target' => '#' . $count_down_id . ' .ult_countdown-period', 'media_sizes' => array( 'font-size' => $ult_uco_settings['tick_sep_size'], 'line-height' => $ult_uco_settings['tick_sep_line_height'], ), ); $count_down_sep_data_list = get_ultimate_vc_responsive_media_css( $count_down_sep_args ); if ( '' != $ult_uco_settings['timer_digit_font_family'] ) { $tdfamily = get_ultimate_font_family( $ult_uco_settings['timer_digit_font_family'] ); $timer_d_font_family = 'font-family:\'' . $tdfamily . '\';'; } if ( '' != $ult_uco_settings['timer_unit_font_family'] ) { $tunifamily = get_ultimate_font_family( $ult_uco_settings['timer_unit_font_family'] ); $data_attr .= ' data-tuni-font-family ="' . esc_attr( $tunifamily ) . '"'; } $stick_style = get_ultimate_font_style( $ult_uco_settings['tick_style'] ); $stick_unit_style = get_ultimate_font_style( $ult_uco_settings['tick_unit_style'] ); $data_attr .= ' data-tick-style="' . esc_attr( $stick_style ) . '" '; $data_attr .= ' data-tick-p-style="' . esc_attr( $ult_uco_settings['tick_sep_style'] ) . '" '; $data_attr .= ' data-bg-color="' . esc_attr( $ult_uco_settings['timer_bg_color'] ) . '" data-br-radius="' . esc_attr( $ult_uco_settings['br_radius'] ) . '" data-padd="' . esc_attr( $ult_uco_settings['br_time_space'] ) . '" '; switch ( $ult_uco_settings['tick_style'] ) { case 'bold': $tick_style_css = 'font-weight:bold;'; break; case 'italic': $tick_style_css = 'font-style:italic;'; break; case 'boldnitalic': $tick_style_css = 'font-weight:bold;'; $tick_style_css .= 'font-style:italic;'; break; default: $tick_style_css = $ult_uco_settings['tick_style']; break; } switch ( $ult_uco_settings['tick_sep_style'] ) { case 'bold': $tick_sep_style_css = 'font-weight:bold;'; break; case 'italic': $tick_sep_style_css = 'font-style:italic;'; break; case 'boldnitalic': $tick_sep_style_css = 'font-style:italic;'; $tick_sep_style_css = 'font-weight:bold;'; break; default: $tick_sep_style_css = $ult_uco_settings['tick_sep_style']; break; } $output = ''; $output .= '
    '; // Responsive param. if ( is_numeric( $ult_uco_settings['tick_size'] ) ) { $ult_uco_settings['tick_size'] = 'desktop:' . $ult_uco_settings['tick_size'] . 'px;'; } if ( is_numeric( $ult_uco_settings['tick_line_height'] ) ) { $ult_uco_settings['tick_line_height'] = 'desktop:' . $ult_uco_settings['tick_line_height'] . 'px;'; } $count_down_args = array( 'target' => '#' . $count_down_id . ' .ult_countdown-amount', 'media_sizes' => array( 'font-size' => $ult_uco_settings['tick_size'], 'line-height' => $ult_uco_settings['tick_line_height'], ), ); $count_down_data_list = get_ultimate_vc_responsive_media_css( $count_down_args ); if ( '' != $ult_uco_settings['datetime'] ) { $output .= '
    ' . $ult_uco_settings['datetime'] . '
    '; } $output .= '
    '; $is_preset = false; if ( isset( $_GET['preset'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; // remove backslash once copied. } return $output; } } // instantiate the class. $ult_countdown = new Ultimate_CountDown(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Countdown' ) ) { /** * Function that initializes Ultimate Countdown Module * * @class WPBakeryShortCode_Ult_Countdown */ class WPBakeryShortCode_Ult_Countdown extends WPBakeryShortCode { } } } ultimate_carousel.php000064400000102471150212230100010765 0ustar00 .items_to_show.vc_shortcode-param { background: #E6E6E6; padding-bottom: 10px; } .items_to_show.ult_margin_bottom{ margin-bottom: 15px; } .items_to_show.ult_margin_top{ margin-top: 15px; } '; } /** * Function for carousel admin script * * @since ---- * @access public */ public function ultimate_front_scripts() { Ultimate_VC_Addons::ultimate_register_script( 'ult-slick', 'slick', false, array( 'jquery' ), ULTIMATE_VERSION, false ); Ultimate_VC_Addons::ultimate_register_script( 'ult-slick-custom', 'slick-custom', false, array( 'jquery', 'ult-slick' ), ULTIMATE_VERSION, false ); Ultimate_VC_Addons::ultimate_register_style( 'ult-slick', 'slick' ); Ultimate_VC_Addons::ultimate_register_style( 'ult-icons', UAVC_URL . 'assets/css/icons.css', true ); } /** * Function for button admin script * * @since ---- * @param mixed $hook for the script. * @access public */ public function ultimate_admin_scripts( $hook ) { if ( 'post.php' == $hook || 'post-new.php' == $hook ) { wp_enqueue_style( 'ult-icons', UAVC_URL . 'assets/css/icons.css', null, ULTIMATE_VERSION, 'all' ); } } /** * Function to intialize the carusole module * * @since ---- * @access public */ public function init_carousel_addon() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Advanced Carousel', 'ultimate_vc' ), 'base' => 'ultimate_carousel', 'icon' => 'ultimate_carousel', 'class' => 'ultimate_carousel', 'as_parent' => array( 'except' => 'ultimate_carousel' ), 'content_element' => true, 'controls' => 'full', 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'description' => __( 'Carousel anything.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Slider Type', 'ultimate_vc' ), 'param_name' => 'slider_type', 'value' => array( 'Horizontal' => 'horizontal', 'Vertical' => 'vertical', 'Horizontal Full Width' => 'full_width', ), 'group' => 'General', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Slides to Scroll', 'ultimate_vc' ), 'param_name' => 'slide_to_scroll', 'value' => array( 'All visible' => 'all', 'One at a Time' => 'single', ), 'group' => 'General', ), array( 'type' => 'text', 'param_name' => 'title_text_typography', 'heading' => '

    ' . __( 'Items to Show‏ -', 'ultimate_vc' ) . '

    ', 'value' => '', 'edit_field_class' => 'vc_col-sm-12 items_to_show ult_margin_top', 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'edit_field_class' => 'vc_col-sm-4 items_to_show ult_margin_bottom', 'heading' => __( 'On Desktop', 'ultimate_vc' ), 'param_name' => 'slides_on_desk', 'value' => '5', 'min' => '1', 'max' => '25', 'step' => '1', 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'edit_field_class' => 'vc_col-sm-4 items_to_show ult_margin_bottom', 'heading' => __( 'On Tabs', 'ultimate_vc' ), 'param_name' => 'slides_on_tabs', 'value' => '3', 'min' => '1', 'max' => '25', 'step' => '1', 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'edit_field_class' => 'vc_col-sm-4 items_to_show ult_margin_bottom', 'heading' => __( 'On Mobile', 'ultimate_vc' ), 'param_name' => 'slides_on_mob', 'value' => '2', 'min' => '1', 'max' => '25', 'step' => '1', 'group' => 'General', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Infinite loop', 'ultimate_vc' ), 'param_name' => 'infinite_loop', 'value' => 'on', 'options' => array( 'on' => array( 'label' => __( 'Restart the slider automatically as it passes the last slide.', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'default_set' => true, 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Transition speed', 'ultimate_vc' ), 'param_name' => 'speed', 'value' => '300', 'min' => '100', 'max' => '10000', 'step' => '100', 'suffix' => 'ms', 'description' => __( 'Speed at which next slide comes.', 'ultimate_vc' ), 'group' => 'General', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Autoplay Slides‏', 'ultimate_vc' ), 'param_name' => 'autoplay', 'value' => 'on', 'options' => array( 'on' => array( 'label' => __( 'Enable Autoplay', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'default_set' => true, 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Autoplay Speed', 'ultimate_vc' ), 'param_name' => 'autoplay_speed', 'value' => '5000', 'min' => '100', 'max' => '10000', 'step' => '10', 'suffix' => 'ms', 'dependency' => array( 'element' => 'autoplay', 'value' => array( 'on' ), ), 'group' => 'General', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'group' => 'General', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Navigation Arrows', 'ultimate_vc' ), 'param_name' => 'arrows', 'value' => 'show', 'options' => array( 'show' => array( 'label' => __( 'Display next / previous navigation arrows', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'default_set' => true, 'group' => 'Navigation', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Arrow Style', 'ultimate_vc' ), 'param_name' => 'arrow_style', 'value' => array( 'Default' => 'default', 'Circle Background' => 'circle-bg', 'Square Background' => 'square-bg', 'Circle Border' => 'circle-border', 'Square Border' => 'square-border', ), 'dependency' => array( 'element' => 'arrows', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'arrow_bg_color', 'value' => '', 'dependency' => array( 'element' => 'arrow_style', 'value' => array( 'circle-bg', 'square-bg' ), ), 'group' => 'Navigation', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'arrow_border_color', 'value' => '', 'dependency' => array( 'element' => 'arrow_style', 'value' => array( 'circle-border', 'square-border' ), ), 'group' => 'Navigation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Size', 'ultimate_vc' ), 'param_name' => 'border_size', 'value' => '2', 'min' => '1', 'max' => '100', 'step' => '1', 'suffix' => 'px', 'dependency' => array( 'element' => 'arrow_style', 'value' => array( 'circle-border', 'square-border' ), ), 'group' => 'Navigation', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Arrow Color', 'ultimate_vc' ), 'param_name' => 'arrow_color', 'value' => '#333333', 'dependency' => array( 'element' => 'arrows', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Arrow Size', 'ultimate_vc' ), 'param_name' => 'arrow_size', 'value' => '24', 'min' => '10', 'max' => '75', 'step' => '1', 'suffix' => 'px', 'dependency' => array( 'element' => 'arrows', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'ultimate_navigation', 'class' => '', 'heading' => __( "Select icon for 'Next Arrow'", 'ultimate_vc' ), 'param_name' => 'next_icon', 'value' => 'ultsl-arrow-right4', 'dependency' => array( 'element' => 'arrows', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'ultimate_navigation', 'class' => '', 'heading' => __( "Select icon for 'Previous Arrow'", 'ultimate_vc' ), 'param_name' => 'prev_icon', 'value' => 'ultsl-arrow-left4', 'dependency' => array( 'element' => 'arrows', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Dots Navigation', 'ultimate_vc' ), 'param_name' => 'dots', 'value' => 'show', 'options' => array( 'show' => array( 'label' => __( 'Display dot navigation', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'default_set' => true, 'group' => 'Navigation', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color of dots', 'ultimate_vc' ), 'param_name' => 'dots_color', 'value' => '#333333', 'dependency' => array( 'element' => 'dots', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'ultimate_navigation', 'class' => '', 'heading' => __( "Select icon for 'Navigation Dots'", 'ultimate_vc' ), 'param_name' => 'dots_icon', 'value' => 'ultsl-record', 'dependency' => array( 'element' => 'dots', 'value' => array( 'show' ), ), 'group' => 'Navigation', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Item Animation', 'ultimate_vc' ), 'param_name' => 'item_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'group' => 'Animation', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Draggable Effect', 'ultimate_vc' ), 'param_name' => 'draggable', 'value' => 'on', 'options' => array( 'on' => array( 'label' => __( 'Allow slides to be draggable', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'default_set' => true, 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Touch Move', 'ultimate_vc' ), 'param_name' => 'touch_move', 'value' => 'on', 'options' => array( 'on' => array( 'label' => __( 'Enable slide moving with touch', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => array( 'element' => 'draggable', 'value' => array( 'on' ), ), 'default_set' => true, 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'RTL Mode', 'ultimate_vc' ), 'param_name' => 'rtl', 'value' => '', 'options' => array( 'on' => array( 'label' => __( 'Turn on RTL mode', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Adaptive Height', 'ultimate_vc' ), 'param_name' => 'adaptive_height', 'value' => '', 'options' => array( 'on' => array( 'label' => __( 'Turn on Adaptive Height', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => '', 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Pause on hover', 'ultimate_vc' ), 'param_name' => 'pauseohover', 'value' => 'on', 'options' => array( 'on' => array( 'label' => __( 'Pause the slider on hover', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => array( 'element' => 'autoplay', 'value' => 'on', ), 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Center mode', 'ultimate_vc' ), 'param_name' => 'centermode', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Enable center mode of the carousel', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => __( "Enables centered view with partial prev/next slides.
    Animations do not work with center mode.
    Slides to scroll -> 'All Visible' do not work with center mode.", 'ultimate_vc' ), 'dependency' => '', 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Focus on select', 'ultimate_vc' ), 'param_name' => 'focusonselect', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Middle the slide on select', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'dependency' => array( 'element' => 'centermode', 'value' => 'on', ), 'group' => 'Advanced', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Space between two items', 'ultimate_vc' ), 'param_name' => 'item_space', 'value' => '15', 'min' => '0', 'max' => '1000', 'step' => '1', 'suffix' => 'px', 'group' => 'Advanced', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', 'group' => 'General', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_ad_caraousel', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), 'js_view' => 'VcColumnView', ) ); // vc_map. } } /** * Shortcode handler function for icon block. * * @since ---- * @param array $atts represts module attribuits. * @param string $content module content. * @access public */ public function ultimate_carousel_shortcode( $atts, $content ) { $ult_uc_settings = shortcode_atts( array( 'slider_type' => 'horizontal', 'slides_on_desk' => '5', 'slides_on_tabs' => '3', 'slides_on_mob' => '2', 'slide_to_scroll' => 'all', 'speed' => '300', 'infinite_loop' => 'on', 'autoplay' => 'on', 'autoplay_speed' => '5000', 'lazyload' => '', 'arrows' => 'show', 'dots' => 'show', 'dots_icon' => 'ultsl-record', 'next_icon' => 'ultsl-arrow-right4', 'prev_icon' => 'ultsl-arrow-left4', 'dots_color' => '#333333', 'arrow_color' => '#333333', 'arrow_size' => '20', 'arrow_style' => 'default', 'arrow_bg_color' => '', 'arrow_border_color' => '', 'border_size' => '1.5', 'draggable' => 'on', 'swipe' => 'true', 'touch_move' => 'on', 'rtl' => '', 'item_space' => '15', 'el_class' => '', 'item_animation' => '', 'adaptive_height' => '', 'css_ad_caraousel' => '', 'pauseohover' => 'on', 'focusonselect' => 'off', 'centermode' => 'off', ), $atts ); $uid = uniqid( wp_rand() ); $settings = ''; $responsive = ''; $infinite = ''; $dot_display = ''; $custom_dots = ''; $arr_style = ''; $wrap_data = ''; $design_style = ''; $desing_style = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_uc_settings['css_ad_caraousel'], ' ' ), 'ultimate_carousel', $atts ); $desing_style = esc_attr( $desing_style ); if ( 'all' == $ult_uc_settings['slide_to_scroll'] ) { $ult_uc_settings['slide_to_scroll'] = $ult_uc_settings['slides_on_desk']; $slide_to_tab = $ult_uc_settings['slides_on_tabs']; $slide_to_mob = $ult_uc_settings['slides_on_mob']; } else { $ult_uc_settings['slide_to_scroll'] = 1; $slide_to_tab = 1; $slide_to_mob = 1; } $arr_style .= 'color:' . $ult_uc_settings['arrow_color'] . '; font-size:' . $ult_uc_settings['arrow_size'] . 'px;'; if ( 'circle-bg' == $ult_uc_settings['arrow_style'] || 'square-bg' == $ult_uc_settings['arrow_style'] ) { $arr_style .= 'background:' . $ult_uc_settings['arrow_bg_color'] . ';'; } elseif ( 'circle-border' == $ult_uc_settings['arrow_style'] || 'square-border' == $ult_uc_settings['arrow_style'] ) { $arr_style .= 'border:' . $ult_uc_settings['border_size'] . 'px solid ' . $ult_uc_settings['arrow_border_color'] . ';'; } if ( 'off' !== $ult_uc_settings['dots'] && '' !== $ult_uc_settings['dots'] ) { $settings .= 'dots: true,'; } else { $settings .= 'dots: false,'; } if ( 'off' !== $ult_uc_settings['autoplay'] && '' !== $ult_uc_settings['autoplay'] ) { $settings .= 'autoplay: true,'; } if ( '' !== $ult_uc_settings['autoplay_speed'] ) { $settings .= 'autoplaySpeed: ' . $ult_uc_settings['autoplay_speed'] . ','; } if ( '' !== $ult_uc_settings['speed'] ) { $settings .= 'speed: ' . $ult_uc_settings['speed'] . ','; } if ( 'off' !== $ult_uc_settings['infinite_loop'] && '' !== $ult_uc_settings['infinite_loop'] ) { $settings .= 'infinite: true,'; } else { $settings .= 'infinite: false,'; } if ( 'off' !== $ult_uc_settings['lazyload'] && '' !== $ult_uc_settings['lazyload'] ) { $settings .= 'lazyLoad: true,'; } if ( is_rtl() ) { if ( 'off' !== $ult_uc_settings['arrows'] && '' !== $ult_uc_settings['arrows'] ) { $settings .= 'arrows: true,'; $settings .= 'nextArrow: \'\','; $settings .= 'prevArrow: \'\','; } else { $settings .= 'arrows: false,'; } } else { if ( 'off' !== $ult_uc_settings['arrows'] && '' !== $ult_uc_settings['arrows'] ) { $settings .= 'arrows: true,'; $settings .= 'nextArrow: \'\','; $settings .= 'prevArrow: \'\','; } else { $settings .= 'arrows: false,'; } } if ( '' !== $ult_uc_settings['slide_to_scroll'] ) { $settings .= 'slidesToScroll:' . $ult_uc_settings['slide_to_scroll'] . ','; } if ( '' !== $ult_uc_settings['slides_on_desk'] ) { $settings .= 'slidesToShow:' . $ult_uc_settings['slides_on_desk'] . ','; } if ( '' == $ult_uc_settings['slides_on_mob'] ) { $ult_uc_settings['slides_on_mob'] = $ult_uc_settings['slides_on_desk']; $slide_to_tab = $ult_uc_settings['slide_to_scroll']; } if ( '' == $ult_uc_settings['slides_on_tabs'] ) { $ult_uc_settings['slides_on_tabs'] = $ult_uc_settings['slides_on_desk']; $slide_to_mob = $ult_uc_settings['slide_to_scroll']; } if ( 'off' !== $ult_uc_settings['draggable'] && '' !== $ult_uc_settings['draggable'] ) { $settings .= 'swipe: true,'; $settings .= 'draggable: true,'; } else { $settings .= 'swipe: false,'; $settings .= 'draggable: false,'; } if ( 'on' == $ult_uc_settings['touch_move'] ) { $settings .= 'touchMove: true,'; } else { $settings .= 'touchMove: false,'; } if ( 'off' !== $ult_uc_settings['rtl'] && '' !== $ult_uc_settings['rtl'] ) { $settings .= 'rtl: true,'; $wrap_data = 'dir="rtl"'; } if ( 'vertical' == $ult_uc_settings['slider_type'] ) { $settings .= 'vertical: true,'; } $site_rtl = 'false'; if ( is_rtl() ) { $site_rtl = 'true'; } if ( 'false' === $site_rtl || false === $site_rtl ) { $ultimate_rtl_support = get_option( 'ultimate_rtl_support' ); if ( 'enable' == $ultimate_rtl_support ) { $site_rtl = 'true'; } } if ( is_rtl() ) { $settings .= 'rtl: true,'; } if ( 'on' == $ult_uc_settings['pauseohover'] ) { $settings .= 'pauseOnHover: true,'; } else { $settings .= 'pauseOnHover: false,'; } $settings .= 'pauseOnFocus: false,'; if ( 'on' == $ult_uc_settings['centermode'] ) { $settings .= 'centerMode: true,'; } if ( 'on' == $ult_uc_settings['focusonselect'] && 'on' == $ult_uc_settings['centermode'] ) { $settings .= 'focusOnSelect: true,'; } if ( 'on' === $ult_uc_settings['adaptive_height'] ) { $settings .= 'adaptiveHeight: true,'; } $settings .= 'responsive: [ { breakpoint: 1026, settings: { slidesToShow: ' . $ult_uc_settings['slides_on_desk'] . ', slidesToScroll: ' . $ult_uc_settings['slide_to_scroll'] . ', ' . $infinite . ' ' . $dot_display . ' } }, { breakpoint: 1025, settings: { slidesToShow: ' . $ult_uc_settings['slides_on_tabs'] . ', slidesToScroll: ' . $slide_to_tab . ' } }, { breakpoint: 760, settings: { slidesToShow: ' . $ult_uc_settings['slides_on_mob'] . ', slidesToScroll: ' . $slide_to_mob . ' } } ],'; $settings .= 'pauseOnDotsHover: true,'; if ( 'off' !== $ult_uc_settings['dots_icon'] && '' !== $ult_uc_settings['dots_icon'] ) { if ( 'off' !== $ult_uc_settings['dots_color'] && '' !== $ult_uc_settings['dots_color'] ) { $custom_dots = 'style= "color:' . esc_attr( $ult_uc_settings['dots_color'] ) . ';"'; } $settings .= 'customPaging: function(slider, i) { return \'\'; },'; } if ( '' == $ult_uc_settings['item_animation'] ) { $ult_uc_settings['item_animation'] = 'no-animation'; } ob_start(); $uniqid = uniqid( wp_rand() ); echo ''; ?> $cb ) { if ( in_array( $tag, $disabled_tags, true ) ) { continue; } // Overwrite the callback function. $shortcode_tags[ $tag ] = 'ultimate_wrap_shortcode_in_div'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $_shortcode_tags['ult_item_space'] = $ult_uc_settings['item_space']; $_shortcode_tags['item_animation'] = $ult_uc_settings['item_animation']; } } } // Wrap the output of a shortcode in a div with class "ult-item-wrap". // The original callback is called from the $_shortcode_tags array. if ( ! function_exists( 'ultimate_wrap_shortcode_in_div' ) ) { /** * Wrap the output of a shortcode in a div with class "ult-item-wrap". * * @since ---- * @param array $attr represts module attribuits. * @param string $content value has been set to null. * @param mixed $tag fuction call. * @access public */ function ultimate_wrap_shortcode_in_div( $attr, $content = null, $tag ) { global $_shortcode_tags; return '
    ' . call_user_func( $_shortcode_tags[ $tag ], $attr, $content, $tag ) . '
    '; } } if ( ! function_exists( 'ultimate_restore_shortcodes' ) ) { /** * Restore the original callbacks. * * @since ---- * @access public */ function ultimate_restore_shortcodes() { global $shortcode_tags, $_shortcode_tags; // Restore the original callbacks. if ( isset( $_shortcode_tags ) ) { $shortcode_tags = $_shortcode_tags; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } } } ultimate_ribbons.php000064400000050442150212230100010606 0ustar00 __( 'Ribbon', 'ultimate_vc' ), 'base' => 'ultimate_ribbon', 'class' => 'vc_ultimate_ribbon', 'icon' => 'vc_ultimate_ribbon', 'category' => 'Ultimate VC Addons', 'description' => __( 'Design awesome Ribbon styles', 'ultimate_vc' ), 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Ribbon Message', 'ultimate_vc' ), 'admin_label' => true, 'param_name' => 'ribbon_msg', 'value' => 'SPECIAL OFFER', 'group' => 'Layout', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Left Icon ', 'ultimate_vc' ), 'param_name' => 'left_icon', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Right Icon ', 'ultimate_vc' ), 'param_name' => 'right_icon', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Hide Ribbon Wings', 'ultimate_vc' ), 'param_name' => 'ribbon_wings', 'value' => array( __( 'None', 'ultimate_vc' ) => 'none', __( 'Small Devices', 'ultimate_vc' ) => 'small', __( 'Medium & Small Devices', 'ultimate_vc' ) => 'medium', ), 'description' => 'To hide Ribbon Wings on Small or Medium device use this option.', 'group' => 'Layout', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Style', 'ultimate_vc' ), 'param_name' => 'style_option', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper top-margin vc_column vc_col-sm-12', 'group' => 'Layout', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Ribbon Width', 'ultimate_vc' ), 'param_name' => 'ribbon_width', 'value' => array( __( 'Auto', 'ultimate_vc' ) => 'auto', __( 'Full', 'ultimate_vc' ) => 'full', __( 'Custom', 'ultimate_vc' ) => 'custom', ), 'group' => 'Layout', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Custom Width', 'ultimate_vc' ), 'param_name' => 'custom_width', 'value' => '', 'suffix' => 'px', 'dependency' => array( 'element' => 'ribbon_width', 'value' => array( 'custom' ), ), 'group' => 'Layout', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'ribbon_alignment', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'group' => 'Layout', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Stitching', 'ultimate_vc' ), 'param_name' => 'ribbon_stitching', 'value' => array( __( 'Yes', 'ultimate_vc' ) => 'yes', __( 'No', 'ultimate_vc' ) => 'no', ), 'description' => 'To give Stitch effect on Ribbon.', 'group' => 'Layout', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Shadow', 'ultimate_vc' ), 'param_name' => 'rib_shadow', 'value' => array( __( 'Yes', 'ultimate_vc' ) => 'yes', __( 'No', 'ultimate_vc' ) => 'no', ), 'group' => 'Layout', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Ribbon Colors', 'ultimate_vc' ), 'param_name' => 'ribbon_option', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper top-margin vc_column vc_col-sm-12', 'group' => 'Layout', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Ribbon Color', 'ultimate_vc' ), 'param_name' => 'ribbon_color', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Ribbon Fold Color', 'ultimate_vc' ), 'param_name' => 'rib_fold_color', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Ribbon Wings Color', 'ultimate_vc' ), 'param_name' => 'rib_wing_color', 'value' => '', 'group' => 'Layout', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), 'group' => 'Layout', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Ribbon Text Settings', 'ultimate_vc' ), 'param_name' => 'ribbon_text_typograpy', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', 'group' => 'Typography', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H3', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'ribbon_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'ribbon_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'main_ribbon_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'main_ribbon_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'ribbon_text_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'dropdown', 'heading' => __( 'Transform', 'ultimate_vc' ), 'param_name' => 'ribbontext_trans', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'unset', __( 'UPPERCASE', 'ultimate_vc' ) => 'uppercase', __( 'lowercase', 'ultimate_vc' ) => 'lowercase', __( 'Capitalize', 'ultimate_vc' ) => 'capitalize', ), 'group' => 'Typography', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Letter Spacing', 'ultimate_vc' ), 'param_name' => 'letter_space', 'value' => '', 'min' => 1, 'max' => 15, 'suffix' => 'px', 'group' => 'Typography', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_ribbon_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } }//end ultimate_ribbons_module_init() /** * Render function for Ultimate Ribbon Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_ribbons_module_shortcode( $atts, $content = null ) { $rib_width = ''; $rib_align = ''; $rib_left_color = ''; $rib_right_color = ''; $ribbon_style_inline = ''; $main_ribbon_responsive = ''; $main_ribbon_style_inline = ''; $ribbont_trans = ''; $ribbon_spacer = ''; $ribbon_design_style_css = ''; $ribc_width = ''; $rib_media = ''; $output = ''; $ult_rib_settings = shortcode_atts( array( 'ribbon_msg' => 'SPECIAL OFFER', 'left_icon' => '', 'right_icon' => '', 'ribbon_stitching' => 'yes', 'ribbon_width' => 'auto', 'ribbon_alignment' => 'center', 'custom_width' => '', 'rib_shadow' => 'yes', 'ribbon_color' => '', 'icon_color' => '', 'rib_wing_color' => '', 'ribbon_font_family' => '', 'ribbon_style' => '', 'rib_fold_color' => '', 'main_ribbon_font_size' => '', 'main_ribbon_line_height' => '', 'ribbon_text_color' => '', 'ribbontext_trans' => 'unset', 'letter_space' => '', 'ribbon_wings' => 'none', 'el_class' => '', 'css_ribbon_design' => '', 'heading_tag' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; // Default Design Editor. $ribbon_design_style_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_rib_settings['css_ribbon_design'], ' ' ), 'ultimate_ribbons', $atts ); $ribbon_design_style_css = esc_attr( $ribbon_design_style_css ); $micro = wp_rand( 0000, 9999 ); $id = uniqid( 'ultimate-ribbon-' . $micro ); // Style option for Ribbon Module. if ( '' == $ult_rib_settings['heading_tag'] ) { $ult_rib_settings['heading_tag'] = 'h3'; } if ( '' != $ult_rib_settings['ribbon_alignment'] ) { $rib_align = 'text-align:' . esc_attr( $ult_rib_settings['ribbon_alignment'] ) . ';'; } if ( '' != $ult_rib_settings['ribbon_width'] ) { if ( 'auto' == $ult_rib_settings['ribbon_width'] ) { $rib_width = 'auto'; } elseif ( 'full' == $ult_rib_settings['ribbon_width'] ) { $rib_width .= 'full'; } elseif ( 'custom' == $ult_rib_settings['ribbon_width'] ) { $rib_width .= 'custom'; $ribc_width = 'width:calc(' . esc_attr( $ult_rib_settings['custom_width'] ) . 'px - 7em)'; } } if ( 'none' != $ult_rib_settings['ribbon_wings'] ) { $rib_media = 'media-width'; } // Color option for Ribbon Module. if ( '' != $ult_rib_settings['ribbon_color'] ) { $ult_rib_settings['ribbon_color'] = 'background:' . esc_attr( $ult_rib_settings['ribbon_color'] ) . ';'; } if ( '' != $ult_rib_settings['icon_color'] ) { $ult_rib_settings['icon_color'] = 'color:' . esc_attr( $ult_rib_settings['icon_color'] ) . ';'; } if ( '' != $ult_rib_settings['rib_wing_color'] ) { $rib_left_color = 'border-top-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; $rib_left_color .= 'border-bottom-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; $rib_left_color .= 'border-right-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; $rib_right_color = 'border-top-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; $rib_right_color .= 'border-bottom-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; $rib_right_color .= 'border-left-color:' . esc_attr( $ult_rib_settings['rib_wing_color'] ) . ';'; } if ( '' != $ult_rib_settings['rib_fold_color'] ) { $output .= ''; } /* ---- main heading styles ---- */ if ( '' != $ult_rib_settings['ribbon_font_family'] ) { $mrfont_family = get_ultimate_font_family( $ult_rib_settings['ribbon_font_family'] ); if ( $mrfont_family ) { $ribbon_style_inline .= 'font-family:\'' . $mrfont_family . '\';'; } } // main ribbon font style. $ribbon_style_inline .= get_ultimate_font_style( $ult_rib_settings['ribbon_style'] ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $ult_rib_settings['main_ribbon_font_size'] ) ) { $ult_rib_settings['main_ribbon_font_size'] = 'desktop:' . $ult_rib_settings['main_ribbon_font_size'] . 'px;'; } if ( is_numeric( $ult_rib_settings['main_ribbon_line_height'] ) ) { $ult_rib_settings['main_ribbon_line_height'] = 'desktop:' . $ult_rib_settings['main_ribbon_line_height'] . 'px;'; } // responsive {main} ribbon styles. $args = array( 'target' => '.' . $id . ' .ult-ribbon-text-title', 'media_sizes' => array( 'font-size' => $ult_rib_settings['main_ribbon_font_size'], 'line-height' => $ult_rib_settings['main_ribbon_line_height'], ), ); $main_ribbon_responsive = get_ultimate_vc_responsive_media_css( $args ); // attach font color if set. if ( '' != $ult_rib_settings['ribbon_text_color'] ) { $main_ribbon_style_inline .= 'color:' . $ult_rib_settings['ribbon_text_color'] . ';'; } // Text -Transform Property for Ribbon Text. if ( '' != $ult_rib_settings['ribbontext_trans'] ) { $ribbont_trans = 'text-transform: ' . $ult_rib_settings['ribbontext_trans'] . ';'; } // Letter spacing for Ribbon Text. if ( '' !== $ult_rib_settings['letter_space'] ) { $ribbon_spacer = 'letter-spacing:' . $ult_rib_settings['letter_space'] . 'px'; } $output .= '
    '; $output .= '
    <' . $ult_rib_settings['heading_tag'] . ' class="ult-ribbon ' . esc_attr( $rib_width ) . ' ' . esc_attr( $rib_media ) . '" style="' . esc_attr( $ribc_width ) . '"> '; if ( 'yes' == $ult_rib_settings['ribbon_stitching'] ) { $output .= '
    '; } $output .= '' . esc_attr( $ult_rib_settings['ribbon_msg'] ) . ''; if ( 'yes' == $ult_rib_settings['ribbon_stitching'] ) { $output .= '
    ';} $output .= '
    '; $output .= '
    '; $output .= '
    '; return $output; } }//end class new Ultimate_Ribbons(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Ribbon' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Ribbon extends WPBakeryShortCode { } } } index.php000064400000000126150212230100006345 0ustar00' . join( '|', $known ) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; if ( ! preg_match_all( $pattern, $u_agent, $matches ) ) { //PHPCS:ignore:Generic.CodeAnalysis.EmptyStatement.DetectedIf // we have no matching number just continue. } // see how many we have. $i = count( $matches['browser'] ); if ( 1 != $i ) { // we will have two since we are not using 'other' argument yet. // see if version is before or after the name. if ( strripos( $u_agent, 'Version' ) < strripos( $u_agent, $ub ) ) { $version = $matches['version'][0]; } else { $version = $matches['version'][1]; } } else { $version = $matches['version'][0]; } // check if we have a number. if ( null == $version || '' == $version ) { $version = '?';} return array( 'name' => $bname, 'version' => $version, ); } /** * Funtion that prepare the array. * * @param array $atts represts module attribuits. * @method ult_prepareAtts */ function ult_prepareAtts( $atts ) { // PHPCS:ignore:WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( isset( $atts ) ) { $return = str_replace( array( '``', ), array( '"', ), $atts ); } return $return; } ultimate_list_icon.php000064400000052176150212230100011141 0ustar00 __( 'List Icon', 'ultimate_vc' ), 'base' => 'ultimate_icon_list', 'class' => 'ultimate_icon_list', 'icon' => 'ultimate_icon_list', 'category' => 'Ultimate VC Addons', 'description' => __( 'Add a set of multiple icons and give some custom style.', 'ultimate_vc' ), 'as_parent' => array( 'only' => 'ultimate_icon_list_item' ), 'content_element' => true, 'show_settings_on_create' => true, 'js_view' => 'VcColumnView', 'params' => array( // Play with icon selector. array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => '', 'min' => 0, 'max' => 200, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Space after Icon', 'ultimate_vc' ), 'param_name' => 'icon_margin', 'value' => '', 'min' => 0, 'max' => 100, 'suffix' => 'px', 'description' => __( 'How much distance would you like in two icons?', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_icon_list', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); vc_map( array( 'name' => __( 'List Icon Item', 'ultimate_vc' ), 'base' => 'ultimate_icon_list_item', 'class' => 'icon_list_item', 'icon' => 'icon_list_item', 'category' => 'Ultimate VC Addons', 'description' => __( 'Add a list of icons with some content and give some custom style.', 'ultimate_vc' ), 'as_child' => array( 'only' => 'ultimate_icon_list' ), 'show_settings_on_create' => true, 'is_container' => false, 'params' => array( // Play with icon selector. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'List content', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Enter the list content here.', 'ultimate_vc' ), 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', 'group' => 'List Content', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'smile' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'heading' => __( 'List content settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'content_font_family', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'content_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'content_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'content_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'content_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), ), ) ); } } /** Shortcode handler function for list Icon. * * @param array $atts Attributes. * @param string $content Content. */ public function ultimate_icon_list_shortcode( $atts, $content = null ) { global $vc_list_icon_size, $vc_list_icon_margin; $ult_icon_list_settings = shortcode_atts( array( 'icon_size' => '32', 'icon_margin' => '5', 'el_class' => '', 'css_icon_list' => '', ), $atts ); $ult_icon_list_settings['css_icon_list'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_icon_list_settings['css_icon_list'], ' ' ), 'ultimate_icon_list', $atts ); $ult_icon_list_settings['css_icon_list'] = esc_attr( $ult_icon_list_settings['css_icon_list'] ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $vc_list_icon_size = $ult_icon_list_settings['icon_size']; $vc_list_icon_margin = $ult_icon_list_settings['icon_margin']; $output = '
    '; $output .= '
      '; $output .= do_shortcode( $content ); $output .= '
    '; $output .= '
    '; return $output; } /** Icon list item Shortcode. * * @param array $atts Attributes. * @param string $content Content. */ public function icon_list_item_shortcode( $atts, $content = null ) { $img_width = ''; $icon_link = ''; $icon_animation = ''; $tooltip_disp = ''; $tooltip_text = ''; $css_icon_list = ''; $ult_icon_list_item_settings = shortcode_atts( array( 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_size' => '', 'icon_margin' => '', 'el_class' => '', 'content_font_family' => '', 'content_font_style' => '', 'content_font_size' => '', 'content_font_color' => '', 'content_line_ht' => '', 'content_font_size' => '', ), $atts ); global $vc_list_icon_size, $vc_list_icon_margin; if ( empty( $ult_icon_list_item_settings['icon_size'] ) ) { $ult_icon_list_item_settings['icon_size'] = $vc_list_icon_size; } if ( empty( $ult_icon_list_item_settings['icon_margin'] ) ) { $ult_icon_list_item_settings['icon_margin'] = $vc_list_icon_margin; } if ( 'none' !== $icon_animation ) { $css_trans = 'data-animation="' . esc_attr( $icon_animation ) . '" data-animation-delay="03"'; } $output = ''; $style = ''; $link_sufix = ''; $link_prefix = ''; $target = ''; $content_style = ''; $href = ''; $icon_align_style = ''; if ( '' !== $ult_icon_list_item_settings['icon_margin'] ) { if ( is_rtl() ) { $style .= 'margin-left:' . $ult_icon_list_item_settings['icon_margin'] . 'px;'; } else { $style .= 'margin-right:' . $ult_icon_list_item_settings['icon_margin'] . 'px;'; } } if ( '' != $ult_icon_list_item_settings['content_font_family'] ) { $apply_font_family = get_ultimate_font_family( $ult_icon_list_item_settings['content_font_family'] ); if ( $apply_font_family ) { $content_style .= 'font-family:\'' . $apply_font_family . '\';'; } } if ( '' != $ult_icon_list_item_settings['content_font_style'] ) { $content_style .= get_ultimate_font_style( $ult_icon_list_item_settings['content_font_style'] ); } if ( '' != $ult_icon_list_item_settings['content_font_color'] ) { $content_style .= 'color:' . $ult_icon_list_item_settings['content_font_color'] . ';'; } if ( is_numeric( $ult_icon_list_item_settings['content_font_size'] ) ) { $ult_icon_list_item_settings['content_font_size'] = 'desktop:' . $ult_icon_list_item_settings['content_font_size'] . 'px;'; } if ( is_numeric( $ult_icon_list_item_settings['content_line_ht'] ) ) { $ult_icon_list_item_settings['content_line_ht'] = 'desktop:' . $ult_icon_list_item_settings['content_line_ht'] . 'px;'; } $list_icon_id = 'list-icon-wrap-' . wp_rand( 1000, 9999 ); $list_icon_args = array( 'target' => '#' . $list_icon_id . ' .uavc-list-desc', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_icon_list_item_settings['content_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_icon_list_item_settings['content_line_ht'], ), ); $list_icon_data_list = get_ultimate_vc_responsive_media_css( $list_icon_args ); $icon_animation = ''; $icon_link = ''; $output .= '
    '; if ( '' !== $ult_icon_list_item_settings['icon'] || '' !== $ult_icon_list_item_settings['icon_img'] ) { if ( 'custom' == $ult_icon_list_item_settings['icon_type'] ) { $ult_icon_list_item_settings['icon_style'] = 'none'; } $main_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_icon_list_item_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_icon_list_item_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_icon_list_item_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_icon_list_item_settings['icon_size'] ) . '" icon_size="' . esc_attr( $ult_icon_list_item_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_icon_list_item_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_icon_list_item_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_icon_list_item_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_icon_list_item_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_icon_list_item_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_icon_list_item_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_icon_list_item_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_icon_list_item_settings['icon_border_spacing'] ) . '" icon_link="' . esc_attr( $icon_link ) . '" icon_animation="' . esc_attr( $icon_animation ) . '"]' ); $output .= "\n" . '
    '; $output .= $main_icon; $output .= "\n" . '
    '; } $output .= '' . do_shortcode( $content ) . ''; $output .= '
    '; $output = '
  • ' . $output . '
  • '; return $output; } } } if ( class_exists( 'Ultimate_List_Icon' ) ) { $ultimate_list_icon = new Ultimate_List_Icon(); } // Extend WPBakeryShortCodesContainer class to inherit all required functionality. if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Icon_List' ) ) { /** * Class WPBakeryShortCode_Ultimate_Icon_List */ class WPBakeryShortCode_Ultimate_Icon_List extends WPBakeryShortCodesContainer { } } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Icon_List_Item' ) ) { /** * Class WPBakeryShortCode_Ultimate_Icon_List_Item */ class WPBakeryShortCode_Ultimate_Icon_List_Item extends WPBakeryShortCode { } } ultimate_info_banner.php000064400000105716150212230100011435 0ustar00 __( 'Info Banner', 'ultimate_vc' ), 'base' => 'ultimate_info_banner', 'class' => 'vc_info_banner_icon', 'icon' => 'vc_icon_info_banner', 'category' => 'Ultimate VC Addons', 'description' => __( 'Displays the banner information', 'ultimate_vc' ), 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title ', 'ultimate_vc' ), 'param_name' => 'banner_title', 'admin_label' => true, 'value' => '', 'description' => __( 'Give a title to this banner', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'Div', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is Div', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'textarea', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'banner_desc', 'value' => '', 'description' => __( 'Text that comes on mouse hover.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Button Text', 'ultimate_vc' ), 'param_name' => 'button_text', 'admin_label' => true, 'value' => '', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'button_link', 'value' => '', 'description' => __( 'Add link / select existing page to link to this banner', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Information Alignment', 'ultimate_vc' ), 'param_name' => 'info_alignment', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'ib3-info-center', __( 'Left', 'ultimate_vc' ) => 'ib3-info-left', __( 'Right', 'ultimate_vc' ) => 'ib3-info-right', ), ), array( 'type' => 'dropdown', 'heading' => __( 'Animation Effect', 'ultimate_vc' ), 'param_name' => 'info_effect', 'value' => array( __( 'No Effect', 'ultimate_vc' ) => '', __( 'Fade-In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade-In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade-In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade-In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade-In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Flip', 'ultimate_vc' ) => 'flipInX', __( 'Zoom', 'ultimate_vc' ) => 'zoomIn', ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Banner Image', 'ultimate_vc' ), 'param_name' => 'banner_image', 'value' => '', 'description' => __( 'Upload the image for this banner', 'ultimate_vc' ), 'group' => 'Image', ), array( 'type' => 'number', 'param_name' => 'banner_size', 'heading' => __( 'Banner Min Height', 'ultimate_vc' ), 'value' => '50', 'min' => '50', 'suffix' => 'px', 'group' => 'Design', ), array( 'type' => 'dropdown', 'heading' => __( 'Image Alignment', 'ultimate_vc' ), 'param_name' => 'ib3_alignment', 'value' => array( __( 'Top Left', 'ultimate_vc' ) => 'ultb3-img-top-left', __( 'Top Center', 'ultimate_vc' ) => 'ultb3-img-top-center', __( 'Top Right', 'ultimate_vc' ) => 'ultb3-img-top-right', __( 'Center Left', 'ultimate_vc' ) => 'ultb3-img-center-left', __( 'Center', 'ultimate_vc' ) => 'ultb3-img-center', __( 'Center Right', 'ultimate_vc' ) => 'ultb3-img-center-right', __( 'Bottom Left', 'ultimate_vc' ) => 'ultb3-img-bottom-left', __( 'Bottom Center', 'ultimate_vc' ) => 'ultb3-img-bottom-center', __( 'Bottom Right', 'ultimate_vc' ) => 'ultb3-img-bottom-right', ), 'group' => 'Image', ), array( 'type' => 'dropdown', 'heading' => __( 'Effect', 'ultimate_vc' ), 'param_name' => 'ib3_effect', 'value' => array( __( 'No Effect', 'ultimate_vc' ) => '', __( 'Slide Down', 'ultimate_vc' ) => 'ultb3-hover-1', __( 'Slide Up', 'ultimate_vc' ) => 'ultb3-hover-2', __( 'Slide Left', 'ultimate_vc' ) => 'ultb3-hover-3', __( 'Slide Right', 'ultimate_vc' ) => 'ultb3-hover-4', __( 'Pan', 'ultimate_vc' ) => 'ultb3-hover-5', __( 'Zoom Out', 'ultimate_vc' ) => 'ultb3-hover-6', ), 'group' => 'Image', ), array( 'type' => 'colorpicker', 'heading' => __( 'Overlay Color on Image', 'ultimate_vc' ), 'param_name' => 'overlay_color', 'value' => '', 'group' => 'Image', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Image Height', 'ultimate_vc' ), 'param_name' => 'image_height_typography', 'class' => 'ult-param-heading', 'group' => 'Image', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'number', 'param_name' => 'banner_img_height_large_screen', 'heading' => " " . __( 'Large Screen', 'ultimate_vc' ), 'min' => '50', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'number', 'param_name' => 'banner_img_height', 'heading' => " " . __( 'Desktop', 'ultimate_vc' ), 'min' => '50', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'number', 'heading' => " " . __( 'Tablet', 'ultimate_vc' ), 'param_name' => 'banner_img_height_tablet', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'number', 'heading' => " " . __( 'Tablet Portrait', 'ultimate_vc' ), 'param_name' => 'banner_img_height_tablet_portrait', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'number', 'heading' => " " . __( 'Mobile Landscape', 'ultimate_vc' ), 'param_name' => 'banner_img_height_mobile_landscape', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'number', 'heading' => " " . __( 'Mobile', 'ultimate_vc' ), 'param_name' => 'banner_img_height_mobile', 'value' => '', 'suffix' => 'px', 'group' => 'Image', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'colorpicker', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'ib3_background', 'group' => 'Design', ), array( 'type' => 'dropdown', 'heading' => __( 'Border', 'ultimate_vc' ), 'param_name' => 'ib3_border', 'value' => array( __( 'No Border', 'ultimate_vc' ) => 'no-border', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', ), 'group' => 'Design', ), array( 'type' => 'number', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'ib3_border_width', 'suffix' => 'px', 'value' => '1', 'group' => 'Design', 'dependency' => array( 'element' => 'ib3_border', 'value' => array( 'solid', 'dashed', 'dotted', 'double' ), ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'ib3_border_color', 'group' => 'Design', 'dependency' => array( 'element' => 'ib3_border', 'value' => array( 'solid', 'dashed', 'dotted', 'double' ), ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Button Color', 'ultimate_vc' ), 'param_name' => 'button_color', 'value' => '#1e73be', 'group' => 'Button', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'button_text_color', 'value' => '#898989', 'group' => 'Button', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Hover Color', 'ultimate_vc' ), 'param_name' => 'button_text_hover_color', 'value' => '#ffffff', 'group' => 'Button', ), array( 'type' => 'number', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'button_border_width', 'value' => '2', 'suffix' => 'px', 'group' => 'Button', ), array( 'type' => 'number', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'button_border_radius', 'value' => '50', 'suffix' => 'px', 'group' => 'Button', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Title Settings', 'ultimate_vc' ), 'param_name' => 'title_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font_family', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'title_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Description Settings', 'ultimate_vc' ), 'param_name' => 'desc_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font_family', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'desc_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Button Settings', 'ultimate_vc' ), 'param_name' => 'button_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'button_font_family', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'button_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'button_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'button_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_infobanner', 'group' => __( 'Design', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** Shortcode handler function for stats banner. * * @param array $atts Attributes. **/ public function banner_shortcode( $atts ) { $output = ''; $style = ''; $img_style = ''; $infobnr_design = ''; $target = ''; $link_title = ''; $rel = ''; $ult_info_banner_settings = shortcode_atts( array( 'banner_title' => '', 'heading_tag' => 'div', 'banner_desc' => '', 'info_alignment' => 'ib3-info-center', 'banner_image' => '', 'banner_size' => '50', 'ib3_alignment' => 'ultb3-img-top-left', 'button_text' => '', 'button_link' => '', 'info_effect' => '', 'ib3_effect' => '', 'ib3_background' => '', 'ib3_border' => 'no-border', 'ib3_border_width' => '1', 'ib3_border_color' => '', 'title_font_family' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_color' => '', 'title_line_height' => '', 'desc_font_family' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_color' => '', 'desc_line_height' => '', 'button_font_family' => '', 'button_font_style' => '', 'button_font_size' => '', 'button_color' => '#1e73be', 'button_line_height' => '', 'button_border_radius' => '50', 'button_border_width' => '2', 'button_text_color' => '#898989', 'button_text_hover_color' => '#ffffff', 'banner_img_height_large_screen' => '', 'banner_img_height' => '', 'banner_img_height_tablet' => '', 'banner_img_height_tablet_portrait' => '', 'banner_img_height_mobile' => '', 'banner_img_height_mobile_landscape' => '', 'overlay_color' => '', 'el_class' => '', 'css_infobanner' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $infobnr_design = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_info_banner_settings['css_infobanner'], ' ' ), 'ultimate_info_banner', $atts ); $infobnr_design = esc_attr( $infobnr_design ); /* typography */ $title_style_inline = ''; $desc_style_inline = ''; $button_style_inline = ''; if ( '' != $ult_info_banner_settings['title_font_family'] ) { $temp = get_ultimate_font_family( $ult_info_banner_settings['title_font_family'] ); if ( '' != $temp ) { $title_style_inline .= 'font-family:' . $temp . ';'; } } $title_style_inline .= get_ultimate_font_style( $ult_info_banner_settings['title_font_style'] ); if ( is_numeric( $ult_info_banner_settings['title_font_size'] ) ) { $ult_info_banner_settings['title_font_size'] = 'desktop:' . $ult_info_banner_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_info_banner_settings['title_line_height'] ) ) { $ult_info_banner_settings['title_line_height'] = 'desktop:' . $ult_info_banner_settings['title_line_height'] . 'px;'; } $info_banner_id = 'Info-banner-wrap' . wp_rand( 1000, 9999 ); $info_banner_args = array( 'target' => '#' . $info_banner_id . ' .ultb3-title', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_banner_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_banner_settings['title_line_height'], ), ); $info_banner_data_list = get_ultimate_vc_responsive_media_css( $info_banner_args ); if ( '' != $ult_info_banner_settings['title_color'] ) { $title_style_inline .= 'color:' . $ult_info_banner_settings['title_color'] . ';'; } if ( '' != $ult_info_banner_settings['desc_font_family'] ) { $temp = get_ultimate_font_family( $ult_info_banner_settings['desc_font_family'] ); if ( '' != $temp ) { $desc_style_inline .= 'font-family:' . $temp . ';'; } } $desc_style_inline .= get_ultimate_font_style( $ult_info_banner_settings['desc_font_style'] ); if ( is_numeric( $ult_info_banner_settings['desc_font_size'] ) ) { $ult_info_banner_settings['desc_font_size'] = 'desktop:' . $ult_info_banner_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_info_banner_settings['desc_line_height'] ) ) { $ult_info_banner_settings['desc_line_height'] = 'desktop:' . $ult_info_banner_settings['desc_line_height'] . 'px;'; } $info_banner_desc_args = array( 'target' => '#' . $info_banner_id . ' .ultb3-desc', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_banner_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_banner_settings['desc_line_height'], ), ); $info_banner_desc_data_list = get_ultimate_vc_responsive_media_css( $info_banner_desc_args ); if ( '' != $ult_info_banner_settings['desc_color'] ) { $desc_style_inline .= 'color:' . $ult_info_banner_settings['desc_color'] . ';'; } if ( '' != $ult_info_banner_settings['button_font_family'] ) { $temp = get_ultimate_font_family( $ult_info_banner_settings['button_font_family'] ); if ( '' != $temp ) { $button_style_inline .= 'font-family:' . $temp . ';'; } } $button_style_inline .= get_ultimate_font_style( $ult_info_banner_settings['button_font_style'] ); if ( is_numeric( $ult_info_banner_settings['button_font_size'] ) ) { $ult_info_banner_settings['button_font_size'] = 'desktop:' . $ult_info_banner_settings['button_font_size'] . 'px;'; } if ( is_numeric( $ult_info_banner_settings['button_line_height'] ) ) { $ult_info_banner_settings['button_line_height'] = 'desktop:' . $ult_info_banner_settings['button_line_height'] . 'px;'; } $info_banner_btn_args = array( 'target' => '#' . $info_banner_id . ' .ultb3-btn', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_banner_settings['button_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_banner_settings['button_line_height'], ), ); $info_banner_btn_data_list = get_ultimate_vc_responsive_media_css( $info_banner_btn_args ); $banner_src = apply_filters( 'ult_get_img_single', $ult_info_banner_settings['banner_image'], 'url', 'full' ); $alt = apply_filters( 'ult_get_img_single', $ult_info_banner_settings['banner_image'], 'alt' ); if ( '' != $ult_info_banner_settings['ib3_background'] ) { $style .= 'background-color: ' . $ult_info_banner_settings['ib3_background'] . ';'; } if ( 'no-border' != $ult_info_banner_settings['ib3_border'] ) { $style .= 'border:' . $ult_info_banner_settings['ib3_border_width'] . 'px ' . $ult_info_banner_settings['ib3_border'] . ' ' . $ult_info_banner_settings['ib3_border_color'] . ';'; } $id = uniqid( wp_rand() ); $button_link_main = ''; $title = ''; $target = ''; if ( '' != $ult_info_banner_settings['button_link'] ) { $button_link_temp = vc_build_link( $ult_info_banner_settings['button_link'] ); $button_link_main = $button_link_temp['url']; $title = ( isset( $button_link_temp['title'] ) && '' !== $button_link_temp['title'] ) ? esc_attr( $button_link_temp['title'] ) : ''; $target = $button_link_temp['target']; $rel = ( isset( $button_link_temp['rel'] ) && '' !== $button_link_temp['rel'] ) ? esc_attr( $button_link_temp['rel'] ) : ''; } if ( '' == $button_link_main ) { $button_link_main = 'javascript:void(0);'; } $output .= '
    '; if ( '' != $ult_info_banner_settings['overlay_color'] ) { $output .= '
    '; } if ( isset( $banner_src ) && '' != $banner_src ) { $output .= '' . esc_attr( $alt ) . ''; } $output .= '
    '; if ( '' != $ult_info_banner_settings['banner_title'] ) { $output .= '<' . $ult_info_banner_settings['heading_tag'] . ' class="ultb3-title ult-responsive" ' . $info_banner_data_list . ' style="' . esc_attr( $title_style_inline ) . '">' . $ult_info_banner_settings['banner_title'] . ''; } if ( '' != $ult_info_banner_settings['banner_desc'] ) { $output .= '
    ' . $ult_info_banner_settings['banner_desc'] . '
    '; } if ( '' != $ult_info_banner_settings['button_text'] ) { if ( '' != $target ) { $target = 'target="' . esc_attr( $target ) . '"'; } $output .= '' . $ult_info_banner_settings['button_text'] . ''; } $output .= '
    '; $output .= '
    '; $global_button_style = ''; $global_button_hover_style = ''; $is_css = false; if ( '' != $ult_info_banner_settings['button_color'] ) { $global_button_style .= 'border:' . $ult_info_banner_settings['button_border_width'] . 'px solid ' . $ult_info_banner_settings['button_color'] . ';'; $global_button_hover_style .= 'background:' . $ult_info_banner_settings['button_color'] . ';'; $is_css = true; } if ( '' != $ult_info_banner_settings['button_border_radius'] ) { $global_button_style .= 'border-radius:' . $ult_info_banner_settings['button_border_radius'] . 'px;'; $is_css = true; } if ( '' != $ult_info_banner_settings['button_text_color'] ) { $global_button_style .= 'color:' . $ult_info_banner_settings['button_text_color'] . ';'; $is_css = true; } if ( '' != $ult_info_banner_settings['button_text_hover_color'] ) { $global_button_hover_style .= 'color:' . $ult_info_banner_settings['button_text_hover_color'] . ';'; $is_css = true; } if ( $is_css ) { $output .= ''; if ( '' != $ult_info_banner_settings['banner_img_height_large_screen'] ) { $output .= ''; } if ( '' != $ult_info_banner_settings['banner_img_height_tablet'] ) { $output .= ''; } if ( '' != $ult_info_banner_settings['banner_img_height_tablet_portrait'] ) { $output .= ''; } if ( '' != $ult_info_banner_settings['banner_img_height_mobile_landscape'] ) { $output .= ''; } if ( '' != $ult_info_banner_settings['banner_img_height_mobile'] ) { $output .= ''; } } return $output; } } } if ( class_exists( 'Ultimate_Info_Banner' ) ) { $ultimate_info_banner = new Ultimate_Info_Banner(); } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Info_Banner' ) ) { /** * Class WPBakeryShortCode_Ultimate_Info_Banner */ class WPBakeryShortCode_Ultimate_Info_Banner extends WPBakeryShortCode { } } ultimate_info_box.php000064400000115503150212230100010753 0ustar00 'selector', 'icon' => 'none', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_animation' => '', 'title' => '', 'link' => '', 'hover_effect' => 'style_1', 'pos' => 'default', 'box_min_height' => '', 'box_border_style' => '', 'box_border_width' => '', 'box_border_color' => '', 'box_bg_color' => '', 'read_more' => 'none', 'read_text' => 'Read More', 'heading_tag' => 'h3', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'desc_font_line_height' => '', 'el_class' => '', 'css_info_box' => '', ), $atts, 'bsf-info-box' ); $html = ''; $target = ''; $suffix = ''; $prefix = ''; $title_style = ''; $desc_style = ''; $inf_design_style = ''; $inf_design_style = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_info_box_settings['css_info_box'], ' ' ), 'bsf-info-box', $atts ); $inf_design_style = esc_attr( $inf_design_style ); $box_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_info_box_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_info_box_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_info_box_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_info_box_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_info_box_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_info_box_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_info_box_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_info_box_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_info_box_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_info_box_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_info_box_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_info_box_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_info_box_settings['icon_border_spacing'] ) . '" icon_animation="' . esc_attr( $ult_info_box_settings['icon_animation'] ) . '"]' ); $prefix .= '
    '; $suffix .= '
    '; $ex_class = ''; $ic_class = ''; if ( '' != $ult_info_box_settings['pos'] ) { $ex_class .= $ult_info_box_settings['pos'] . '-icon'; $ic_class = 'aio-icon-' . $ult_info_box_settings['pos']; } /* title */ if ( '' != $ult_info_box_settings['title_font'] ) { $font_family = get_ultimate_font_family( $ult_info_box_settings['title_font'] ); if ( '' != $font_family ) { $title_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_info_box_settings['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_info_box_settings['title_font_style'] ); } if ( is_numeric( $ult_info_box_settings['title_font_size'] ) ) { $ult_info_box_settings['title_font_size'] = 'desktop:' . $ult_info_box_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_info_box_settings['title_font_line_height'] ) ) { $ult_info_box_settings['title_font_line_height'] = 'desktop:' . $ult_info_box_settings['title_font_line_height'] . 'px;'; } $info_box_id = 'Info-box-wrap-' . wp_rand( 1000, 9999 ); $info_box_args = array( 'target' => '#' . $info_box_id . ' .aio-icon-title', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_box_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_box_settings['title_font_line_height'], ), ); $info_box_data_list = get_ultimate_vc_responsive_media_css( $info_box_args ); if ( '' != $ult_info_box_settings['title_font_color'] ) { $title_style .= 'color:' . $ult_info_box_settings['title_font_color'] . ';'; } /* description */ if ( '' != $ult_info_box_settings['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_info_box_settings['desc_font'] ); if ( '' !== $font_family ) { $desc_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_info_box_settings['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_info_box_settings['desc_font_style'] ); } if ( is_numeric( $ult_info_box_settings['desc_font_size'] ) ) { $ult_info_box_settings['desc_font_size'] = 'desktop:' . $ult_info_box_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_info_box_settings['desc_font_line_height'] ) ) { $ult_info_box_settings['desc_font_line_height'] = 'desktop:' . $ult_info_box_settings['desc_font_line_height'] . 'px;'; } $info_box_desc_args = array( 'target' => '#' . $info_box_id . ' .aio-icon-description', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_info_box_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_info_box_settings['desc_font_line_height'], ), ); $info_box_desc_data_list = get_ultimate_vc_responsive_media_css( $info_box_desc_args ); if ( '' != $ult_info_box_settings['desc_font_color'] ) { $desc_style .= 'color:' . $ult_info_box_settings['desc_font_color'] . ';'; } $box_style = ''; $box_style_data = ''; if ( 'square_box' == $ult_info_box_settings['pos'] ) { if ( '' != $ult_info_box_settings['box_min_height'] ) { $box_style_data .= "data-min-height='" . esc_attr( $ult_info_box_settings['box_min_height'] ) . "px'"; } if ( '' != $ult_info_box_settings['box_border_color'] ) { $box_style .= 'border-color:' . $ult_info_box_settings['box_border_color'] . ';'; } if ( '' != $ult_info_box_settings['box_border_style'] ) { $box_style .= 'border-style:' . $ult_info_box_settings['box_border_style'] . ';'; } if ( '' != $ult_info_box_settings['box_border_width'] ) { $box_style .= 'border-width:' . $ult_info_box_settings['box_border_width'] . 'px;'; } if ( '' != $ult_info_box_settings['box_bg_color'] ) { $box_style .= 'background-color:' . $ult_info_box_settings['box_bg_color'] . ';'; } } $html .= '
    '; if ( 'heading-right' == $ult_info_box_settings['pos'] || 'right' == $ult_info_box_settings['pos'] ) { if ( 'right' == $ult_info_box_settings['pos'] ) { $html .= '
    '; } if ( '' !== $ult_info_box_settings['title'] ) { $html .= '
    '; $link_prefix = ''; $link_sufix = ''; if ( 'none' !== $ult_info_box_settings['link'] ) { if ( 'title' == $ult_info_box_settings['read_more'] ) { $href = vc_build_link( $ult_info_box_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix = ''; $link_sufix = ''; } } $html .= $link_prefix . '<' . $ult_info_box_settings['heading_tag'] . ' class="aio-icon-title ult-responsive" ' . $info_box_data_list . ' style="' . esc_attr( $title_style ) . '">' . $ult_info_box_settings['title'] . '' . $link_sufix; $html .= '
    '; } if ( 'right' !== $ult_info_box_settings['pos'] ) { if ( 'none' !== $ult_info_box_settings['icon'] || '' !== $ult_info_box_settings['icon_img'] ) { $html .= '
    ' . $box_icon . '
    '; } } if ( '' !== $content ) { $html .= '
    '; $html .= do_shortcode( $content ); if ( 'none' !== $ult_info_box_settings['link'] ) { if ( 'more' == $ult_info_box_settings['read_more'] ) { $href = vc_build_link( $ult_info_box_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $more_link = ''; $more_link .= $ult_info_box_settings['read_text']; $more_link .= ' »'; $more_link .= ''; $html .= $more_link; } } $html .= '
    '; } if ( 'right' == $ult_info_box_settings['pos'] ) { $html .= '
    '; if ( 'none' !== $ult_info_box_settings['icon'] || '' !== $ult_info_box_settings['icon_img'] ) { $html .= '
    ' . $box_icon . '
    '; } } } else { if ( 'none' !== $ult_info_box_settings['icon'] || '' != $ult_info_box_settings['icon_img'] ) { $html .= '
    ' . $box_icon . '
    '; } if ( 'left' == $ult_info_box_settings['pos'] ) { $html .= '
    '; } if ( '' !== $ult_info_box_settings['title'] ) { $html .= '
    '; $link_prefix = ''; $link_sufix = ''; if ( 'none' !== $ult_info_box_settings['link'] ) { if ( 'title' == $ult_info_box_settings['read_more'] ) { $href = vc_build_link( $ult_info_box_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix = ''; $link_sufix = ''; } } $html .= $link_prefix . '<' . $ult_info_box_settings['heading_tag'] . ' class="aio-icon-title ult-responsive" ' . $info_box_data_list . ' style="' . esc_attr( $title_style ) . '">' . $ult_info_box_settings['title'] . '' . $link_sufix; $html .= '
    '; } if ( '' !== $content ) { $html .= '
    '; $html .= do_shortcode( $content ); if ( 'none' !== $ult_info_box_settings['link'] ) { if ( 'more' == $ult_info_box_settings['read_more'] ) { $href = vc_build_link( $ult_info_box_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $more_link = ''; $more_link .= $ult_info_box_settings['read_text']; $more_link .= ' »'; $more_link .= ''; $html .= $more_link; } } $html .= '
    '; } if ( 'left' == $ult_info_box_settings['pos'] ) { $html .= '
    '; } } $html .= '
    '; if ( 'none' !== $ult_info_box_settings['link'] ) { if ( 'box' == $ult_info_box_settings['read_more'] ) { $href = vc_build_link( $ult_info_box_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $output = $prefix . '' . $html . '' . $suffix; } else { $output = $prefix . $html . $suffix; } } else { $output = $prefix . $html . $suffix; } $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } /** * Add icon box Component. */ public function icon_box_init() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Info Box', 'ultimate_vc' ), 'base' => 'bsf-info-box', 'icon' => 'vc_info_box', 'class' => 'info_box', 'category' => 'Ultimate VC Addons', 'description' => __( 'Adds icon box with custom font icon', 'ultimate_vc' ), 'controls' => 'full', 'show_settings_on_create' => true, 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), // Icon Box Heading. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'title', 'admin_label' => true, 'value' => '', 'description' => __( 'Provide the title for this icon box.', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-4', ), // Add some description. array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Provide the description for this icon box.', 'ultimate_vc' ), 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), // Select link option - to box or with read more text. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Apply link to:', 'ultimate_vc' ), 'param_name' => 'read_more', 'value' => array( __( 'No Link', 'ultimate_vc' ) => 'none', __( 'Complete Box', 'ultimate_vc' ) => 'box', __( 'Box Title', 'ultimate_vc' ) => 'title', __( 'Display Read More', 'ultimate_vc' ) => 'more', ), 'description' => __( 'Select whether to use color for icon or not.', 'ultimate_vc' ), ), // Add link to existing content or to another resource. array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Add Link', 'ultimate_vc' ), 'param_name' => 'link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'read_more', 'value' => array( 'box', 'title', 'more' ), ), ), // Link to traditional read more. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Read More Text', 'ultimate_vc' ), 'param_name' => 'read_text', 'value' => 'Read More', 'description' => __( 'Customize the read more text.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'read_more', 'value' => array( 'more' ), ), ), // Hover Effect type. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Hover Effect type', 'ultimate_vc' ), 'param_name' => 'hover_effect', 'value' => array( __( 'No Effect', 'ultimate_vc' ) => 'style_1', __( 'Icon Zoom', 'ultimate_vc' ) => 'style_2', __( 'Icon Bounce Up', 'ultimate_vc' ) => 'style_3', ), 'description' => __( 'Select the type of effct you want on hover', 'smile' ), ), // Position the icon box. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Box Style', 'ultimate_vc' ), 'param_name' => 'pos', 'value' => array( __( 'Icon at Left with heading', 'ultimate_vc' ) => 'default', __( 'Icon at Right with heading', 'ultimate_vc' ) => 'heading-right', __( 'Icon at Left', 'ultimate_vc' ) => 'left', __( 'Icon at Right', 'ultimate_vc' ) => 'right', __( 'Icon at Top', 'ultimate_vc' ) => 'top', __( 'Boxed Style', 'ultimate_vc' ) => 'square_box', ), 'description' => __( 'Select icon position. Icon box style will be changed according to the icon position.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Box Min Height', 'ultimate_vc' ), 'param_name' => 'box_min_height', 'value' => '', 'suffix' => 'px', 'dependency' => array( 'element' => 'pos', 'value' => array( 'square_box' ), ), 'description' => __( 'Select Min Height for Box.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Box Border Style', 'ultimate_vc' ), 'param_name' => 'box_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'dependency' => array( 'element' => 'pos', 'value' => array( 'square_box' ), ), 'description' => __( 'Select Border Style for box border.', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Box Border Width', 'ultimate_vc' ), 'param_name' => 'box_border_width', 'value' => '', 'suffix' => '', 'dependency' => array( 'element' => 'pos', 'value' => array( 'square_box' ), ), 'description' => __( 'Select Width for Box Border.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Box Border Color', 'ultimate_vc' ), 'param_name' => 'box_border_color', 'value' => '', 'dependency' => array( 'element' => 'pos', 'value' => array( 'square_box' ), ), 'description' => __( 'Select Border color for border box.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Box Background Color', 'ultimate_vc' ), 'param_name' => 'box_bg_color', 'value' => '', 'dependency' => array( 'element' => 'pos', 'value' => array( 'square_box' ), ), 'description' => __( 'Select Box background color.', 'ultimate_vc' ), ), // Customize everything. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the icon box, and you can use this class for your customizations.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'heading' => __( 'Title settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'title_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'heading' => __( 'Description settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_info_box', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), // end params array. ) // end vc_map array. ); // end vc_map. } // end function check 'vc_map'. }//end icon_box_init() /** Icon Box Scripts. */ public function icon_box_scripts() { Ultimate_VC_Addons::ultimate_register_style( 'info-box-style', 'info-box' ); Ultimate_VC_Addons::ultimate_register_script( 'info_box_js', 'info-box' ); } }//end class } if ( class_exists( 'AIO_Icons_Box' ) ) { $aio_icons_box = new AIO_Icons_Box(); } ultimate_fancy_text.php000064400000100622150212230100011310 0ustar00 __( 'Fancy Text', 'ultimate_vc' ), 'base' => 'ultimate_fancytext', 'class' => 'vc_ultimate_fancytext', 'icon' => 'vc_ultimate_fancytext', 'category' => 'Ultimate VC Addons', 'description' => __( 'Fancy lines with animation effects.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'textfield', 'param_name' => 'fancytext_prefix', 'heading' => __( 'Prefix', 'ultimate_vc' ), 'value' => '', ), array( 'type' => 'textarea', 'heading' => __( 'Fancy Text', 'ultimate_vc' ), 'param_name' => 'fancytext_strings', 'description' => __( 'Enter each string on a new line', 'ultimate_vc' ), 'admin_label' => true, ), array( 'type' => 'textfield', 'param_name' => 'fancytext_suffix', 'heading' => __( 'Suffix', 'ultimate_vc' ), 'value' => '', ), array( 'type' => 'dropdown', 'heading' => __( 'Effect', 'ultimate_vc' ), 'param_name' => 'fancytext_effect', 'value' => array( __( 'Type', 'ultimate_vc' ) => 'typewriter', __( 'Slide Up', 'ultimate_vc' ) => 'ticker', ), ), array( 'type' => 'dropdown', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'fancytext_align', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), ), array( 'type' => 'number', 'heading' => __( 'Type Speed', 'ultimate_vc' ), 'param_name' => 'strings_textspeed', 'min' => 0, 'value' => 35, 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), 'description' => __( 'Speed at which line progresses / Speed of typing effect.', 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Backspeed', 'ultimate_vc' ), 'param_name' => 'strings_backspeed', 'min' => 0, 'value' => 0, 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), 'description' => __( 'Speed of delete / backspace effect.', 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Start Delay', 'ultimate_vc' ), 'param_name' => 'strings_startdelay', 'min' => 0, 'value' => '200', 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), 'description' => __( 'Example - If set to 5000, the first string will appear after 5 seconds.', 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Back Delay', 'ultimate_vc' ), 'param_name' => 'strings_backdelay', 'min' => 0, 'value' => '1500', 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), 'description' => __( 'Example - If set to 5000, the string will remain visible for 5 seconds before backspace effect.', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'heading' => __( 'Enable Loop', 'ultimate_vc' ), 'param_name' => 'typewriter_loop', 'value' => 'true', 'default_set' => true, 'options' => array( 'true' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), ), array( 'type' => 'ult_switch', 'heading' => __( 'Show Cursor', 'ultimate_vc' ), 'param_name' => 'typewriter_cursor', 'value' => 'true', 'default_set' => true, 'options' => array( 'true' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Cursor Text', 'ultimate_vc' ), 'param_name' => 'typewriter_cursor_text', 'value' => '|', 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'typewriter_cursor', 'value' => array( 'true' ), ), ), array( 'type' => 'number', 'heading' => __( 'Animation Speed', 'ultimate_vc' ), 'param_name' => 'strings_tickerspeed', 'min' => 0, 'value' => 200, 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'ticker', 'ticker-down' ), ), 'description' => __( "Duration of 'Slide Up' animation", 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Pause Time', 'ultimate_vc' ), 'param_name' => 'ticker_wait_time', 'min' => 0, 'value' => '3000', 'suffix' => __( 'In Miliseconds', 'ultimate_vc' ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'ticker', 'ticker-down' ), ), 'description' => __( 'How long the string should stay visible?', 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Show Items', 'ultimate_vc' ), 'param_name' => 'ticker_show_items', 'min' => 1, 'value' => 1, 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'ticker', 'ticker-down' ), ), 'description' => __( 'How many items should be visible at a time?', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'heading' => __( 'Pause on Hover', 'ultimate_vc' ), 'param_name' => 'ticker_hover_pause', 'value' => '', 'options' => array( 'true' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'group' => 'Advanced Settings', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'ticker', 'ticker-down' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'ex_class', ), array( 'type' => 'ult_param_heading', 'param_name' => 'fancy_text_typography', 'text' => __( 'Fancy Text Settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'strings_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'strings_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font Size', 'ultimate_vc' ), 'param_name' => 'strings_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'strings_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'heading' => __( 'Fancy Text Color', 'ultimate_vc' ), 'param_name' => 'fancytext_color', 'group' => 'Advanced Settings', 'group' => 'Typography', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter', 'ticker', 'ticker-down' ), ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Fancy Text Background', 'ultimate_vc' ), 'param_name' => 'ticker_background', 'group' => 'Advanced Settings', 'group' => 'Typography', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter', 'ticker', 'ticker-down' ), ), ), array( 'type' => 'dropdown', 'heading' => __( 'Transform', 'ultimate_vc' ), 'param_name' => 'fancytext_trans', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'unset', __( 'UPPERCASE', 'ultimate_vc' ) => 'uppercase', __( 'lowercase', 'ultimate_vc' ) => 'lowercase', __( 'Capitalize', 'ultimate_vc' ) => 'capitalize', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'fancy_prefsuf_text_typography', 'text' => __( 'Prefix Suffix Text Settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'prefsuf_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'prefsuf_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font Size', 'ultimate_vc' ), 'param_name' => 'prefix_suffix_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'prefix_suffix_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Prefix & Suffix Text Color', 'ultimate_vc' ), 'param_name' => 'sufpref_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Prefix & Suffix Background Color', 'ultimate_vc' ), 'param_name' => 'sufpref_bg_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'heading' => __( 'Cursor Color', 'ultimate_vc' ), 'param_name' => 'typewriter_cursor_color', 'group' => 'Advanced Settings', 'group' => 'Typography', 'dependency' => array( 'element' => 'fancytext_effect', 'value' => array( 'typewriter' ), ), ), array( 'type' => 'dropdown', 'heading' => __( 'Markup', 'ultimate_vc' ), 'param_name' => 'fancytext_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'div', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is Div', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'dropdown', 'heading' => __( 'Transform', 'ultimate_vc' ), 'param_name' => 'fancypre_trans', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'unset', __( 'UPPERCASE', 'ultimate_vc' ) => 'uppercase', __( 'lowercase', 'ultimate_vc' ) => 'lowercase', __( 'Capitalize', 'ultimate_vc' ) => 'capitalize', ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_fancy_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** * Shortcode handler function for block. * * @since ---- * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_fancytext_shortcode( $atts, $content = null ) { $ult_ft_settings['fancytext_strings'] = ''; $ult_ft_settings['fancytext_prefix'] = ''; $ult_ft_settings['fancytext_suffix'] = ''; $ult_ft_settings['fancytext_effect'] = ''; $ult_ft_settings['strings_textspeed'] = ''; $ult_ft_settings['strings_tickerspeed'] = ''; $ult_ft_settings['typewriter_cursor'] = ''; $ult_ft_settings['typewriter_cursor_text'] = ''; $ult_ft_settings['typewriter_loop'] = ''; $ult_ft_settings['fancytext_align'] = ''; $ult_ft_settings['strings_font_family'] = ''; $ult_ft_settings['strings_font_style'] = ''; $ult_ft_settings['strings_font_size'] = ''; $ult_ft_settings['sufpref_color'] = ''; $ult_ft_settings['strings_line_height'] = ''; $ult_ft_settings['strings_startdelay'] = ''; $ult_ft_settings['strings_backspeed'] = ''; $ult_ft_settings['strings_backdelay'] = ''; $ult_ft_settings['ticker_wait_time'] = ''; $ult_ft_settings['ticker_show_items'] = ''; $ult_ft_settings['ticker_hover_pause'] = ''; $ult_ft_settings['ex_class'] = ''; $ult_ft_settings['prefsuf_font_family'] = ''; $ult_ft_settings['prefsuf_font_style'] = ''; $ult_ft_settings['prefix_suffix_font_size'] = ''; $ult_ft_settings['prefix_suffix_line_height'] = ''; $ult_ft_settings['sufpref_bg_color'] = ''; $ult_ft_settings['fancypre_trans'] = ''; $ult_ft_settings['fancytext_trans'] = ''; $id = uniqid( wp_rand() ); $ult_ft_settings = shortcode_atts( array( 'fancytext_strings' => '', 'fancytext_prefix' => '', 'fancytext_suffix' => '', 'fancytext_effect' => 'typewriter', 'strings_textspeed' => '35', 'strings_tickerspeed' => '200', 'typewriter_loop' => 'true', 'typewriter_cursor_color' => '', 'fancytext_tag' => 'div', 'fancytext_align' => 'center', 'strings_font_family' => '', 'strings_font_style' => '', 'strings_font_size' => '', 'sufpref_color' => '', 'strings_line_height' => '', 'strings_startdelay' => '200', 'strings_backspeed' => '0', 'strings_backdelay' => '1500', 'typewriter_cursor' => 'true', 'typewriter_cursor_text' => '|', 'ticker_wait_time' => '3000', 'ticker_show_items' => '1', 'ticker_hover_pause' => '', 'ticker_background' => '', 'fancytext_color' => '', 'prefsuf_font_family' => '', 'prefsuf_font_style' => '', 'prefix_suffix_font_size' => '', 'prefix_suffix_line_height' => '', 'sufpref_bg_color' => '', 'ex_class' => '', 'css_fancy_design' => '', 'fancypre_trans' => 'unset', 'fancytext_trans' => 'unset', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $string_inline_style = ''; $vticker_inline = ''; $valign = ''; $prefsuf_style = ''; $css_design_style = ''; $css_design_style = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_ft_settings['css_fancy_design'], ' ' ), 'ultimate_fancytext', $atts ); $css_design_style = esc_attr( $css_design_style ); if ( '' != $ult_ft_settings['strings_font_family'] ) { $font_family = get_ultimate_font_family( $ult_ft_settings['strings_font_family'] ); if ( '' !== $font_family ) { $string_inline_style .= 'font-family:\'' . $font_family . '\';'; } } $string_inline_style .= get_ultimate_font_style( $ult_ft_settings['strings_font_style'] ); if ( '' != $ult_ft_settings['prefsuf_font_family'] ) { $font_family = get_ultimate_font_family( $ult_ft_settings['prefsuf_font_family'] ); if ( '' !== $font_family ) { $prefsuf_style .= 'font-family:\'' . $font_family . '\';'; } } $prefsuf_style .= get_ultimate_font_style( $ult_ft_settings['prefsuf_font_style'] ); $fancy_text_id = 'uvc-type-wrap-' . wp_rand( 1000, 9999 ); if ( is_numeric( $ult_ft_settings['strings_font_size'] ) ) { $ult_ft_settings['strings_font_size'] = 'desktop:' . $ult_ft_settings['strings_font_size'] . 'px;'; } if ( is_numeric( $ult_ft_settings['strings_line_height'] ) ) { $ult_ft_settings['strings_line_height'] = 'desktop:' . $ult_ft_settings['strings_line_height'] . 'px;'; } $fancy_args = array( 'target' => '#' . $fancy_text_id . '', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_ft_settings['strings_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_ft_settings['strings_line_height'], ), ); $data_list = get_ultimate_vc_responsive_media_css( $fancy_args ); if ( is_numeric( $ult_ft_settings['prefix_suffix_font_size'] ) ) { $ult_ft_settings['prefix_suffix_font_size'] = 'desktop:' . $ult_ft_settings['prefix_suffix_font_size'] . 'px !important;'; } if ( is_numeric( $ult_ft_settings['prefix_suffix_line_height'] ) ) { $ult_ft_settings['prefix_suffix_line_height'] = 'desktop:' . $ult_ft_settings['prefix_suffix_line_height'] . 'px !important;'; } $fancy_prefsuf_args = array( 'target' => '#' . $fancy_text_id . ' .mycustfancy', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_ft_settings['prefix_suffix_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_ft_settings['prefix_suffix_line_height'], ), ); $prefsuf_data_list = get_ultimate_vc_responsive_media_css( $fancy_prefsuf_args ); if ( '' != $ult_ft_settings['sufpref_color'] ) { $prefsuf_style .= 'color:' . $ult_ft_settings['sufpref_color'] . ';'; } if ( '' != $ult_ft_settings['sufpref_bg_color'] ) { $prefsuf_style .= 'background :' . $ult_ft_settings['sufpref_bg_color'] . ';'; } if ( '' != $ult_ft_settings['fancytext_align'] ) { $string_inline_style .= 'text-align:' . $ult_ft_settings['fancytext_align'] . ';'; } // Order of replacement. $order = array( "\r\n", "\n", "\r", '
    ', '
    ', '
    ' ); $replace = '|'; // Processes \r\n's first so they aren't converted twice. $str = str_replace( $order, $replace, $ult_ft_settings['fancytext_strings'] ); $lines = explode( '|', $str ); $count_lines = count( $lines ); $ult_ft_settings['ex_class'] .= ' uvc-type-align-' . $ult_ft_settings['fancytext_align'] . ' '; if ( '' == $ult_ft_settings['fancytext_prefix'] ) { $ult_ft_settings['ex_class'] .= 'uvc-type-no-prefix'; } if ( '' != $ult_ft_settings['fancytext_color'] ) { $vticker_inline .= 'color:' . $ult_ft_settings['fancytext_color'] . ';'; } if ( '' != $ult_ft_settings['ticker_background'] ) { $vticker_inline .= 'background:' . $ult_ft_settings['ticker_background'] . ';'; if ( 'typewriter' == $ult_ft_settings['fancytext_effect'] ) { $valign = 'fancytext-typewriter-background-enabled'; } else { $valign = 'fancytext-background-enabled'; } } // Fancy Text Transform. if ( '' != $ult_ft_settings['fancypre_trans'] ) { $fancy_trans = 'text-transform: ' . $ult_ft_settings['fancypre_trans'] . ';'; } if ( '' != $ult_ft_settings['fancytext_trans'] ) { $fancyt_trans = 'text-transform: ' . $ult_ft_settings['fancytext_trans'] . ';'; } $ultimate_js = get_option( 'ultimate_js' ); $output = '<' . $ult_ft_settings['fancytext_tag'] . ' id="' . esc_attr( $fancy_text_id ) . '" ' . $data_list . ' class="uvc-type-wrap ' . esc_attr( $css_design_style ) . ' ' . esc_attr( $is_vc_49_plus ) . ' ult-responsive ' . esc_attr( $ult_ft_settings['ex_class'] ) . ' uvc-wrap-' . esc_attr( $id ) . '" style="' . esc_attr( $string_inline_style ) . '">'; if ( '' != trim( $ult_ft_settings['fancytext_prefix'] ) ) { $output .= '' . esc_html( ltrim( $ult_ft_settings['fancytext_prefix'] ) ) . ''; } if ( 'ticker' == $ult_ft_settings['fancytext_effect'] || 'ticker-down' == $ult_ft_settings['fancytext_effect'] ) { if ( 'enable' != $ultimate_js ) { wp_enqueue_script( 'ultimate-easy-ticker-js' ); } if ( '' != $ult_ft_settings['strings_font_size'] ) { $inherit_font_size = 'ultimate-fancy-text-inherit'; } else { $inherit_font_size = ''; } if ( 'true' != $ult_ft_settings['ticker_hover_pause'] ) { $ult_ft_settings['ticker_hover_pause'] = 0; } else { $ult_ft_settings['ticker_hover_pause'] = 1; } if ( 'ticker-down' == $ult_ft_settings['fancytext_effect'] ) { $direction = 'down'; } else { $direction = 'up'; } $output .= '
      '; foreach ( $lines as $key => $line ) { if ( 0 == $key ) { $style = 'style="opacity:1"'; } else { $style = 'style="opacity:0"'; } $output .= '
    • ' . wp_strip_all_tags( $line ) . '
    • '; } $output .= '
    '; } else { if ( 'enable' != $ultimate_js ) { wp_enqueue_script( 'ultimate-typed-js' ); } if ( 'true' != $ult_ft_settings['typewriter_loop'] ) { $ult_ft_settings['typewriter_loop'] = 'false'; } if ( 'true' != $ult_ft_settings['typewriter_cursor'] ) { $ult_ft_settings['typewriter_cursor'] = 'false'; } $strings = '['; foreach ( $lines as $key => $line ) { $strings .= '"' . __( trim( htmlspecialchars_decode( wp_strip_all_tags( $line ) ) ), 'js_composer' ) . '"';// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText if ( ( $count_lines - 1 ) != $key ) { $strings .= ','; } } $strings .= ']'; $output .= ''; } if ( '' != trim( $ult_ft_settings['fancytext_suffix'] ) ) { $output .= '' . esc_html( rtrim( $ult_ft_settings['fancytext_suffix'] ) ) . ''; } if ( 'ticker' == $ult_ft_settings['fancytext_effect'] || 'ticker-down' == $ult_ft_settings['fancytext_effect'] ) { $output .= ''; } else { $output .= ''; if ( '' != $ult_ft_settings['typewriter_cursor_color'] ) { $output .= ''; } } $output .= ''; return $output; } } // end class. new Ultimate_FancyText(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Fancytext' ) ) { /** * Function that initializes Ultimate Fancy text Module * * @class WPBakeryShortCode_Ultimate_Fancytext */ class WPBakeryShortCode_Ultimate_Fancytext extends WPBakeryShortCode { } } } ultimate_dual_button.php000064400000210675150212230100011476 0ustar00 '', 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_hover_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_border_style' => 'solid', 'icon_color_border' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '0', 'icon_border_spacing' => '30', 'icon_link' => '', 'icon_align' => 'left', 'btn1_background_color' => '#ffffff', 'btn1_bghovercolor' => '#bcbcbc', 'btn1_font_family' => '', 'btn1_heading_style' => '', 'btn1_text_color' => '#333333', 'btn1_text_hovercolor' => '#333333', 'icon_color_hoverbg' => '#ecf0f1', 'icon_color_hoverborder' => '#333333', 'btn1_padding' => '', /*--------btn2-----------*/ 'button2_text' => '', 'btn_icon_type' => 'selector', 'btn_icon' => '', 'btn_icon_img' => '', 'btn_img_width' => '48', 'btn_icon_size' => '32', 'btn_icon_color' => '#333333', 'btn_iconhover_color' => '#333333', 'btn_icon_style' => 'none', 'btn_icon_color_bg' => '#ffffff', 'icon_color_bg' => '#ffffff', 'btn_icon_border_style' => '', 'btn_icon_color_border' => '#333333', 'btn_icon_border_size' => '1', 'btn_icon_border_radius' => '1', 'btn_icon_border_spacing' => '30', 'btn_icon_link' => '', 'btn2_icon_align' => 'right', 'btn2_background_color' => '#ffffff', 'btn2_bghovercolor' => '#bcbcbc', 'btn2_font_family' => '', 'btn2_heading_style' => '', 'btn2_text_color' => '#333333', 'btn2_text_hovercolor' => '#333333', 'btn_icon_color_hoverbg' => '#ffffff', 'btn_icon_color_hoverborder' => '#333333', 'btn2_padding' => '', /*--------divider-----------*/ 'divider_style' => 'text', 'divider_text' => 'or', 'divider_text_color' => '#ffffff', 'divider_bg_color' => '#333333', 'divider_icon' => '', 'divider_icon_img' => '', 'divider_border_radius' => '', 'divider_border_size' => '1', 'divider_color_border' => '#e7e7e7', 'divider_border_style' => '', /*--------general-----------*/ 'btn_border_style' => '', 'btn_color_border' => '#333333', 'btn_border_size' => '1', 'btn_border_radius' => '', 'btn_hover_style' => 'Style 1', 'title_font_size' => '15', 'title_line_ht' => '15', 'el_class' => '', 'btn_alignment' => 'center', 'btn_width' => '', 'dual_resp' => 'on', 'css_dualbtn_design' => '', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $extraclass = $ult_db_settings['el_class']; $el_class1 = ''; $css_trans = ''; $button2_bstyle = ''; $button1_bstyle = ''; $btn_color_hoverborder = ''; $iconoutput = ''; $style = ''; $link_sufix = ''; $link_prefix = ''; $target = ''; $href = ''; $icon_align_style = ''; $secicon = ''; $style1 = ''; $dual_design_style_css = ''; $url1 = ''; $target1 = ''; $link_title1 = ''; $rel1 = ''; $url2 = ''; $link_title2 = ''; $rel2 = ''; $target2 = ''; $dual_design_style_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_db_settings['css_dualbtn_design'], ' ' ), 'ult_dualbutton', $atts ); $dual_design_style_css = esc_attr( $dual_design_style_css ); if ( '' !== $ult_db_settings['icon_link'] ) { $href2 = vc_build_link( $ult_db_settings['icon_link'] ); $url1 = ( isset( $href2['url'] ) && '' !== $href2['url'] ) ? $href2['url'] : ''; $target1 = ( isset( $href2['target'] ) && '' !== $href2['target'] ) ? esc_attr( trim( $href2['target'] ) ) : ''; $link_title1 = ( isset( $href2['title'] ) && '' !== $href2['title'] ) ? esc_attr( $href2['title'] ) : ''; $rel1 = ( isset( $href2['rel'] ) && '' !== $href2['rel'] ) ? esc_attr( $href2['rel'] ) : ''; if ( '' == $url1 ) { $url1 = 'javascript:void(0);'; } } else { $url1 = 'javascript:void(0);'; } if ( 'custom' == $ult_db_settings['icon_type'] ) { if ( '' !== $ult_db_settings['icon_img'] ) { $img = apply_filters( 'ult_get_img_single', $ult_db_settings['icon_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_db_settings['icon_img'], 'alt' ); if ( 'none' !== $ult_db_settings['icon_style'] ) { if ( '' !== $ult_db_settings['icon_color_bg'] ) { $style .= 'background:' . $ult_db_settings['icon_color_bg'] . ';'; } } if ( 'circle' == $ult_db_settings['icon_style'] ) { $ult_db_settings['el_class'] .= ' uavc-circle '; } if ( 'square' == $ult_db_settings['icon_style'] ) { $ult_db_settings['el_class'] .= ' uavc-square '; } if ( 'advanced' == $ult_db_settings['icon_style'] && '' !== $ult_db_settings['icon_border_style'] ) { $style .= 'border-style:' . $ult_db_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $ult_db_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $ult_db_settings['icon_border_size'] . 'px;'; $style .= 'padding:' . $ult_db_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $ult_db_settings['icon_border_radius'] . 'px;'; } if ( ! empty( $img ) ) { $iconoutput .= "\n" . ''; // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found $iconoutput .= "\n\t" . '' . esc_attr( $alt ) . ''; $iconoutput .= "\n" . ''; } if ( ! empty( $img ) ) { $iconoutput = $iconoutput; } else { $iconoutput = ''; } } } else { if ( '' !== $ult_db_settings['icon'] ) { if ( '' !== $ult_db_settings['icon_color'] ) { $style .= 'color:' . $ult_db_settings['icon_color'] . ';'; } if ( 'none' !== $ult_db_settings['icon_style'] ) { if ( '' !== $ult_db_settings['icon_color_bg'] ) { $style .= 'background:' . $ult_db_settings['icon_color_bg'] . ';'; } } if ( 'advanced' == $ult_db_settings['icon_style'] ) { $style .= 'border-style:' . $ult_db_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $ult_db_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $ult_db_settings['icon_border_size'] . 'px;'; $style .= 'width:' . $ult_db_settings['icon_border_spacing'] . 'px;'; $style .= 'height:' . $ult_db_settings['icon_border_spacing'] . 'px;'; $style .= 'line-height:' . $ult_db_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $ult_db_settings['icon_border_radius'] . 'px;'; } if ( '' !== $ult_db_settings['icon_size'] ) { $style .= 'font-size:' . $ult_db_settings['icon_size'] . 'px;'; } if ( 'left' !== $ult_db_settings['icon_align'] ) { $style .= 'display:inline-block;'; } if ( '' !== $ult_db_settings['icon'] ) { $iconoutput .= "\n" . ''; $iconoutput .= "\n\t" . ''; $iconoutput .= "\n" . ''; } if ( '' !== $ult_db_settings['icon'] && 'none' !== $ult_db_settings['icon'] ) { $iconoutput = $iconoutput; } else { $iconoutput = ''; } } } $style2 = ''; $href1 = ''; $target2 = ''; $img2 = ''; $alt1 = ''; $iconoutput2 = ''; $url2 = ''; /*---- for icon 2--------------*/ if ( '' !== $ult_db_settings['btn_icon_link'] ) { $href1 = vc_build_link( $ult_db_settings['btn_icon_link'] ); $url2 = ( isset( $href1['url'] ) && '' !== $href1['url'] ) ? $href1['url'] : ''; $target2 = ( isset( $href1['target'] ) && '' !== $href1['target'] ) ? esc_attr( trim( $href1['target'] ) ) : ''; $link_title2 = ( isset( $href1['title'] ) && '' !== $href1['title'] ) ? esc_attr( $href1['title'] ) : ''; $rel2 = ( isset( $href1['rel'] ) && '' !== $href1['rel'] ) ? esc_attr( $href1['rel'] ) : ''; if ( '' == $url2 ) { $url2 = 'javascript:void(0);'; } } else { $url2 = 'javascript:void(0);'; } if ( 'custom' == $ult_db_settings['btn_icon_type'] ) { $img2 = apply_filters( 'ult_get_img_single', $ult_db_settings['btn_icon_img'], 'url' ); $alt2 = apply_filters( 'ult_get_img_single', $ult_db_settings['btn_icon_img'], 'alt' ); if ( 'none' !== $ult_db_settings['btn_icon_style'] ) { if ( '' !== $ult_db_settings['btn_icon_color_bg'] ) { $style2 .= 'background:' . $ult_db_settings['btn_icon_color_bg'] . ';'; } } if ( 'square' == $ult_db_settings['btn_icon_style'] ) { $el_class1 .= ' uavc-square '; } if ( 'circle' == $ult_db_settings['btn_icon_style'] ) { $el_class1 .= ' uavc-circle '; } if ( 'advanced' == $ult_db_settings['btn_icon_style'] && '' !== $ult_db_settings['btn_icon_border_style'] ) { $style2 .= 'border-style:' . $ult_db_settings['btn_icon_border_style'] . ';'; $style2 .= 'border-color:' . $ult_db_settings['btn_icon_color_border'] . ';'; $style2 .= 'border-width:' . $ult_db_settings['btn_icon_border_size'] . 'px;'; $style2 .= 'padding:' . $ult_db_settings['btn_icon_border_spacing'] . 'px;'; $style2 .= 'border-radius:' . $ult_db_settings['btn_icon_border_radius'] . 'px;'; } if ( ! empty( $img2 ) ) { $iconoutput2 .= "\n" . ''; $iconoutput2 .= "\n\t" . '' . esc_attr( $alt2 ) . ''; $iconoutput2 .= "\n" . ''; } if ( ! empty( $img2 ) ) { $iconoutput2 = $iconoutput2; } else { $iconoutput2 = ''; } } else { if ( '' !== $ult_db_settings['btn_icon_color'] ) { $style2 .= 'color:' . $ult_db_settings['btn_icon_color'] . ';'; } if ( 'none' !== $ult_db_settings['btn_icon_style'] ) { if ( '' !== $ult_db_settings['btn_icon_color_bg'] ) { $style2 .= 'background:' . $ult_db_settings['btn_icon_color_bg'] . ';'; } } if ( 'advanced' == $ult_db_settings['btn_icon_style'] ) { $style2 .= 'border-style:' . $ult_db_settings['btn_icon_border_style'] . ';'; $style2 .= 'border-color:' . $ult_db_settings['btn_icon_color_border'] . ';'; $style2 .= 'border-width:' . $ult_db_settings['btn_icon_border_size'] . 'px;'; $style2 .= 'width:' . $ult_db_settings['btn_icon_border_spacing'] . 'px;'; $style2 .= 'height:' . $ult_db_settings['btn_icon_border_spacing'] . 'px;'; $style2 .= 'line-height:' . $ult_db_settings['btn_icon_border_spacing'] . 'px;'; $style2 .= 'border-radius:' . $ult_db_settings['btn_icon_border_radius'] . 'px;'; } if ( '' !== $ult_db_settings['btn_icon_size'] ) { $style2 .= 'font-size:' . $ult_db_settings['btn_icon_size'] . 'px;'; } if ( 'left' !== $ult_db_settings['btn2_icon_align'] ) { $style2 .= 'display:inline-block;'; } if ( '' !== $ult_db_settings['btn_icon'] ) { $iconoutput2 .= "\n" . ''; $iconoutput2 .= "\n\t" . ''; $iconoutput2 .= "\n" . ''; } if ( '' !== $ult_db_settings['btn_icon'] && 'none' !== $ult_db_settings['btn_icon'] ) { $iconoutput2 = $iconoutput2; } else { $iconoutput2 = ''; } } $hstyle = ''; $hoverstyle = ''; $ult_db_settings['btn_hover_style']; if ( 'Style 1' == $ult_db_settings['btn_hover_style'] ) { $hoverstyle = 'ult-dual-btn'; } if ( '' == $ult_db_settings['btn_hover_style'] ) { $hoverstyle = 'ult-dual-btn'; } if ( 'Style 2' == $ult_db_settings['btn_hover_style'] ) { $hoverstyle = 'ult-dual-btn3'; } if ( 'Style 3' == $ult_db_settings['btn_hover_style'] ) { $hoverstyle = 'ult-dual-btn4'; } /*--------css for title1------------*/ $ult_db_settings['btn1_padding']; $dual_btn_id = 'dualbtn-' . wp_rand( 1000, 9999 ); $title1_style = ''; if ( function_exists( 'get_ultimate_font_family' ) ) { $mhfont_family = get_ultimate_font_family( $ult_db_settings['btn1_font_family'] ); if ( '' !== $mhfont_family ) { $title1_style .= 'font-family:' . $mhfont_family . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { $title1_style .= get_ultimate_font_style( $ult_db_settings['btn1_heading_style'] ); } if ( is_numeric( $ult_db_settings['title_font_size'] ) ) { $ult_db_settings['title_font_size'] = 'desktop:' . $ult_db_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_db_settings['title_line_ht'] ) ) { $ult_db_settings['title_line_ht'] = 'desktop:' . $ult_db_settings['title_line_ht'] . 'px;'; } $title1_style .= 'color:' . $ult_db_settings['btn1_text_color'] . ';';// color. $dualbtn_args = array( 'target' => '#' . $dual_btn_id . ' .ult-dual-button-title', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_db_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_db_settings['title_line_ht'], ), ); $data_list1 = get_ultimate_vc_responsive_media_css( $dualbtn_args ); /*--------css for title2------------*/ $title2_style = ''; if ( function_exists( 'get_ultimate_font_family' ) ) { $mhfont_family1 = get_ultimate_font_family( $ult_db_settings['btn2_font_family'] ); if ( '' !== $mhfont_family1 ) { $title2_style .= 'font-family:' . $mhfont_family1 . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { $title2_style .= get_ultimate_font_style( $ult_db_settings['btn2_heading_style'] ); } $title2_style .= 'color:' . $ult_db_settings['btn2_text_color'] . ';';// color. /*--------css for button1------------*/ $btncolor_style = ''; $btncolor_style .= 'background-color:' . $ult_db_settings['btn1_background_color'] . ' !important;'; /*--------css for button2------------*/ $btncolor1_style = ''; $btncolor1_style .= 'background-color:' . $ult_db_settings['btn2_background_color'] . ' !important;'; /*--------css for button------------*/ $btnmain_style = ''; $btnmain_style .= 'border-color:' . $ult_db_settings['btn_color_border'] . ';'; $btnmain_style .= 'border-style:' . $ult_db_settings['btn_border_style'] . ';'; if ( '' != $ult_db_settings['btn_border_style'] ) { $btnmain_style .= 'border-width:' . $ult_db_settings['btn_border_size'] . 'px;'; } else { $btnmain_style .= 'border-width:0px;'; } $btnmain_style .= 'border-radius:' . $ult_db_settings['btn_border_radius'] . 'px;'; if ( '' != $ult_db_settings['btn_width'] ) { $btnmain_style .= 'width:' . $ult_db_settings['btn_width'] . 'px;'; } /*--------for divider------------*/ $text_style = ''; $text_style .= 'line-height: 1.8em;'; $text_style .= 'color:' . $ult_db_settings['divider_text_color'] . ';'; $text_style .= 'background-color:' . $ult_db_settings['divider_bg_color'] . ';'; if ( '' == $ult_db_settings['divider_border_style'] ) { $text_style .= 'border-width:0px;'; } else { $text_style .= 'border-color:' . $ult_db_settings['divider_color_border'] . ';'; $text_style .= 'border-width:' . $ult_db_settings['divider_border_size'] . 'px;'; $text_style .= 'border-style:' . $ult_db_settings['divider_border_style'] . ';'; $text_style .= 'border-radius:' . $ult_db_settings['divider_border_radius'] . 'px;'; } if ( 'text' == $ult_db_settings['divider_style'] ) { $text = $ult_db_settings['divider_text']; } elseif ( 'icon' == $ult_db_settings['divider_style'] ) { $text = ''; } elseif ( 'image' == $ult_db_settings['divider_style'] ) { $text_style = ''; $text_style .= 'width: 25px; height: 25px; border-radius: 50%; background-color:' . $ult_db_settings['divider_bg_color'] . ';'; $img3 = apply_filters( 'ult_get_img_single', $ult_db_settings['divider_icon_img'], 'url' ); $alt3 = apply_filters( 'ult_get_img_single', $ult_db_settings['divider_icon_img'], 'alt' ); $text = '' . esc_attr( $alt3 ) . ''; } /*--- generate random no------------*/ $ult_db_settings['dual_resp']; $resp_data = 'data-response="' . esc_attr( $ult_db_settings['dual_resp'] ) . '"'; $id = ''; $id = 'ult_btn_' . wp_rand(); /*----------for btn1 hover------------*/ $btn_hover = ''; $btn_hover .= 'data-bgcolor="' . esc_attr( $ult_db_settings['btn1_background_color'] ) . '" '; $btn_hover .= 'data-bghovercolor="' . esc_attr( $ult_db_settings['btn1_bghovercolor'] ) . '" '; $btn_hover .= 'data-icon_color="' . esc_attr( $ult_db_settings['icon_color'] ) . '" '; $btn_hover .= 'data-icon_hover_color="' . esc_attr( $ult_db_settings['icon_hover_color'] ) . '" '; $btn_hover .= 'data-textcolor="' . esc_attr( $ult_db_settings['btn1_text_color'] ) . '" '; $btn_hover .= 'data-texthovercolor="' . esc_attr( $ult_db_settings['btn1_text_hovercolor'] ) . '" '; if ( 'none' == $ult_db_settings['icon_style'] ) { $btn_hover .= 'data-iconbgcolor="transperent" '; $btn_hover .= 'data-iconbghovercolor="transperent" '; $btn_hover .= 'data-iconborder="transperent" '; $btn_hover .= 'data-iconhoverborder="transperent" '; } else { $btn_hover .= 'data-iconbgcolor="' . esc_attr( $ult_db_settings['icon_color_bg'] ) . '" '; $btn_hover .= 'data-iconbghovercolor="' . esc_attr( $ult_db_settings['icon_color_hoverbg'] ) . '" '; $btn_hover .= 'data-iconborder="' . esc_attr( $ult_db_settings['icon_color_border'] ) . '" '; $btn_hover .= 'data-iconhoverborder="' . esc_attr( $ult_db_settings['icon_color_hoverborder'] ) . '" '; } /*----------for btn2 hover------------*/ $btn2_hover = ''; $btn2_hover .= 'data-bgcolor="' . esc_attr( $ult_db_settings['btn2_background_color'] ) . '" '; $btn2_hover .= 'data-bghovercolor="' . esc_attr( $ult_db_settings['btn2_bghovercolor'] ) . '" '; $btn2_hover .= 'data-icon_color="' . esc_attr( $ult_db_settings['btn_icon_color'] ) . '" '; $btn2_hover .= 'data-icon_hover_color="' . esc_attr( $ult_db_settings['btn_iconhover_color'] ) . '" '; $btn2_hover .= 'data-textcolor="' . esc_attr( $ult_db_settings['btn2_text_color'] ) . '" '; $btn2_hover .= 'data-texthovercolor="' . esc_attr( $ult_db_settings['btn2_text_hovercolor'] ) . '" '; if ( 'none' == $ult_db_settings['btn_icon_style'] ) { $btn2_hover .= 'data-iconbgcolor="transperent" '; $btn2_hover .= 'data-iconbghovercolor="transperent" '; $btn2_hover .= 'data-iconborder="transperent" '; $btn2_hover .= 'data-iconhoverborder="transperent" '; } else { $btn2_hover .= 'data-iconbgcolor="' . esc_attr( $ult_db_settings['btn_icon_color_bg'] ) . '" '; $btn2_hover .= 'data-iconbghovercolor="' . esc_attr( $ult_db_settings['btn_icon_color_hoverbg'] ) . '" '; $btn2_hover .= 'data-iconborder="' . esc_attr( $ult_db_settings['btn_icon_color_border'] ) . '" '; $btn2_hover .= 'data-iconhoverborder="' . esc_attr( $ult_db_settings['btn_icon_color_hoverborder'] ) . '" '; } /*--- main button border-----*/ $mainbtn = ''; if ( '' == $ult_db_settings['btn_hover_style'] ) { $mainbtn .= 'data-bcolor="' . esc_attr( $ult_db_settings['btn_color_border'] ) . '"'; $mainbtn .= 'data-bhcolor="' . esc_attr( $ult_db_settings['btn_color_border'] ) . '"'; } else { $mainbtn .= 'data-bcolor="' . esc_attr( $ult_db_settings['btn_color_border'] ) . '"'; $mainbtn .= 'data-bhcolor="' . esc_attr( $btn_color_hoverborder ) . '"'; } $ult_db_settings['icon_align']; /*---- for icon line-height----*/ $size = ''; $icon1_lineht = ''; $icon2_lineht = ''; $iconht1 = ''; $iconht = ''; $icon2_lineht2 = ''; $iconht2 = ''; $icon1_lineht2 = ''; $icnsize = ''; $icnsize1 = ''; $icnsize2 = ''; $emptyicon = ''; $emptyicon1 = ''; if ( '' == $iconoutput ) { $emptyicon = 'padding-left:0px;'; $ult_db_settings['icon_align'] = 'left'; } if ( '' == $iconoutput2 ) { $emptyicon1 = 'padding-left:0px;'; $ult_db_settings['btn2_icon_align'] = 'right'; } $subop = ''; $subop .= '
    '; $is_no_icon_first = ( trim( $iconoutput ) === '' ) ? 'ult-dual-btn-no-icon' : ''; if ( 'right' == $ult_db_settings['icon_align'] ) { $subop .= ' ' . esc_html( $ult_db_settings['button1_text'] ) . ' ' . $iconoutput . ' '; } else { $subop .= ' ' . $iconoutput . ' ' . esc_html( $ult_db_settings['button1_text'] ) . ' '; } $subop .= ' ' . $text . '
    '; $is_no_icon = ( trim( $iconoutput2 ) === '' ) ? 'ult-dual-btn-no-icon' : ''; if ( 'right' == $ult_db_settings['btn2_icon_align'] ) { $subop .= ' ' . esc_html( $ult_db_settings['button2_text'] ) . ' ' . $iconoutput2 . ' '; } else { $subop .= ' ' . $iconoutput2 . ' ' . esc_html( $ult_db_settings['button2_text'] ) . ' '; } $subop .= '
    '; $is_preset = false; // Retrieve preset Code. if ( isset( $_GET['preset'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $subop .= '
    ';
    				$subop .= $text;
    				$subop .= '
    '; // remove backslash once copied. } return $subop; } /** * Function to intialize the button module * * @since ---- * @access public */ public function ultimate_dual_button() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Dual Button' ), 'base' => 'ult_dualbutton', 'icon' => 'uvc_dual_button', 'class' => 'uvc_dual_button', 'category' => __( 'Ultimate VC Addons', 'ultimate_vc' ), 'description' => __( 'Add a dual button and give some custom style.', 'ultimate_vc' ), 'params' => array( // Play with icon selector. /*-----------general------------*/ array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Style', 'ultimate_vc' ), 'param_name' => 'btn_hover_style', 'value' => array( 'Style 1' => 'Style 1', 'Style 2' => 'Style 2', 'None' => ' ', ), 'description' => __( 'Select the Hover style for Button.', 'ultimate_vc' ), ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Text Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Text Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'btn_border_radius', 'min' => 1, 'max' => 50, 'suffix' => 'px', 'edit_field_class' => 'vc_column vc_col-sm-4', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'btn_border_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for Button.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'btn_color_border', 'value' => '', 'description' => __( 'Select border color for button.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'edit_field_class' => 'vc_column vc_col-sm-6', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'btn_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'edit_field_class' => 'vc_column vc_col-sm-6', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Button Width', 'ultimate_vc' ), 'param_name' => 'btn_width', 'min' => 1, 'max' => 50, 'suffix' => 'px', 'edit_field_class' => 'vc_column vc_col-sm-6', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Alignment', 'ultimate_vc' ), 'param_name' => 'btn_alignment', 'value' => array( 'center' => '', 'left' => 'left', 'right' => 'right', ), 'edit_field_class' => 'vc_column vc_col-sm-6', ), array( 'type' => 'ult_switch', 'class' => '', 'param_name' => 'dual_resp', 'value' => 'on', 'default_set' => true, 'options' => array( 'on' => array( 'label' => __( 'Enable Responsive Mode?', 'ultimate_vc' ), 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'description' => __( 'Enable Responsive Mod or not', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( ' Button Text', 'ultimate_vc' ), 'param_name' => 'button1_text', 'value' => '', 'admin_label' => true, 'description' => __( 'Enter your text here.', 'ultimate_vc' ), 'group' => 'Button1', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'icon_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'btn1_background_color', 'value' => '', 'description' => __( 'Select Background Color for Button.', 'ultimate_vc' ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Hover Color', 'ultimate_vc' ), 'param_name' => 'btn1_bghovercolor', 'value' => '', 'description' => __( 'Select background hover color for Button.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_hover_style', 'value' => array( 'Style 1', 'Style 2', 'Style 3' ), ), 'group' => 'Button1', ), array( 'type' => 'ult_param_heading', 'param_name' => 'btn1_icon_setting', 'text' => __( 'Icon/Image ', 'ultimate_vc' ), 'value' => '', 'class' => '', 'group' => __( 'Button1', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( 'Font Icon Manager' => 'selector', 'Custom Image Icon' => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), 'group' => 'Button1', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button1', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Button1', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => '', 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => 'Button1', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => '', 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Icon Color!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Hover Color', 'ultimate_vc' ), 'param_name' => 'icon_hover_color', 'value' => '', 'description' => __( 'Icon hover color !', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button1', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( 'Simple' => 'none', 'Circle Background' => 'circle', 'Square Background' => 'square', 'Design your own' => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Background Color ', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Background Hover Color ', 'ultimate_vc' ), 'param_name' => 'icon_color_hoverbg', 'value' => '', 'description' => __( 'Select background hover color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Button1', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( 'Solid' => 'solid', 'None' => '', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Button1', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Border Hover Color', 'ultimate_vc' ), 'param_name' => 'icon_color_hoverborder', 'value' => '', 'description' => __( 'Select border hover color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Button1', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon or Image Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Button1', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon or Image Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => '', 'min' => 1, 'max' => 100, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Button1', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => '', 'min' => 2, 'max' => 100, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => 'Button1', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'icon_align', 'value' => array( 'Left' => '', 'Right' => 'right', ), 'group' => 'Button1', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( ' Button Text', 'ultimate_vc' ), 'param_name' => 'button2_text', 'value' => '', 'admin_label' => true, 'description' => __( 'Enter your Button2 text here.', 'ultimate_vc' ), 'group' => 'Button2', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'ultimate_vc' ), 'param_name' => 'btn_icon_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'btn2_background_color', 'value' => '', 'description' => __( 'Select Background Color for Button.', 'ultimate_vc' ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Hover Color', 'ultimate_vc' ), 'param_name' => 'btn2_bghovercolor', 'value' => '', 'description' => __( 'Select background hover color for Button.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_hover_style', 'value' => array( 'Style 1', 'Style 2', 'Style 3' ), ), 'group' => 'Button2', ), array( 'type' => 'ult_param_heading', 'param_name' => 'btn1_icon_setting', 'text' => __( 'Icon/Image ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Button2', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'btn_icon_type', 'value' => array( 'Font Icon Manager' => 'selector', 'Custom Image Icon' => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), 'group' => 'Button2', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'btn_icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button2', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'btn_icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'custom' ), ), 'group' => 'Button2', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'btn_img_width', 'value' => '', 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'custom' ), ), 'group' => 'Button2', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'btn_icon_size', 'value' => '', 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'btn_icon_color', 'value' => '', 'description' => __( 'Icon Color!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Hover Color', 'ultimate_vc' ), 'param_name' => 'btn_iconhover_color', 'value' => '', 'description' => __( 'Icon hover color!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_type', 'value' => array( 'selector' ), ), 'group' => 'Button2', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Style', 'ultimate_vc' ), 'param_name' => 'btn_icon_style', 'value' => array( 'Simple' => 'none', 'Circle Background' => 'circle', 'Square Background' => 'square', 'Design your own' => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Background Color', 'ultimate_vc' ), 'param_name' => 'btn_icon_color_bg', 'value' => '', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Background hover Color', 'ultimate_vc' ), 'param_name' => 'btn_icon_color_hoverbg', 'value' => '', 'description' => __( 'Select background hover color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => 'Button2', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Border Style', 'ultimate_vc' ), 'param_name' => 'btn_icon_border_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for Button.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_style', 'value' => array( 'advanced' ), ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Border Color', 'ultimate_vc' ), 'param_name' => 'btn_icon_color_border', 'value' => '', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_border_style', 'not_empty' => true, ), 'group' => 'Button2', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon or Image Border Hover Color', 'ultimate_vc' ), 'param_name' => 'btn_icon_color_hoverborder', 'value' => '', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_border_style', 'not_empty' => true, ), 'group' => 'Button2', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon or Image Border Width', 'ultimate_vc' ), 'param_name' => 'btn_icon_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_border_style', 'not_empty' => true, ), 'group' => 'Button2', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon or Image Border Radius', 'ultimate_vc' ), 'param_name' => 'btn_icon_border_radius', 'value' => '', 'min' => 1, 'max' => 100, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_border_style', 'not_empty' => true, ), 'group' => 'Button2', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon or Image Background Size', 'ultimate_vc' ), 'param_name' => 'btn_icon_border_spacing', 'value' => '', 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_icon_border_style', 'not_empty' => true, ), 'group' => 'Button2', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'btn2_icon_align', 'value' => array( 'Right' => '', 'Left' => 'left', ), 'group' => 'Button2', ), /*--------divider---------------*/ array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Divider options', 'ultimate_vc' ), 'param_name' => 'divider_style', 'value' => array( 'Text' => 'text', 'Icon' => 'icon', 'Image' => 'image', ), 'group' => 'Divider', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( ' Text', 'ultimate_vc' ), 'param_name' => 'divider_text', 'value' => '', 'description' => __( 'Enter your Divider text here.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_style', 'value' => array( 'text' ), ), 'group' => 'Divider', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text/Icon Color', 'ultimate_vc' ), 'param_name' => 'divider_text_color', 'value' => '', 'description' => __( 'Select color for divider text/icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_style', 'value' => array( 'text', 'icon' ), ), 'group' => 'Divider', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'divider_bg_color', 'value' => '', 'description' => __( 'Select border color for Icon/Text/Image.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_style', 'not_empty' => true, ), 'group' => 'Divider', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'divider_icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'divider_style', 'value' => array( 'icon' ), ), 'group' => 'Divider', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'divider_icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_style', 'value' => array( 'image' ), ), 'group' => 'Divider', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Border Style', 'ultimate_vc' ), 'param_name' => 'divider_border_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for Button.', 'ultimate_vc' ), 'group' => 'Divider', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'divider_color_border', 'value' => '', 'description' => __( 'Select border color for divider.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_border_style', 'not_empty' => true, ), 'group' => 'Divider', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'divider_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'divider_border_style', 'not_empty' => true, ), 'group' => 'Divider', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'divider_border_radius', 'min' => 1, 'max' => 50, 'suffix' => 'px', 'dependency' => array( 'element' => 'divider_border_style', 'not_empty' => true, ), 'group' => 'Divider', ), /*--- typgraphy--*/ array( 'type' => 'ult_param_heading', 'param_name' => 'bt1typo-setting', 'text' => __( 'Button 1 ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Typography', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Title Font Family', 'ultimate_vc' ), 'param_name' => 'btn1_font_family', 'description' => __( 'Select the font of your choice. ', 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'btn1_heading_style', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'btn1_text_color', 'value' => '', 'description' => __( 'Select text color for icon.', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Hover Color', 'ultimate_vc' ), 'param_name' => 'btn1_text_hovercolor', 'value' => '', 'description' => __( 'Select text hover color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_hover_style', 'value' => array( 'Style 1', 'Style 2', 'Style 3' ), ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'btn2_bg_setting', 'text' => __( 'Button 2 ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Typography', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Title Font Family', 'ultimate_vc' ), 'param_name' => 'btn2_font_family', 'description' => __( 'Select the font of your choice. ', 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'btn2_heading_style', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'btn2_text_color', 'value' => '', 'description' => __( 'Select text color for icon.', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Hover Color', 'ultimate_vc' ), 'param_name' => 'btn2_text_hovercolor', 'value' => '', 'description' => __( 'Select text hover color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_hover_style', 'value' => array( 'Style 1', 'Style 2', 'Style 3' ), ), 'group' => 'Typography', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_dualbtn_design', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } } } if ( class_exists( 'AIO_Dual_Button' ) ) { $AIO_Dual_Button = new AIO_Dual_Button(); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Dualbutton' ) ) { /** * Function that initializes Ultimate Dual Button Module * * @class WPBakeryShortCode_ult_dualbutton */ class WPBakeryShortCode_Ult_Dualbutton extends WPBakeryShortCode { } } ultimate_google_maps.php000064400000065351150212230100011451 0ustar00 $map_key, ); $api = esc_url( add_query_arg( $arr_params, $api ) ); } wp_register_script( 'googleapis', $api, null, null, false ); // PHPCS:ignore:WordPress.WP.EnqueuedResourceParameters.MissingVersion } /** * Function that initializes settings of Ultimate Google Maps Module. * * @method google_maps_init */ public function google_maps_init() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Google Map', 'ultimate_vc' ), 'base' => 'ultimate_google_map', 'class' => 'vc_google_map', 'controls' => 'full', 'show_settings_on_create' => true, 'icon' => 'vc_google_map', 'description' => __( 'Display Google Maps to indicate your location.', 'ultimate_vc' ), 'category' => 'Ultimate VC Addons', 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Width (in %)', 'ultimate_vc' ), 'param_name' => 'width', 'admin_label' => true, 'value' => '100%', 'group' => 'General Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Height (in px)', 'ultimate_vc' ), 'param_name' => 'height', 'admin_label' => true, 'value' => '300px', 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Map type', 'ultimate_vc' ), 'param_name' => 'map_type', 'admin_label' => true, 'value' => array( __( 'Roadmap', 'ultimate_vc' ) => 'ROADMAP', __( 'Satellite', 'ultimate_vc' ) => 'SATELLITE', __( 'Hybrid', 'ultimate_vc' ) => 'HYBRID', __( 'Terrain', 'ultimate_vc' ) => 'TERRAIN', ), 'group' => 'General Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Latitude', 'ultimate_vc' ), 'param_name' => 'lat', 'admin_label' => true, 'value' => '18.591212', 'description' => '' . __( 'Here is a tool', 'ultimate_vc' ) . ' ' . __( 'where you can find Latitude & Longitude of your location', 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Longitude', 'ultimate_vc' ), 'param_name' => 'lng', 'admin_label' => true, 'value' => '73.741261', 'description' => '' . __( 'Here is a tool', 'ultimate_vc' ) . ' ' . __( 'where you can find Latitude & Longitude of your location', 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'heading' => __( 'Map Zoom', 'ultimate_vc' ), 'param_name' => 'zoom', 'value' => array( __( '18 - Default', 'ultimate_vc' ) => 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, ), 'group' => 'General Settings', ), array( 'type' => 'checkbox', 'heading' => '', 'param_name' => 'scrollwheel', 'value' => array( __( 'Disable map zoom on mouse wheel scroll', 'ultimate_vc' ) => 'disable', ), 'group' => 'General Settings', ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Info Window Text', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'group' => 'Info Window', 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), array( 'type' => 'ult_switch', 'heading' => __( 'Open on Marker Click', 'ultimate_vc' ), 'param_name' => 'infowindow_open', 'options' => array( 'infowindow_open_value' => array( 'label' => '', 'on' => __( 'Yes', 'ultimate_vc' ), 'off' => __( 'No', 'ultimate_vc' ), ), ), 'value' => 'infowindow_open_value', 'default_set' => true, 'group' => 'Info Window', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Marker/Point icon', 'ultimate_vc' ), 'param_name' => 'marker_icon', 'value' => array( __( 'Use Google Default', 'ultimate_vc' ) => 'default', __( "Use Plugin's Default", 'ultimate_vc' ) => 'default_self', __( 'Upload Custom', 'ultimate_vc' ) => 'custom', ), 'group' => 'Marker', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'admin_label' => true, 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'marker_icon', 'value' => array( 'custom' ), ), 'group' => 'Marker', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Marker Animation', 'ultimate_vc' ), 'param_name' => 'marker_animation', 'value' => array( __( 'Yes', 'ultimate_vc' ) => 'yes', __( 'No', 'ultimate_vc' ) => 'no', ), 'group' => 'Marker', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Street view control', 'ultimate_vc' ), 'param_name' => 'streetviewcontrol', 'value' => array( __( 'Disable', 'ultimate_vc' ) => 'false', __( 'Enable', 'ultimate_vc' ) => 'true', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Map type control', 'ultimate_vc' ), 'param_name' => 'maptypecontrol', 'value' => array( __( 'Disable', 'ultimate_vc' ) => 'false', __( 'Enable', 'ultimate_vc' ) => 'true', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Zoom control', 'ultimate_vc' ), 'param_name' => 'zoomcontrol', 'value' => array( __( 'Disable', 'ultimate_vc' ) => 'false', __( 'Enable', 'ultimate_vc' ) => 'true', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Zoom Control Position', 'ultimate_vc' ), 'param_name' => 'zoomcontrolposition', 'value' => array( __( 'Right Bottom', 'ultimate_vc' ) => 'RIGHT_BOTTOM', __( 'Right Top', 'ultimate_vc' ) => 'RIGHT_TOP', __( 'Right Center', 'ultimate_vc' ) => 'RIGHT_CENTER', __( 'Left Top', 'ultimate_vc' ) => 'LEFT_TOP', __( 'Left Center', 'ultimate_vc' ) => 'LEFT_CENTER', __( 'Left Bottom', 'ultimate_vc' ) => 'LEFT_BOTTOM', ), 'dependency' => array( 'element' => 'zoomcontrol', 'value' => 'true', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Dragging on Mobile', 'ultimate_vc' ), 'param_name' => 'dragging', 'value' => array( __( 'Enable', 'ultimate_vc' ) => 'true', __( 'Disable', 'ultimate_vc' ) => 'false', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Dragging on Desktop', 'ultimate_vc' ), 'param_name' => 'dragging_desktop', 'value' => array( __( 'Enable', 'ultimate_vc' ) => 'true', __( 'Disable', 'ultimate_vc' ) => 'false', ), 'group' => 'Advanced', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Top margin', 'ultimate_vc' ), 'param_name' => 'top_margin', 'value' => array( __( 'Page (small)', 'ultimate_vc' ) => 'page_margin_top', __( 'Section (large)', 'ultimate_vc' ) => 'page_margin_top_section', __( 'None', 'ultimate_vc' ) => 'none', ), 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Map Width Override', 'ultimate_vc' ), 'param_name' => 'map_override', 'value' => array( 'Default Width' => '0', "Apply 1st parent element's width" => '1', "Apply 2nd parent element's width" => '2', "Apply 3rd parent element's width" => '3', "Apply 4th parent element's width" => '4', "Apply 5th parent element's width" => '5', "Apply 6th parent element's width" => '6', "Apply 7th parent element's width" => '7', "Apply 8th parent element's width" => '8', "Apply 9th parent element's width" => '9', 'Full Width ' => 'full', 'Maximum Full Width' => 'ex-full', ), 'description' => __( "By default, the map will be given to the WPBakery Page Builder row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output..", 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'textarea_raw_html', 'class' => '', 'heading' => __( 'Google Styled Map JSON', 'ultimate_vc' ), 'param_name' => 'map_style', 'value' => '', 'description' => "" . __( 'Click here', 'ultimate_vc' ) . ' ' . __( 'to get the style JSON code for styling your map.', 'ultimate_vc' ), 'group' => 'Styling', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), 'group' => 'General Settings', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', 'group' => 'General Settings', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'MapBorder Style', 'ultimate_vc' ), 'param_name' => 'map_border_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => '', 'group' => 'Border', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'map_color_border', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'map_border_style', 'not_empty' => true, ), 'group' => 'Border', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'map_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'map_border_style', 'not_empty' => true, ), 'group' => 'Border', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'map_radius', 'value' => 3, 'min' => 0, 'max' => 500, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'map_border_style', 'not_empty' => true, ), 'group' => 'Border', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Map Margin ', 'param_name' => 'gmap_margin', 'mode' => 'margin', 'unit' => 'px', 'positions' => array( 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Styling', 'ultimate_vc' ), 'description' => __( 'Add spacing from outside to the map.', 'ultimate_vc' ), ), array( 'type' => 'ultimate_spacing', 'heading' => ' Map padding ', 'param_name' => 'gmap_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Styling', 'ultimate_vc' ), 'description' => __( 'Add spacing from outside to the map.', 'ultimate_vc' ), ), ), ) ); } } /** * Render function for Ultimate Google Maps Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function display_ultimate_map( $atts, $content = null ) { $output = ''; $ult_google_settings = shortcode_atts( array( 'width' => '100%', 'height' => '300px', 'map_type' => 'ROADMAP', 'lat' => '18.591212', 'lng' => '73.741261', 'zoom' => '14', 'scrollwheel' => '', 'streetviewcontrol' => 'false', 'maptypecontrol' => 'false', 'pancontrol' => 'false', 'zoomcontrol' => 'false', 'zoomcontrolposition' => 'RIGHT_BOTTOM', 'dragging' => 'true', 'dragging_desktop' => 'true', 'marker_icon' => 'default', 'icon_img' => '', 'top_margin' => 'page_margin_top', 'map_override' => '0', 'map_style' => '', 'el_class' => '', 'infowindow_open' => 'infowindow_open_value', 'map_vc_template' => '', 'map_border_style' => '', 'map_color_border' => '', 'map_border_size' => '', 'map_radius' => '', 'gmap_margin' => '', 'gmap_padding' => '', 'marker_animation' => 'yes', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $border_css = ''; $gmap_design_css = ''; $gmap_design_css = $ult_google_settings['gmap_margin']; $gmap_design_css .= $ult_google_settings['gmap_padding']; $marker_lat = $ult_google_settings['lat']; $marker_lng = $ult_google_settings['lng']; if ( 'default_self' == $ult_google_settings['marker_icon'] ) { $icon_url = UAVC_URL . 'assets/img/icon-marker-pink.png'; } elseif ( 'default' == $ult_google_settings['marker_icon'] ) { $icon_url = ''; } else { $icon_url = apply_filters( 'ult_get_img_single', $ult_google_settings['icon_img'], 'url' ); } $id = 'map_' . uniqid(); $wrap_id = 'wrap_' . $id; $ult_google_settings['map_type'] = strtoupper( $ult_google_settings['map_type'] ); $ult_google_settings['width'] = ( substr( $ult_google_settings['width'], -1 ) != '%' && substr( $ult_google_settings['width'], -2 ) != 'px' ? $ult_google_settings['width'] . 'px' : $ult_google_settings['width'] ); $map_height = ( substr( $ult_google_settings['height'], -1 ) != '%' && substr( $ult_google_settings['height'], -2 ) != 'px' ? $ult_google_settings['height'] . 'px' : $ult_google_settings['height'] ); $margin_css = ''; if ( 'none' != $ult_google_settings['top_margin'] ) { $margin_css = $ult_google_settings['top_margin']; } if ( '' != $ult_google_settings['map_border_style'] ) { $border_css .= 'border-style:' . $ult_google_settings['map_border_style'] . ';'; } if ( '' != $ult_google_settings['map_color_border'] ) { $border_css .= 'border-color:' . $ult_google_settings['map_color_border'] . ';'; } if ( '' != $ult_google_settings['map_border_size'] ) { $border_css .= 'border-width:' . $ult_google_settings['map_border_size'] . 'px;'; } if ( '' != $ult_google_settings['map_radius'] ) { $border_css .= 'border-radius:' . $ult_google_settings['map_radius'] . 'px;'; } if ( 'map_vc_template_value' == $ult_google_settings['map_vc_template'] ) { $ult_google_settings['el_class'] .= 'uvc-boxed-layout'; } $output .= "
    '; if ( 'disable' == $ult_google_settings['scrollwheel'] ) { $ult_google_settings['scrollwheel'] = 'false'; } else { $ult_google_settings['scrollwheel'] = 'true'; } $output .= ""; $is_preset = false; // Retrieve preset Code. if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; // remove backslash once copied. } return $output; } } new Ultimate_Google_Maps(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Google_Map' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Google_Map extends WPBakeryShortCode { } } } ultimate_team.php000064400000176213150212230100010103 0ustar00 '', 'name' => '', 'pos_in_org' => '', 'text_align' => '', 'team_member_name_tag' => '', 'team_member_name_font' => '', 'team_member_name_font_style' => '', 'team_member_name_font_size' => '', 'team_member_name_line_height' => '', 'team_member_position_font' => '', 'team_member_position_font_style' => '', 'team_member_position_font_size' => '', 'team_member_position_line_height' => '', 'team_member_description_font' => '', 'team_member_description_font_style' => '', 'team_member_description_font_size' => '', 'team_member_description_line_height' => '', 'team_member_name_color' => '', 'team_member_org_color' => '', 'team_member_desc_color' => '', 'img_hover_eft' => '', 'img_hover_color' => '', 'img_border_style' => '', 'img_border_width' => '', 'img_border_radius' => '', 'img_border_color' => '', 'staff_link' => '', 'link_switch' => '', // New attributes for style 2. 'team_member_style' => '', 'divider_effect' => '', 'team_member_align_style' => '', 'team_member_divider_color' => '', 'team_member_divider_width' => '', 'team_member_divider_height' => '', 'social_icon_effect' => '', 'social_links' => '', 'social_icon_size' => '', 'social_icon_space' => '', 'title_box_padding' => '', 'custom_team_class' => '', 'team_css' => '', 'team_member_responsive_enable' => '', 'team_responsive_width' => '', 'team_img_opacity' => '', 'team_img_hover_opacity' => '', 'team_img_hover_opacity_style3' => '', 'team_img_bg_color' => '', 'team_img_grayscale' => 'on', ), $atts ); // Grayscale Image. $team_img_grayscale_cls = ( 'off' != $ult_team_settings['team_img_grayscale'] ) ? 'ult-team-grayscale' : ''; // Style-2 Image Opacity. $ult_team_settings['team_img_opacity'] = ( isset( $ult_team_settings['team_img_opacity'] ) && trim( $ult_team_settings['team_img_opacity'] ) !== '' ) ? $ult_team_settings['team_img_opacity'] : '1'; $ult_team_settings['team_img_hover_opacity'] = ( isset( $ult_team_settings['team_img_hover_opacity'] ) && trim( $ult_team_settings['team_img_hover_opacity'] ) !== '' ) ? $ult_team_settings['team_img_hover_opacity'] : '0.65'; $ult_team_settings['team_img_hover_opacity_style3'] = ( isset( $ult_team_settings['team_img_hover_opacity_style3'] ) && trim( $ult_team_settings['team_img_hover_opacity_style3'] ) !== '' ) ? $ult_team_settings['team_img_hover_opacity_style3'] : '0.1'; $ult_team_settings['team_img_bg_color'] = ( isset( $ult_team_settings['team_img_bg_color'] ) && trim( $ult_team_settings['team_img_bg_color'] ) !== '' ) ? $ult_team_settings['team_img_bg_color'] : 'inherit'; $ult_team_settings['team_member_style'] = ( isset( $ult_team_settings['team_member_style'] ) && trim( $ult_team_settings['team_member_style'] ) !== '' ) ? $ult_team_settings['team_member_style'] : 'style-1'; $ult_team_settings['custom_team_class'] = ( isset( $ult_team_settings['custom_team_class'] ) && trim( $ult_team_settings['custom_team_class'] ) !== '' ) ? $ult_team_settings['custom_team_class'] : ''; // Set responsive width. $ult_team_settings['team_responsive_width'] = ( isset( $ult_team_settings['team_responsive_width'] ) && trim( $ult_team_settings['team_responsive_width'] ) !== '' ) ? $ult_team_settings['team_responsive_width'] : ''; $ult_team_settings['team_responsive_width'] = ( isset( $ult_team_settings['team_member_responsive_enable'] ) && trim( $ult_team_settings['team_member_responsive_enable'] ) == 'on' ) ? $ult_team_settings['team_responsive_width'] : ''; // Set typography colors. $ult_team_settings['team_member_name_color'] = ( isset( $ult_team_settings['team_member_name_color'] ) && trim( $ult_team_settings['team_member_name_color'] ) !== '' ) ? $ult_team_settings['team_member_name_color'] : 'inherit'; $ult_team_settings['team_member_org_color'] = ( isset( $ult_team_settings['team_member_org_color'] ) && trim( $ult_team_settings['team_member_org_color'] ) !== '' ) ? $ult_team_settings['team_member_org_color'] : 'inherit'; $ult_team_settings['team_member_desc_color'] = ( isset( $ult_team_settings['team_member_desc_color'] ) && trim( $ult_team_settings['team_member_desc_color'] ) !== '' ) ? $ult_team_settings['team_member_desc_color'] : 'inherit'; // Set team Member name's tag element. $ult_team_settings['team_member_name_tag'] = ( isset( $ult_team_settings['team_member_name_tag'] ) && trim( $ult_team_settings['team_member_name_tag'] ) !== '' ) ? $ult_team_settings['team_member_name_tag'] : 'h2'; $ult_team_settings['team_css'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_team_settings['team_css'], ' ' ), 'ult_team', $atts ); // title box style. $title_box_style = ''; $title_box_style .= trim( $ult_team_settings['title_box_padding'] ) != '' ? $ult_team_settings['title_box_padding'] : ''; $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $font_args = array(); $team_member_name_font_styling = ''; if ( '' == ! $ult_team_settings['team_member_name_font'] ) { $team_member_font_family = function_exists( 'get_ultimate_font_family' ) ? get_ultimate_font_family( $ult_team_settings['team_member_name_font'] ) : ''; $team_member_font_family = ( '' != $team_member_font_family ) ? $team_member_font_family : 'inherit'; $team_member_name_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $ult_team_settings['team_member_name_font'] ); } if ( function_exists( 'get_ultimate_font_style' ) ) { if ( isset( $ult_team_settings['team_member_name_font_style'] ) && trim( $ult_team_settings['team_member_name_font_style'] ) != '' ) { $team_member_name_font_styling .= get_ultimate_font_style( $ult_team_settings['team_member_name_font_style'] ); } } if ( ! ( '' == $ult_team_settings['team_member_name_color'] ) && ! ( 'inherit' == $ult_team_settings['team_member_name_color'] ) ) { $team_member_name_font_styling .= 'color:' . $ult_team_settings['team_member_name_color'] . ';'; } $team_member_position_font_styling = ''; if ( '' == ! $ult_team_settings['team_member_position_font'] ) { $team_member_font_family = function_exists( 'get_ultimate_font_family' ) ? get_ultimate_font_family( $ult_team_settings['team_member_position_font'] ) : ''; $team_member_font_family = ( '' != $team_member_font_family ) ? $team_member_font_family : 'inherit'; $team_member_position_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $ult_team_settings['team_member_position_font'] ); } if ( '' == ! $ult_team_settings['team_member_position_font_style'] ) { $team_member_position_font_styling .= $ult_team_settings['team_member_position_font_style'] . ';'; } if ( ! ( '' == $ult_team_settings['team_member_org_color'] ) && ! ( 'inherit' == $ult_team_settings['team_member_org_color'] ) ) { $team_member_position_font_styling .= 'color:' . $ult_team_settings['team_member_org_color'] . ';'; } $team_member_description_font_styling = ''; if ( '' == ! $ult_team_settings['team_member_description_font'] ) { $team_member_font_family = function_exists( 'get_ultimate_font_family' ) ? get_ultimate_font_family( $ult_team_settings['team_member_description_font'] ) : ''; $team_member_font_family = ( '' != $team_member_font_family ) ? $team_member_font_family : 'inherit'; $team_member_description_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $ult_team_settings['team_member_description_font'] ); } if ( '' == ! $ult_team_settings['team_member_description_font_style'] ) { $team_member_description_font_styling .= $ult_team_settings['team_member_description_font_style'] . ';'; } if ( ! ( '' == $ult_team_settings['team_member_desc_color'] ) && ! ( 'inherit' == $ult_team_settings['team_member_desc_color'] ) ) { $team_member_description_font_styling .= 'color:' . $ult_team_settings['team_member_desc_color'] . ';'; } $img_hver_class = ''; $img_hver_data = ''; if ( 'on' == $ult_team_settings['img_hover_eft'] ) { $img_hver_class = 'ult-team_img_hover'; $ult_team_settings['img_hover_color'] = ( isset( $ult_team_settings['img_hover_color'] ) && trim( $ult_team_settings['img_hover_color'] ) != '' ) ? $ult_team_settings['img_hover_color'] : 'rgba(100,100,100,0.6)'; $img_hver_data = 'data-background_clr = "' . esc_attr( $ult_team_settings['img_hover_color'] ) . '"'; } elseif ( 'off' == $ult_team_settings['img_hover_eft'] ) { $img_hver_class = ''; $img_hver_data = ''; } $team_image_style = ''; if ( '' == ! $ult_team_settings['img_border_style'] ) { $team_image_style .= 'border-style:' . $ult_team_settings['img_border_style'] . ';'; } if ( '' == ! $ult_team_settings['img_border_width'] ) { $team_image_style .= 'border-width:' . $ult_team_settings['img_border_width'] . 'px;'; } if ( '' == ! $ult_team_settings['img_border_radius'] ) { $team_image_style .= 'border-radius:' . $ult_team_settings['img_border_radius'] . 'px;'; } if ( '' == ! $ult_team_settings['img_border_color'] ) { $team_image_style .= 'border-color:' . $ult_team_settings['img_border_color'] . ';'; } $img = apply_filters( 'ult_get_img_single', $ult_team_settings['image'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_team_settings['image'], 'alt' ); // Code for Responsive font-size [Open]. $id = uniqid( 'ultimate-heading' ); // FIX: set old font size before implementing responsive param. if ( is_numeric( $ult_team_settings['team_member_name_font_size'] ) ) { $ult_team_settings['team_member_name_font_size'] = 'desktop:' . $ult_team_settings['team_member_name_font_size'] . 'px;'; } if ( is_numeric( $ult_team_settings['team_member_name_line_height'] ) ) { $ult_team_settings['team_member_name_line_height'] = 'desktop:' . $ult_team_settings['team_member_name_line_height'] . 'px;'; } $team_name_args = array( 'target' => '.ult-team-member-bio-wrap.' . $id . ' .ult-team-member-name', 'media_sizes' => array( 'font-size' => $ult_team_settings['team_member_name_font_size'], 'line-height' => $ult_team_settings['team_member_name_line_height'], ), ); $team_member_name_responsive = get_ultimate_vc_responsive_media_css( $team_name_args ); if ( is_numeric( $ult_team_settings['team_member_position_font_size'] ) ) { $ult_team_settings['team_member_position_font_size'] = 'desktop:' . $ult_team_settings['team_member_position_font_size'] . 'px;'; } if ( is_numeric( $ult_team_settings['team_member_position_line_height'] ) ) { $ult_team_settings['team_member_position_line_height'] = 'desktop:' . $ult_team_settings['team_member_position_line_height'] . 'px;'; } $team_position_args = array( 'target' => '.ult-team-member-bio-wrap.' . $id . ' .ult-team-member-position', 'media_sizes' => array( 'font-size' => $ult_team_settings['team_member_position_font_size'], 'line-height' => $ult_team_settings['team_member_position_line_height'], ), ); $team_member_position_responsive = get_ultimate_vc_responsive_media_css( $team_position_args ); if ( is_numeric( $ult_team_settings['team_member_description_font_size'] ) ) { $ult_team_settings['team_member_description_font_size'] = 'desktop:' . $ult_team_settings['team_member_description_font_size'] . 'px;'; } if ( is_numeric( $ult_team_settings['team_member_description_line_height'] ) ) { $ult_team_settings['team_member_description_line_height'] = 'desktop:' . $ult_team_settings['team_member_description_line_height'] . 'px;'; } $team_desc_args = array( 'target' => '.ult-team-member-bio-wrap.' . $id . ' .ult-team-member-description', 'media_sizes' => array( 'font-size' => $ult_team_settings['team_member_description_font_size'], 'line-height' => $ult_team_settings['team_member_description_line_height'], ), ); $team_member_desc_responsive = get_ultimate_vc_responsive_media_css( $team_desc_args ); $ult_team_settings['team_member_divider_color'] = ( isset( $ult_team_settings['team_member_divider_color'] ) && trim( $ult_team_settings['team_member_divider_color'] ) !== '' ) ? $ult_team_settings['team_member_divider_color'] : ''; $ult_team_settings['team_member_align_style'] = ( isset( $ult_team_settings['team_member_align_style'] ) && trim( $ult_team_settings['team_member_align_style'] ) !== '' ) ? $ult_team_settings['team_member_align_style'] : 'center'; $ult_team_settings['social_icon_size'] = ( isset( $ult_team_settings['social_icon_size'] ) && trim( $ult_team_settings['social_icon_size'] ) !== '' ) ? $ult_team_settings['social_icon_size'] . 'px' : '16px'; $ult_team_settings['social_icon_space'] = ( isset( $ult_team_settings['social_icon_space'] ) && trim( $ult_team_settings['social_icon_space'] ) !== '' ) ? ( $ult_team_settings['social_icon_space'] / 2 ) . 'px' : '5px'; $ult_team_settings['team_member_divider_width'] = ( isset( $ult_team_settings['team_member_divider_width'] ) && trim( $ult_team_settings['team_member_divider_width'] ) !== '' ) ? $ult_team_settings['team_member_divider_width'] : '80'; $ult_team_settings['team_member_divider_width'] = ( $ult_team_settings['team_member_divider_width'] <= 100 ) ? $ult_team_settings['team_member_divider_width'] : '100'; $ult_team_settings['team_member_divider_height'] = ( isset( $ult_team_settings['team_member_divider_height'] ) && trim( $ult_team_settings['team_member_divider_height'] ) !== '' ) ? $ult_team_settings['team_member_divider_height'] : '1'; // Code for Responsive font-size [Closed]. ob_start(); if ( 'style-3' == $ult_team_settings['team_member_style'] ) { $team_desc_args = array( 'target' => '.ult-team-member-image.' . $id . ' .ult-team-member-description', 'media_sizes' => array( 'font-size' => $ult_team_settings['team_member_description_font_size'], 'line-height' => $ult_team_settings['team_member_description_line_height'], ), ); $team_member_desc_responsive = get_ultimate_vc_responsive_media_css( $team_desc_args ); echo '
    '; if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    ' . esc_attr( $alt ) . ''; echo ''; if ( $content ) { echo '

    ' . do_shortcode( $content ) . '

    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    ';// ult-team-member-image. if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { echo '
    '; } echo '
    '; echo '
    '; if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '<' . esc_attr( $ult_team_settings['team_member_name_tag'] ) . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . esc_attr( $team_member_name_font_styling ) . '">' . esc_attr( $ult_team_settings['name'] ) . ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { echo ''; } if ( $ult_team_settings['pos_in_org'] ) { echo '
    ' . esc_attr( $ult_team_settings['pos_in_org'] ) . '
    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    '; if ( 'on' == $ult_team_settings['divider_effect'] ) { $divider_margin = ''; if ( 'center' != $ult_team_settings['team_member_align_style'] ) { $divider_margin = 'margin-' . $ult_team_settings['team_member_align_style'] . ':0px'; } echo '
    '; } echo '
    '; $social_icons = json_decode( urldecode( $ult_team_settings['social_links'] ) ); if ( $social_icons && count( $social_icons ) > 0 && 'on' == $ult_team_settings['social_icon_effect'] ) { $icon_styling = 'font-size:' . esc_attr( $ult_team_settings['social_icon_size'] ) . ' ; margin-left:' . esc_attr( $ult_team_settings['social_icon_space'] ) . ';margin-right:' . esc_attr( $ult_team_settings['social_icon_space'] ) . ';'; echo "
    "; foreach ( $social_icons as $social_link ) { if ( isset( $social_link->selected_team_icon ) && '' !== $social_link->selected_team_icon ) { $social_icon_url = ( isset( $social_link->social_icon_url ) && '' !== $social_link->social_icon_url ) ? $social_link->social_icon_url : '#'; $social_link_title = ( isset( $social_link->social_link_title ) && '' !== $social_link->social_link_title ) ? $social_link->social_link_title : ''; $social_icon_color = ( isset( $social_link->social_icon_color ) && '' !== $social_link->social_icon_color ) ? $social_link->social_icon_color : 'inherit'; $default_icon_color = ( 'inherit' != $social_icon_color ) ? 'color:' . $social_icon_color . ';' : ''; $social_icon_hover_color = ( isset( $social_link->social_icon_hover_color ) && '' !== $social_link->social_icon_hover_color ) ? $social_link->social_icon_hover_color : 'inherit'; echo ""; } } echo '
    '; } echo '
    '; // ult-team-member-name-wrap. echo '
    '; // ult-team-member-bio-wrap. echo '
    '; // ult-team-member-wrap. } elseif ( 'style-2' == $ult_team_settings['team_member_style'] ) { echo '
    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    ' . esc_attr( $alt ) . ''; echo '
    ';// ult-team-member-image. echo '
    '; echo '
    '; echo '<' . esc_attr( $ult_team_settings['team_member_name_tag'] ) . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . esc_attr( $team_member_name_font_styling ) . '">' . esc_attr( $ult_team_settings['name'] ) . ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped if ( $ult_team_settings['pos_in_org'] ) { echo '
    ' . esc_attr( $ult_team_settings['pos_in_org'] ) . '
    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    '; // ult-team-member-name-wrap. echo '
    '; if ( $content ) { echo '

    ' . do_shortcode( $content ) . '

    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    '; if ( 'on' == $ult_team_settings['divider_effect'] ) { $divider_margin = ''; if ( 'center' != $ult_team_settings['team_member_align_style'] ) { $divider_margin = 'margin-' . $ult_team_settings['team_member_align_style'] . ':0px'; } echo '
    '; } echo '
    '; $social_icons = json_decode( urldecode( $ult_team_settings['social_links'] ) ); if ( $social_icons && count( $social_icons ) > 0 && 'on' == $ult_team_settings['social_icon_effect'] ) { $icon_styling = ' font-size:' . $ult_team_settings['social_icon_size'] . ' ; margin-left:' . $ult_team_settings['social_icon_space'] . ';margin-right:' . $ult_team_settings['social_icon_space'] . ';'; echo "
    '; } echo '
    '; // Description Slide. echo '
    '; // ult-team-member-bio-wrap. if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { echo ''; } echo '
    '; // ult-team-member-wrap. } elseif ( 'style-1' == $ult_team_settings['team_member_style'] ) { echo '
    '; if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    ' . esc_attr( $alt ) . ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped echo '
    ';// ult-team-member-image. if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { echo '
    '; } echo '
    '; echo '
    '; if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { $href = vc_build_link( $ult_team_settings['staff_link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; echo ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '<' . esc_attr( $ult_team_settings['team_member_name_tag'] ) . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . esc_attr( $team_member_name_font_styling ) . '">' . esc_attr( $ult_team_settings['name'] ) . ''; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped if ( 'on' == $ult_team_settings['link_switch'] && '' != $ult_team_settings['staff_link'] ) { echo ''; } if ( $ult_team_settings['pos_in_org'] ) { echo '
    ' . esc_attr( $ult_team_settings['pos_in_org'] ) . '
    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } if ( $content ) { echo '

    ' . do_shortcode( $content ) . '

    '; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped } echo '
    '; if ( 'on' == $ult_team_settings['divider_effect'] ) { $divider_margin = ''; if ( 'center' != $ult_team_settings['team_member_align_style'] ) { $divider_margin = 'margin-' . $ult_team_settings['team_member_align_style'] . ':0px'; } echo '
    '; } echo '
    '; $social_icons = json_decode( urldecode( $ult_team_settings['social_links'] ) ); if ( $social_icons && count( $social_icons ) > 0 && 'on' == $ult_team_settings['social_icon_effect'] ) { $icon_styling = 'font-size:' . $ult_team_settings['social_icon_size'] . ' ; margin-left:' . $ult_team_settings['social_icon_space'] . ';margin-right:' . esc_attr( $ult_team_settings['social_icon_space'] ) . ';'; echo "
    "; foreach ( $social_icons as $social_link ) { if ( isset( $social_link->selected_team_icon ) && '' !== $social_link->selected_team_icon ) { $social_icon_url = ( isset( $social_link->social_icon_url ) && '' !== $social_link->social_icon_url ) ? $social_link->social_icon_url : '#'; $social_link_title = ( isset( $social_link->social_link_title ) && '' !== $social_link->social_link_title ) ? $social_link->social_link_title : ''; $social_icon_color = ( isset( $social_link->social_icon_color ) && '' !== $social_link->social_icon_color ) ? $social_link->social_icon_color : 'inherit'; $default_icon_color = ( 'inherit' != $social_icon_color ) ? 'color:' . $social_icon_color . ';' : ''; $social_icon_hover_color = ( isset( $social_link->social_icon_hover_color ) && '' !== $social_link->social_icon_hover_color ) ? $social_link->social_icon_hover_color : 'inherit'; echo ""; } } echo '
    '; } echo '
    '; // ult-team-member-name-wrap. echo '
    '; // ult-team-member-bio-wrap. echo '
    '; // ult-team-member-wrap. } $is_preset = false; // Display settings for Preset. $output = ''; if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output = '
    ';
    				$output .= $text;
    				$output .= '
    '; } echo $output; // PHPCS:ignore:WordPress.Security.EscapeOutput.OutputNotEscaped return ob_get_clean(); } /** * Function that initializes settings of Team Module Module. * * @method init_team */ public function init_team() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Team', 'ultimate_vc' ), 'base' => 'ult_team', 'icon' => 'vc_icon_team', 'class' => '', 'content_element' => true, 'controls' => 'full', 'category' => 'Ultimate VC Addons', 'description' => __( 'Show your awesome team.', 'ultimate_vc' ), 'admin_enqueue_js' => preg_replace( '/\s/', '%20', UAVC_URL . 'admin/js/team-admin.js' ), 'params' => array( // Custom Coding for new team styles. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Team Style', 'ultimate_vc' ), 'param_name' => 'team_member_style', 'value' => array( __( 'Style 1', 'ultimate_vc' ) => 'style-1', __( 'Style 2', 'ultimate_vc' ) => 'style-2', __( 'Style 3', 'ultimate_vc' ) => 'style-3', ), 'description' => '', 'group' => 'Image', ), array( 'type' => 'ult_img_single', 'heading' => __( 'Select Image', 'ultimate_vc' ), 'param_name' => 'image', 'description' => '', 'group' => 'Image', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Grayscale Image', 'ultimate_vc' ), 'param_name' => 'team_img_grayscale', 'value' => 'on', 'options' => array( 'on' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'default_set' => true, 'description' => '', 'dependency' => array( 'element' => 'team_member_style', 'value' => array( 'style-1', 'style-3' ), ), 'group' => 'Image', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Image Border Style', 'ultimate_vc' ), 'param_name' => 'img_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => '', 'group' => 'Image', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Border Width', 'ultimate_vc' ), 'param_name' => 'img_border_width', 'value' => '', 'suffix' => '', 'dependency' => array( 'element' => 'img_border_style', 'not_empty' => true, ), 'description' => '', 'group' => 'Image', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Image Border Color', 'ultimate_vc' ), 'param_name' => 'img_border_color', 'value' => '', 'dependency' => array( 'element' => 'img_border_style', 'not_empty' => true, ), 'description' => '', 'group' => 'Image', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image border radius', 'ultimate_vc' ), 'param_name' => 'img_border_radius', 'value' => '0', 'min' => '0', 'max' => '500', 'step' => '1', 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'img_border_style', 'not_empty' => true, ), 'group' => 'Image', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Image Hover Effect', 'ultimate_vc' ), 'param_name' => 'img_hover_eft', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Hover effect for the team member image', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => '', 'dependency' => array( 'element' => 'team_member_style', 'value' => 'style-1', ), 'group' => 'Image', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Image Hover Color', 'ultimate_vc' ), 'param_name' => 'img_hover_color', 'value' => '', 'description' => '', 'group' => 'Image', 'dependency' => array( 'element' => 'img_hover_eft', 'value' => 'on', ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'team_img_bg_color', 'value' => '', 'description' => '', 'group' => 'Image', 'dependency' => array( 'element' => 'team_member_style', 'value' => array( 'style-2', 'style-3' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Opacity', 'ultimate_vc' ), 'param_name' => 'team_img_opacity', 'value' => 1, 'min' => 0, 'max' => 1, 'description' => __( 'Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)', 'ultimate_vc' ), 'group' => 'Image', 'dependency' => array( 'element' => 'team_member_style', 'value' => array( 'style-2' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Opacity on Hover', 'ultimate_vc' ), 'param_name' => 'team_img_hover_opacity', 'value' => '0.65', 'min' => 0, 'max' => 1, 'description' => __( 'Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)', 'ultimate_vc' ), 'group' => 'Image', 'dependency' => array( 'element' => 'team_member_style', 'value' => array( 'style-2' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Opacity on Hover', 'ultimate_vc' ), 'param_name' => 'team_img_hover_opacity_style3', 'value' => 0.1, 'min' => 0, 'max' => 1, 'description' => __( 'Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)', 'ultimate_vc' ), 'group' => 'Image', 'dependency' => array( 'element' => 'team_member_style', 'value' => array( 'style-3' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Custom Class', 'ultimate_vc' ), 'param_name' => 'custom_team_class', 'description' => '', 'group' => 'Image', ), array( 'type' => 'textfield', 'heading' => __( 'Name', 'ultimate_vc' ), 'param_name' => 'name', 'admin_label' => true, 'description' => '', 'group' => 'Text', 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Tag', 'ultimate_vc' ), 'param_name' => 'team_member_name_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h2', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H2', 'ultimate_vc' ), 'group' => 'Text', 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'textfield', 'heading' => __( 'Designation', 'ultimate_vc' ), 'param_name' => 'pos_in_org', 'description' => '', 'group' => 'Text', ), array( 'type' => 'textarea_html', 'heading' => __( 'Description', 'ultimate_vc' ), 'param_name' => 'content', 'description' => '', 'group' => 'Text', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Text Alignment', 'ultimate_vc' ), 'param_name' => 'team_member_align_style', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), 'description' => '', 'group' => 'Text', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Space around text', 'ultimate_vc' ), 'param_name' => 'title_box_padding', 'mode' => 'padding', 'unit' => 'px', 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'group' => __( 'Text', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Enable Social Icons', 'ultimate_vc' ), 'param_name' => 'social_icon_effect', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Add Social Icon links to connect on social network', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => '', 'group' => 'Social Links', ), array( 'type' => 'param_group', 'heading' => __( 'Add Social Links', 'ultimate_vc' ), 'param_name' => 'social_links', 'group' => __( 'Social Links', 'ultimate_vc' ), 'value' => rawurlencode( wp_json_encode( array( array( 'selected_team_icon' => '', 'social_title' => '', 'social_icon_url' => '', 'social_icon_color' => '', 'social_icon_hover_color' => '', ), ) ) ), 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Title', 'my-text-domain' ), 'param_name' => 'social_link_title', 'value' => '', 'description' => '', 'admin_label' => true, ), array( 'type' => 'textfield', 'heading' => __( 'Link', 'ultimate_vc' ), 'param_name' => 'social_icon_url', 'description' => '', 'value' => '#', ), array( 'type' => 'icon_manager', 'heading' => __( 'Select Icon', 'js_composer' ), 'param_name' => 'selected_team_icon', 'value' => '', 'description' => __( 'Select icon from library.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'social_icon_color', 'value' => '', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon hover Color', 'ultimate_vc' ), 'param_name' => 'social_icon_hover_color', 'value' => '', ), ), 'dependency' => array( 'element' => 'social_icon_effect', 'value' => 'on', ), 'callbacks' => array( 'after_add' => 'vcChartParamAfterAddCallback', ), ), array( 'type' => 'number', 'heading' => __( 'Social Icon Size', 'ultimate_vc' ), 'param_name' => 'social_icon_size', 'value' => '16', 'suffix' => 'px', 'dependency' => array( 'element' => 'img_border_style', 'not_empty' => true, ), 'description' => '', 'dependency' => array( 'element' => 'social_icon_effect', 'value' => 'on', ), 'group' => __( 'Social Links', 'ultimate_vc' ), ), array( 'type' => 'number', 'heading' => __( 'Spacing Between Social Icons', 'ultimate_vc' ), 'param_name' => 'social_icon_space', 'value' => '10', 'suffix' => 'px', 'dependency' => array( 'element' => 'img_border_style', 'not_empty' => true, ), 'description' => '', 'dependency' => array( 'element' => 'social_icon_effect', 'value' => 'on', ), 'group' => __( 'Social Links', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Separator', 'ultimate_vc' ), 'param_name' => 'divider_effect', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Separator between description & social icons', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => '', 'group' => 'Social Links', 'dependency' => array( 'element' => 'social_icon_effect', 'value' => 'on', ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Separator Color', 'ultimate_vc' ), 'param_name' => 'team_member_divider_color', 'value' => '', 'description' => '', 'group' => 'Social Links', 'dependency' => array( 'element' => 'divider_effect', 'value' => 'on', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Separator Height', 'ultimate_vc' ), 'param_name' => 'team_member_divider_height', 'value' => 1, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'group' => 'Social Links', 'dependency' => array( 'element' => 'divider_effect', 'value' => 'on', ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Separator Width', 'ultimate_vc' ), 'param_name' => 'team_member_divider_width', 'value' => '80', 'suffix' => '%', 'description' => '', 'group' => 'Social Links', 'dependency' => array( 'element' => 'divider_effect', 'value' => 'on', ), ), array( 'type' => 'text', 'param_name' => 'title_text_typography', 'heading' => __( '

    Name Typography

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'team_member_name_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'team_member_name_font_style', 'value' => '', 'group' => 'Typography', ), // Responsive Param. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'team_member_name_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'team_member_name_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'team_member_name_color', 'value' => '', 'description' => '', 'group' => 'Typography', ), array( 'type' => 'text', 'param_name' => 'title_text_typography', 'heading' => __( '

    Designation Typography

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'team_member_position_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'team_member_position_font_style', 'value' => '', 'group' => 'Typography', ), // Responsive Param. array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'team_member_position_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'team_member_position_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'team_member_org_color', 'value' => '', 'description' => '', 'group' => 'Typography', ), array( 'type' => 'text', 'param_name' => 'title_text_typography', 'heading' => __( '

    Description Typography

    ', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'team_member_description_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'team_member_description_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'team_member_description_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'team_member_description_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Text Color', 'ultimate_vc' ), 'param_name' => 'team_member_desc_color', 'value' => '', 'description' => '', 'group' => 'Typography', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Responsive', 'ultimate_vc' ), 'param_name' => 'team_member_responsive_enable', 'value' => 'off', 'options' => array( 'on' => array( 'label' => __( 'Apply Breakpoint to container?', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => '', 'dependency' => array( 'element' => 'team_member_style', 'value' => 'style-2', ), 'group' => 'Advanced', ), array( 'type' => 'number', 'heading' => __( 'Breakpoint', 'ultimate_vc' ), 'param_name' => 'team_responsive_width', 'suffix' => 'px', 'description' => 'Breakpoint is the point of screen resolution from where you can set your Style-2 into Style-1 to the minimum screen resolution.', 'dependency' => array( 'element' => 'team_member_responsive_enable', 'value' => 'on', ), 'group' => 'Advanced', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Custom link to staff page', 'ultimate_vc' ), 'param_name' => 'link_switch', 'value' => '', 'options' => array( 'on' => array( 'label' => __( 'Add custom link to employee page', 'ultimate_vc' ), 'on' => 'Yes', 'off' => 'No', ), ), 'description' => '', 'dependency' => '', 'group' => 'Advanced', ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Custom Link', 'ultimate_vc' ), 'param_name' => 'staff_link', 'value' => '', 'group' => __( 'Advanced', 'ultimate_vc' ), 'dependency' => array( 'element' => 'link_switch', 'value' => 'on', ), ), array( 'type' => 'css_editor', 'heading' => __( 'CSS box', 'my-text-domain' ), 'param_name' => 'team_css', 'group' => __( 'Design Options', 'my-text-domain' ), ), ), // params array. ) ); } } } new Ultimate_Team(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Team' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Team extends WPBakeryShortCode { } } } ultimate_stats_counter.php000064400000104053150212230100012043 0ustar00 __( 'Counter', 'ultimate_vc' ), 'base' => 'stat_counter', 'class' => 'vc_stats_counter', 'icon' => 'vc_icon_stats', 'category' => 'Ultimate VC Addons', 'description' => __( 'Your milestones, achievements, etc.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use an existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'attach_image', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 0, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Position', 'ultimate_vc' ), 'param_name' => 'icon_position', 'value' => array( __( 'Top', 'ultimate_vc' ) => 'top', __( 'Right', 'ultimate_vc' ) => 'right', __( 'Left', 'ultimate_vc' ) => 'left', ), 'description' => __( 'Enter Position of Icon', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Counter Title ', 'ultimate_vc' ), 'param_name' => 'counter_title', 'admin_label' => true, 'value' => '', 'description' => __( 'Enter title for stats counter block', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Counter Value', 'ultimate_vc' ), 'param_name' => 'counter_value', 'value' => '1250', 'description' => __( 'Enter number for counter without any special character. You may enter a decimal number. Eg 12.76', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Thousands Separator', 'ultimate_vc' ), 'param_name' => 'counter_sep', 'value' => ',', 'description' => __( "Enter character for thousanda separator. e.g. ',' will separate 125000 into 125,000", 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Replace Decimal Point With', 'ultimate_vc' ), 'param_name' => 'counter_decimal', 'value' => '.', 'description' => __( "Did you enter a decimal number (Eg - 12.76) The decimal point '.' will be replaced with value that you will enter above.", 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Counter Value Prefix', 'ultimate_vc' ), 'param_name' => 'counter_prefix', 'value' => '', 'description' => __( 'Enter prefix for counter value', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Counter Value Suffix', 'ultimate_vc' ), 'param_name' => 'counter_suffix', 'value' => '', 'description' => __( 'Enter suffix for counter value', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Counter rolling time', 'ultimate_vc' ), 'param_name' => 'speed', 'value' => 3, 'min' => 1, 'max' => 10, 'suffix' => 'seconds', 'description' => __( 'How many seconds the counter should roll?', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Extra Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Add extra class name that will be applied to the icon process, and you can use this class for your customizations.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title_text_typography', 'heading' => __( 'Counter Title settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'counter_color_txt', 'value' => '', 'description' => __( 'Select text color for counter title.', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'desc_text_typography', 'heading' => __( 'Counter Value settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_font_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'desc_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'description' => __( 'Select text color for counter digits.', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'param_name' => 'suf_pref_typography', 'heading' => __( 'Counter suffix-prefix Value settings', 'ultimate_vc' ), 'value' => '', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'suf_pref_font', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'suf_pref_font_style', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'suf_pref_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'suf_pref_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'param_name' => 'suf_pref_font_color', 'heading' => __( 'Color', 'ultimate_vc' ), 'description' => __( 'Select text color for counter prefix and suffix.', 'ultimate_vc' ), 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_stat_counter', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** * Render function for Stats Counter Module. * * @param array $atts represts module attribuits. * @access public */ public function counter_shortcode( $atts ) { $counter_font = ''; $title_font_color = ''; $suf_pref_typography = ''; $ult_sc_settings = shortcode_atts( array( 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_link' => '', 'icon_animation' => '', 'counter_title' => '', 'counter_value' => '1250', 'counter_sep' => ',', 'counter_suffix' => '', 'counter_prefix' => '', 'counter_decimal' => '.', 'icon_position' => 'top', 'counter_style' => '', 'speed' => '3', 'font_size_title' => '18', 'font_size_counter' => '28', 'counter_color_txt' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'desc_font_line_height' => '', 'el_class' => '', 'suf_pref_font' => '', 'suf_pref_font_color' => '', 'suf_pref_font_size' => '', 'suf_pref_line_height' => '', 'suf_pref_font_style' => '', 'css_stat_counter' => '', ), $atts ); $ult_sc_settings['css_stat_counter'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_sc_settings['css_stat_counter'], ' ' ), 'stat_counter', $atts ); $ult_sc_settings['css_stat_counter'] = esc_attr( $ult_sc_settings['css_stat_counter'] ); $class = ''; $style = ''; $title_style = ''; $desc_style = ''; $suf_pref_style = ''; $stats_icon = do_shortcode( '[just_icon icon_type="' . esc_attr( $ult_sc_settings['icon_type'] ) . '" icon="' . esc_attr( $ult_sc_settings['icon'] ) . '" icon_img="' . esc_attr( $ult_sc_settings['icon_img'] ) . '" img_width="' . esc_attr( $ult_sc_settings['img_width'] ) . '" icon_size="' . esc_attr( $ult_sc_settings['icon_size'] ) . '" icon_color="' . esc_attr( $ult_sc_settings['icon_color'] ) . '" icon_style="' . esc_attr( $ult_sc_settings['icon_style'] ) . '" icon_color_bg="' . esc_attr( $ult_sc_settings['icon_color_bg'] ) . '" icon_color_border="' . esc_attr( $ult_sc_settings['icon_color_border'] ) . '" icon_border_style="' . esc_attr( $ult_sc_settings['icon_border_style'] ) . '" icon_border_size="' . esc_attr( $ult_sc_settings['icon_border_size'] ) . '" icon_border_radius="' . esc_attr( $ult_sc_settings['icon_border_radius'] ) . '" icon_border_spacing="' . esc_attr( $ult_sc_settings['icon_border_spacing'] ) . '" icon_link="' . esc_attr( $ult_sc_settings['icon_link'] ) . '" icon_animation="' . esc_attr( $ult_sc_settings['icon_animation'] ) . '"]' ); /* title */ if ( '' != $ult_sc_settings['title_font'] ) { $font_family = get_ultimate_font_family( $ult_sc_settings['title_font'] ); $title_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_sc_settings['title_font_style'] ) { $title_style .= get_ultimate_font_style( $ult_sc_settings['title_font_style'] ); } // Responsive param. if ( '' != $ult_sc_settings['title_font_size'] ) { $ult_sc_settings['font_size_title'] = ''; } if ( is_numeric( $ult_sc_settings['title_font_size'] ) ) { $ult_sc_settings['title_font_size'] = 'desktop:' . $ult_sc_settings['title_font_size'] . 'px;'; } if ( is_numeric( $ult_sc_settings['title_font_line_height'] ) ) { $ult_sc_settings['title_font_line_height'] = 'desktop:' . $ult_sc_settings['title_font_line_height'] . 'px;'; } $counter_resp_id = 'counter-responsv-wrap-' . wp_rand( 1000, 9999 ); $stats_counter_args = array( 'target' => '#' . $counter_resp_id . ' .stats-text', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_sc_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_sc_settings['title_font_line_height'], ), ); $stats_counter_data_list = get_ultimate_vc_responsive_media_css( $stats_counter_args ); /* description */ if ( '' != $ult_sc_settings['desc_font'] ) { $font_family = get_ultimate_font_family( $ult_sc_settings['desc_font'] ); $desc_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_sc_settings['desc_font_style'] ) { $desc_style .= get_ultimate_font_style( $ult_sc_settings['desc_font_style'] ); } // Responsive param. if ( '' != $ult_sc_settings['desc_font_size'] || '' != $ult_sc_settings['suf_pref_font_size'] ) { $ult_sc_settings['font_size_counter'] = ''; } if ( is_numeric( $ult_sc_settings['desc_font_size'] ) ) { $ult_sc_settings['desc_font_size'] = 'desktop:' . $ult_sc_settings['desc_font_size'] . 'px;'; } if ( is_numeric( $ult_sc_settings['desc_font_line_height'] ) ) { $ult_sc_settings['desc_font_line_height'] = 'desktop:' . $ult_sc_settings['desc_font_line_height'] . 'px;'; } $stats_counter_val_args = array( 'target' => '#' . $counter_resp_id . ' .stats-number', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_sc_settings['desc_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $desc_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_sc_settings['desc_font_line_height'], ), ); $stats_counter_val_data_list = get_ultimate_vc_responsive_media_css( $stats_counter_val_args ); if ( '' != $ult_sc_settings['desc_font_color'] ) { $desc_style .= 'color:' . $ult_sc_settings['desc_font_color'] . ';'; } if ( '' !== $ult_sc_settings['counter_color_txt'] ) { $counter_color = 'color:' . $ult_sc_settings['counter_color_txt'] . ';'; } else { $counter_color = ''; } if ( '' != $ult_sc_settings['icon_color'] ) { $style .= 'color:' . $ult_sc_settings['icon_color'] . ';'; } if ( 'none' !== $ult_sc_settings['icon_animation'] ) { $css_trans = 'data-animation="' . esc_attr( $ult_sc_settings['icon_animation'] ) . '" data-animation-delay="03"'; } if ( '' !== $ult_sc_settings['font_size_counter'] ) { $counter_font = 'font-size:' . $ult_sc_settings['font_size_counter'] . 'px;'; } $ult_sc_settings['title_font'] = 'font-size:' . $ult_sc_settings['font_size_title'] . 'px;'; // Responsive param. if ( '' != $ult_sc_settings['suf_pref_font'] ) { $font_family = get_ultimate_font_family( $ult_sc_settings['suf_pref_font'] ); $suf_pref_style .= 'font-family:\'' . $font_family . '\';'; } if ( '' != $ult_sc_settings['suf_pref_font_style'] ) { $suf_pref_style .= get_ultimate_font_style( $ult_sc_settings['suf_pref_font_style'] ); } // Responsive param. if ( is_numeric( $ult_sc_settings['suf_pref_font_size'] ) ) { $ult_sc_settings['suf_pref_font_size'] = 'desktop:' . $ult_sc_settings['suf_pref_font_size'] . 'px;'; } if ( is_numeric( $ult_sc_settings['suf_pref_line_height'] ) ) { $ult_sc_settings['suf_pref_line_height'] = 'desktop:' . $ult_sc_settings['suf_pref_line_height'] . 'px;'; } $stats_counter_sufpref_args = array( 'target' => '#' . $counter_resp_id . ' .mycust', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $ult_sc_settings['suf_pref_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $desc_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_sc_settings['suf_pref_line_height'], ), ); $stats_counter_sufpref_data_list = get_ultimate_vc_responsive_media_css( $stats_counter_sufpref_args ); $suf_pref_style .= 'color:' . $ult_sc_settings['suf_pref_font_color']; if ( '' != $ult_sc_settings['counter_style'] ) { $class = $ult_sc_settings['counter_style']; if ( strpos( $ult_sc_settings['counter_style'], 'no_bg' ) ) { $style .= 'border:2px solid ' . $counter_icon_bg_color . ';'; } elseif ( strpos( $ult_sc_settings['counter_style'], 'with_bg' ) ) { if ( '' != $counter_icon_bg_color ) { $style .= 'background:' . $counter_icon_bg_color . ';'; } } } if ( '' != $ult_sc_settings['el_class'] ) { $class .= ' ' . $ult_sc_settings['el_class']; } $ic_position = 'stats-' . $ult_sc_settings['icon_position']; $ic_class = 'aio-icon-' . $ult_sc_settings['icon_position']; $output = '
    '; $id = 'counter_' . uniqid( wp_rand() ); if ( '' == $ult_sc_settings['counter_sep'] ) { $ult_sc_settings['counter_sep'] = 'none'; } if ( '' == $ult_sc_settings['counter_decimal'] ) { $ult_sc_settings['counter_decimal'] = 'none'; } if ( 'right' !== $ult_sc_settings['icon_position'] ) { $output .= '
    ' . $stats_icon . '
    '; } $output .= '
    '; if ( '' !== $ult_sc_settings['counter_prefix'] ) { $output .= '
    ' . $ult_sc_settings['counter_prefix'] . '
    '; } $output .= '
    0
    '; if ( '' !== $ult_sc_settings['counter_suffix'] ) { $output .= '
    ' . $ult_sc_settings['counter_suffix'] . '
    '; } $output .= '
    ' . $ult_sc_settings['counter_title'] . '
    '; $output .= '
    '; if ( 'right' == $ult_sc_settings['icon_position'] ) { $output .= '
    ' . $stats_icon . '
    '; } $output .= '
    '; $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } } } if ( class_exists( 'AIO_Stats_Counter' ) ) { $aio_stats_counter = new AIO_Stats_Counter(); } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Stat_Counter' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Stat_Counter extends WPBakeryShortCode { } } ultimate_pricing_tables.php000064400000064454150212230100012145 0ustar00 __( 'Price Box', 'ultimate_vc' ), 'base' => 'ultimate_pricing', 'class' => 'vc_ultimate_pricing', 'icon' => 'vc_ultimate_pricing', 'category' => 'Ultimate VC Addons', 'description' => __( 'Create nice looking pricing tables.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Design Style', 'ultimate_vc' ), 'param_name' => 'design_style', 'value' => array( __( 'Design 01', 'ultimate_vc' ) => 'design01', __( 'Design 02', 'ultimate_vc' ) => 'design02', __( 'Design 03', 'ultimate_vc' ) => 'design03', __( 'Design 04', 'ultimate_vc' ) => 'design04', __( 'Design 05', 'ultimate_vc' ) => 'design05', __( 'Design 06', 'ultimate_vc' ) => 'design06', ), 'description' => __( 'Select Pricing table design you would like to use', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Select Color Scheme', 'ultimate_vc' ), 'param_name' => 'color_scheme', 'value' => array( __( 'Black', 'ultimate_vc' ) => 'black', __( 'Red', 'ultimate_vc' ) => 'red', __( 'Blue', 'ultimate_vc' ) => 'blue', __( 'Yellow', 'ultimate_vc' ) => 'yellow', __( 'Green', 'ultimate_vc' ) => 'green', __( 'Gray', 'ultimate_vc' ) => 'gray', __( 'Design Your Own', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Which color scheme would like to use?', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main background Color', 'ultimate_vc' ), 'param_name' => 'color_bg_main', 'value' => '', 'description' => __( 'Select normal background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Main text Color', 'ultimate_vc' ), 'param_name' => 'color_txt_main', 'value' => '', 'description' => __( 'Select normal background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlight background Color', 'ultimate_vc' ), 'param_name' => 'color_bg_highlight', 'value' => '', 'description' => __( 'Select highlight background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Highlight text Color', 'ultimate_vc' ), 'param_name' => 'color_txt_highlight', 'value' => '', 'description' => __( 'Select highlight background color.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'color_scheme', 'value' => array( 'custom' ), ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Package Name / Title', 'ultimate_vc' ), 'param_name' => 'package_heading', 'admin_label' => true, 'value' => '', 'description' => __( 'Enter the package name or table heading', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Package Name / Title Tag', 'ultimate_vc' ), 'param_name' => 'heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h3', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H5', 'ultimate_vc' ) => 'h5', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H3', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Sub Heading', 'ultimate_vc' ), 'param_name' => 'package_sub_heading', 'value' => '', 'description' => __( 'Enter short description for this package', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-8', ), array( 'type' => 'dropdown', 'heading' => __( 'Sub Heading Tag', 'ultimate_vc' ), 'param_name' => 'sub_heading_tag', 'value' => array( __( 'Default', 'ultimate_vc' ) => 'h5', __( 'H1', 'ultimate_vc' ) => 'h1', __( 'H2', 'ultimate_vc' ) => 'h2', __( 'H3', 'ultimate_vc' ) => 'h3', __( 'H4', 'ultimate_vc' ) => 'h4', __( 'H6', 'ultimate_vc' ) => 'h6', __( 'Div', 'ultimate_vc' ) => 'div', __( 'p', 'ultimate_vc' ) => 'p', __( 'span', 'ultimate_vc' ) => 'span', ), 'description' => __( 'Default is H5', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-padding-remove vc_col-sm-4', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Package Price', 'ultimate_vc' ), 'param_name' => 'package_price', 'value' => '', 'description' => __( 'Enter the price for this package. e.g. $157', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Price Unit', 'ultimate_vc' ), 'param_name' => 'package_unit', 'value' => '', 'description' => __( 'Enter the price unit for this package. e.g. per month', 'ultimate_vc' ), ), array( 'type' => 'textarea_html', 'class' => '', 'heading' => __( 'Features', 'ultimate_vc' ), 'param_name' => 'content', 'value' => '', 'description' => __( 'Create the features list using un-ordered list elements.', 'ultimate_vc' ), 'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Button Text', 'ultimate_vc' ), 'param_name' => 'package_btn_text', 'value' => '', 'description' => __( 'Enter call to action button text', 'ultimate_vc' ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Button Link', 'smile' ), 'param_name' => 'package_link', 'value' => '', 'description' => __( 'Select / enter the link for call to action button', 'ultimate_vc' ), ), array( 'type' => 'checkbox', 'class' => '', 'heading' => '', 'param_name' => 'package_featured', 'value' => array( 'Make this pricing box as featured' => 'enable' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Minimum Height For Price Box', 'ultimate_vc' ), 'param_name' => 'min_ht', 'min' => '', 'suffix' => 'px', 'description' => __( 'Adjust height of your price box.', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'js_composer' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), /* typoraphy - package */ array( 'type' => 'ult_param_heading', 'text' => __( 'Package Name/Title Settings', 'ultimate_vc' ), 'param_name' => 'package_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'package_name_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'package_name_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'package_name_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'package_name_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'package_name_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - sub heading */ array( 'type' => 'ult_param_heading', 'text' => __( 'Sub-Heading Settings', 'ultimate_vc' ), 'param_name' => 'subheading_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'subheading_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'subheading_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'subheading_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'subheading_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'subheading_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - price */ array( 'type' => 'ult_param_heading', 'text' => __( 'Price Settings', 'ultimate_vc' ), 'param_name' => 'price_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'price_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'price_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'price_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'price_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'price_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - price unit*/ array( 'type' => 'ult_param_heading', 'text' => __( 'Price Unit Settings', 'ultimate_vc' ), 'param_name' => 'price_unit_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'smile' ), 'param_name' => 'price_unit_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'price_unit_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'price_unit_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'price_unit_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'price_unit_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - feature*/ array( 'type' => 'ult_param_heading', 'text' => __( 'Features Settings', 'ultimate_vc' ), 'param_name' => 'features_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'features_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'features_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'features_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'features_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'features_font_color', 'value' => '', 'group' => 'Typography', ), /* typoraphy - button */ array( 'type' => 'ult_param_heading', 'text' => __( 'Button Settings', 'ultimate_vc' ), 'param_name' => 'button_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'button_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'button_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => 'font-size', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'button_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'button_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'button_font_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_price_box', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), // params. ) );// vc_map. } } /** * Render function for Pricing Tables Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_pricing_shortcode( $atts, $content = null ) { $ult_price_settings = shortcode_atts( array( 'design_style' => 'design01', ), $atts ); $output = ''; require_once __ULTIMATE_ROOT__ . '/templates/pricing/pricing-' . $ult_price_settings['design_style'] . '.php'; $design_func = 'ult_price_generate_' . $ult_price_settings['design_style']; $output .= $design_func( $atts, $content ); $is_preset = false; // Display settings for Preset. if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } } // class Ultimate_Pricing_Table. new Ultimate_Pricing_Table(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Pricing' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Pricing extends WPBakeryShortCode { } } } ultimate_buttons.php000064400000112300150212230100010636 0ustar00 '', 'btn_link' => '', 'btn_size' => 'ubtn-normal', 'btn_width' => '', 'btn_height' => '', 'btn_padding_left' => '', 'btn_padding_top' => '', 'btn_hover' => 'ubtn-no-hover-bg', 'btn_bg_color' => '#e0e0e0', 'btn_radius' => '', 'btn_shadow' => '', 'btn_shadow_color' => '', 'btn_shadow_size' => '', 'btn_bg_color_hover' => '', 'btn_title_color_hover' => '', 'btn_border_style' => '', 'btn_color_border' => '', 'btn_color_border_hover' => '', 'btn_border_size' => '', 'btn_font_family' => '', 'btn_font_style' => '', 'btn_title_color' => '#000000', 'btn_font_size' => '', 'btn_line_height' => '', 'icon' => '', 'icon_size' => '', 'icon_color' => '', 'btn_icon_pos' => '', 'btn_anim_effect' => 'none', 'button_bg_img' => '', 'btn_align' => 'ubtn-left', 'btn_shadow_color_hover' => '', 'btn_shadow_click' => '', 'enable_tooltip' => '', 'tooltip_text' => '', 'tooltip_pos' => 'left', 'rel_attr' => '', 'el_class' => '', 'css_adv_btn' => '', 'ult_btn_custom_onclick' => '', 'ult_btn_custom_onclick_code' => '', ), $atts ); $style = ''; $hover_style = ''; $btn_style_inline = ''; $link_sufix = ''; $link_prefix = ''; $img = ''; $shadow_hover = ''; $shadow_click = ''; $shadow_color = ''; $box_shadow = ''; $main_extra_class = ''; $main_extra_class = $ult_ub_settings['el_class']; $tooltip = ''; $tooltip_class = ''; $ult_ub_settings['el_class'] = ''; $css_btn_design = ''; $ult_ub_settings['el_class'] .= ' ' . $ult_ub_settings['btn_anim_effect'] . ' '; $uniqid = uniqid(); $tooltip_class = 'tooltip-' . $uniqid; $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $css_btn_design = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_ub_settings['css_adv_btn'], ' ' ), 'ult_buttons', $atts ); $css_btn_design = esc_attr( $css_btn_design ); if ( 'yes' == $ult_ub_settings['enable_tooltip'] ) { wp_enqueue_script( 'ultimate-tooltip' ); wp_enqueue_style( 'ultimate-tooltip' ); $tooltip .= 'data-toggle="tooltip" data-placement="' . esc_attr( $ult_ub_settings['tooltip_pos'] ) . '" title="' . esc_attr( $ult_ub_settings['tooltip_text'] ) . '"'; $tooltip_class .= ' ubtn-tooltip ' . $ult_ub_settings['tooltip_pos']; } if ( 'enable' !== $ult_ub_settings['btn_shadow_click'] ) { $shadow_click = 'none'; } if ( '' == $ult_ub_settings['btn_shadow_color_hover'] ) { $shadow_color = $ult_ub_settings['btn_shadow_color']; } else { $shadow_color = $ult_ub_settings['btn_shadow_color_hover']; } $alt = 'icon'; if ( '' !== $ult_ub_settings['button_bg_img'] ) { $img = apply_filters( 'ult_get_img_single', $ult_ub_settings['button_bg_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_ub_settings['button_bg_img'], 'alt' ); } if ( '' !== $ult_ub_settings['btn_link'] ) { $href = vc_build_link( $ult_ub_settings['btn_link'] ); if ( '' !== $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; if ( '' == $rel ) { $rel .= esc_attr( $ult_ub_settings['rel_attr'] ); } else { $rel .= ' ' . esc_attr( $ult_ub_settings['rel_attr'] ); } if ( 'ubtn-block' == $ult_ub_settings['btn_size'] ) { $tooltip_class .= ' ubtn-block'; } $link_prefix .= ''; $link_sufix .= ''; } } else { if ( '' !== $ult_ub_settings['enable_tooltip'] ) { $link_prefix .= ''; $link_sufix .= ''; } } if ( '' !== $ult_ub_settings['btn_icon_pos'] && 'none' !== $ult_ub_settings['icon'] && '' !== $ult_ub_settings['icon'] ) { $ult_ub_settings['el_class'] .= ' ubtn-sep-icon ' . $ult_ub_settings['btn_icon_pos'] . ' '; } if ( '' != $ult_ub_settings['btn_font_family'] ) { $mhfont_family = get_ultimate_font_family( $ult_ub_settings['btn_font_family'] ); $btn_style_inline .= 'font-family:\'' . $mhfont_family . '\';'; } $btn_style_inline .= get_ultimate_font_style( $ult_ub_settings['btn_font_style'] ); $adv_btn_id = 'ubtn-' . wp_rand( 1000, 9999 ); if ( is_numeric( $ult_ub_settings['btn_font_size'] ) ) { $ult_ub_settings['btn_font_size'] = 'desktop:' . $ult_ub_settings['btn_font_size'] . 'px;'; } if ( is_numeric( $ult_ub_settings['btn_line_height'] ) ) { $ult_ub_settings['btn_line_height'] = 'desktop:' . $ult_ub_settings['btn_line_height'] . 'px'; } $advbtnargs = array( 'target' => '#' . $adv_btn_id, 'media_sizes' => array( 'font-size' => $ult_ub_settings['btn_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $title_responsive_font_size holds responsive font sizes from user input. 'line-height' => $ult_ub_settings['btn_line_height'], ), ); $data_list = get_ultimate_vc_responsive_media_css( $advbtnargs ); $style .= $btn_style_inline; if ( 'ubtn-custom' == $ult_ub_settings['btn_size'] ) { $style .= 'width:' . $ult_ub_settings['btn_width'] . 'px;'; $style .= 'min-height:' . $ult_ub_settings['btn_height'] . 'px;'; $style .= 'padding:' . $ult_ub_settings['btn_padding_top'] . 'px ' . $ult_ub_settings['btn_padding_left'] . 'px;'; } if ( '' !== $ult_ub_settings['btn_border_style'] ) { $style .= 'border-radius:' . $ult_ub_settings['btn_radius'] . 'px;'; $style .= 'border-width:' . $ult_ub_settings['btn_border_size'] . 'px;'; $style .= 'border-color:' . $ult_ub_settings['btn_color_border'] . ';'; $style .= 'border-style:' . $ult_ub_settings['btn_border_style'] . ';'; } else { $style .= 'border:none;'; } if ( '' !== $ult_ub_settings['btn_shadow'] ) { switch ( $ult_ub_settings['btn_shadow'] ) { case 'shd-top': $style .= 'box-shadow: 0 -' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $ult_ub_settings['btn_shadow_color'] . ';'; $box_shadow .= '0 -' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $ult_ub_settings['btn_shadow_color'] . ';'; if ( 'none' !== $shadow_click ) { $shadow_hover .= '0 -3px ' . $shadow_color . ';'; } else { $shadow_hover .= '0 -' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $shadow_color . ';'; } break; case 'shd-bottom': $style .= 'box-shadow: 0 ' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $ult_ub_settings['btn_shadow_color'] . ';'; $box_shadow .= '0 ' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $ult_ub_settings['btn_shadow_color'] . ';'; if ( 'none' !== $shadow_click ) { $shadow_hover .= '0 3px ' . $shadow_color . ';'; } else { $shadow_hover .= '0 ' . $ult_ub_settings['btn_shadow_size'] . 'px ' . $shadow_color . ';'; } break; case 'shd-left': $style .= 'box-shadow: -' . $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $ult_ub_settings['btn_shadow_color'] . ';'; $box_shadow .= '-' . $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $ult_ub_settings['btn_shadow_color'] . ';'; if ( 'none' !== $shadow_click ) { $shadow_hover .= '-3px 0 ' . $shadow_color . ';'; } else { $shadow_hover .= '-' . $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $shadow_color . ';'; } break; case 'shd-right': $style .= 'box-shadow: ' . $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $ult_ub_settings['btn_shadow_color'] . ';'; $box_shadow .= $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $ult_ub_settings['btn_shadow_color'] . ';'; if ( 'none' !== $shadow_click ) { $shadow_hover .= '3px 0 ' . $shadow_color . ';'; } else { $shadow_hover .= $ult_ub_settings['btn_shadow_size'] . 'px 0 ' . $shadow_color . ';'; } break; } } $btn_custom_onclick_code = ''; if ( ! empty( $ult_ub_settings['ult_btn_custom_onclick'] ) && $ult_ub_settings['ult_btn_custom_onclick_code'] ) { $btn_custom_onclick_code = 'onclick="' . esc_attr( ult_prepareAtts( $ult_ub_settings['ult_btn_custom_onclick_code'] ) ) . '"'; } if ( '' !== $ult_ub_settings['btn_bg_color'] ) { $style .= 'background: ' . $ult_ub_settings['btn_bg_color'] . ';'; } if ( '' !== $ult_ub_settings['btn_title_color'] ) { $style .= 'color: ' . $ult_ub_settings['btn_title_color'] . ';'; } if ( $ult_ub_settings['btn_shadow'] ) { $ult_ub_settings['el_class'] .= ' ubtn-shd '; } if ( $ult_ub_settings['btn_align'] ) { $ult_ub_settings['el_class'] .= ' ' . $ult_ub_settings['btn_align'] . ' '; } if ( '' == $ult_ub_settings['btn_title'] && '' !== $ult_ub_settings['icon'] ) { $ult_ub_settings['el_class'] .= ' ubtn-only-icon '; } if ( '' === $ult_ub_settings['btn_link'] ) { $ult_ub_settings['el_class'] .= $main_extra_class; } $output .= ''; $output = $link_prefix . $output . $link_sufix; // Add a wrapper class to handle bottom margin. $wrapper_class = ''; switch ( $ult_ub_settings['btn_align'] ) { case 'ubtn-inline': $wrapper_class = 'ubtn-ctn-inline'; break; case 'ubtn-center': $wrapper_class = 'ubtn-ctn-center'; break; case 'ubtn-right': $wrapper_class = 'ubtn-ctn-right'; break; case 'ubtn-left': default: $wrapper_class = 'ubtn-ctn-left'; break; } if ( '' !== $img ) { $output = '
    ' . $output . '
    '; } else { $output = '
    ' . $output . '
    '; } if ( '' !== $img ) { $html = '
    '; $html .= '' . esc_attr( $alt ) . ''; $html .= $output; $html .= '
    '; $output = $html; } if ( '' !== $ult_ub_settings['enable_tooltip'] ) { $output .= ''; } $is_preset = false; if ( isset( $_GET['preset'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $is_preset = true; } if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; // remove backslash once copied. } return $output; } /** * Function to intialize the button module * * @since ---- * @access public */ public function init_buttons() { if ( function_exists( 'vc_map' ) ) { $json = ultimate_get_icon_position_json(); vc_map( array( 'name' => __( 'Advanced Button', 'ultimate_vc' ), 'base' => 'ult_buttons', 'icon' => 'ult_buttons', 'class' => 'ult_buttons', 'content_element' => true, 'controls' => 'full', 'category' => 'Ultimate VC Addons', 'description' => __( 'Create creative buttons.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Button Title', 'ultimate_vc' ), 'param_name' => 'btn_title', 'value' => '', 'description' => '', 'group' => 'General', 'admin_label' => true, ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Button Link', 'ultimate_vc' ), 'param_name' => 'btn_link', 'value' => '', 'description' => '', 'group' => 'General', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Alignment', 'ultimate_vc' ), 'param_name' => 'btn_align', 'value' => array( 'Left Align' => 'ubtn-left', 'Center Align' => 'ubtn-center', 'Right Align' => 'ubtn-right', 'Inline' => 'ubtn-inline', ), 'description' => '', 'group' => 'General', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Size', 'ultimate_vc' ), 'param_name' => 'btn_size', 'value' => array( __( 'Normal Button', 'ultimate_vc' ) => 'ubtn-normal', __( 'Mini Button', 'ultimate_vc' ) => 'ubtn-mini', __( 'Small Button', 'ultimate_vc' ) => 'ubtn-small', __( 'Large Button', 'ultimate_vc' ) => 'ubtn-large', __( 'Button Block', 'ultimate_vc' ) => 'ubtn-block', __( 'Custom Size', 'ultimate_vc' ) => 'ubtn-custom', ), 'description' => '', 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Button Width', 'ultimate_vc' ), 'param_name' => 'btn_width', 'value' => '', 'min' => 10, 'max' => 1000, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_size', 'value' => 'ubtn-custom', ), 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Button Height', 'ultimate_vc' ), 'param_name' => 'btn_height', 'value' => '', 'min' => 10, 'max' => 1000, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_size', 'value' => 'ubtn-custom', ), 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Button Left / Right Padding', 'ultimate_vc' ), 'param_name' => 'btn_padding_left', 'value' => '', 'min' => 10, 'max' => 1000, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_size', 'value' => 'ubtn-custom', ), 'group' => 'General', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Button Top / Bottom Padding', 'ultimate_vc' ), 'param_name' => 'btn_padding_top', 'value' => '', 'min' => 10, 'max' => 1000, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_size', 'value' => 'ubtn-custom', ), 'group' => 'General', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Button Title Color', 'ultimate_vc' ), 'param_name' => 'btn_title_color', 'value' => '#000000', 'description' => '', 'group' => 'General', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'btn_bg_color', 'value' => '#e0e0e0', 'description' => '', 'group' => 'General', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), 'group' => 'General', ), array( 'type' => 'textfield', 'heading' => __( 'Rel Attribute', 'ultimate_vc' ), 'param_name' => 'rel_attr', 'description' => __( 'This is useful when you want to trigger third party features. Example- prettyPhoto, thickbox etc', 'ultimate_vc' ), 'group' => 'General', ), array( 'type' => 'checkbox', 'heading' => __( 'Advanced on click action', 'ultimate_vc' ), 'param_name' => 'ult_btn_custom_onclick', 'description' => __( 'Insert inline onclick javascript action.', 'ultimate_vc' ), 'group' => 'General', ), array( 'type' => 'textfield', 'heading' => __( 'On click code', 'ultimate_vc' ), 'param_name' => 'ult_btn_custom_onclick_code', 'description' => __( 'Enter onclick action code.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'ult_btn_custom_onclick', 'not_empty' => true, ), 'group' => 'General', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Hover Background Effect', 'ultimate_vc' ), 'param_name' => 'btn_hover', 'value' => array( __( 'No Effect', 'ultimate_vc' ) => 'ubtn-no-hover-bg', __( 'Fade Background', 'ultimate_vc' ) => 'ubtn-fade-bg', __( 'Fill Background from Top', 'ultimate_vc' ) => 'ubtn-top-bg', __( 'Fill Background from Bottom', 'ultimate_vc' ) => 'ubtn-bottom-bg', __( 'Fill Background from Left', 'ultimate_vc' ) => 'ubtn-left-bg', __( 'Fill Background from Right', 'ultimate_vc' ) => 'ubtn-right-bg', __( 'Fill Background from Center Horizontally', 'ultimate_vc' ) => 'ubtn-center-hz-bg', __( 'Fill Background from Center Vertically', 'ultimate_vc' ) => 'ubtn-center-vt-bg', __( 'Fill Background from Center Diagonal', 'ultimate_vc' ) => 'ubtn-center-dg-bg', ), 'description' => '', 'group' => 'Background', ), array( 'type' => 'dropdown', 'class' => 'no-ult-effect', 'edit_field_class' => 'ult-no-effect vc_column vc_col-sm-12', 'heading' => __( 'Button Hover Animation Effects', 'ultimate_vc' ), 'param_name' => 'btn_anim_effect', 'value' => array( 'No Effect' => 'none', 'Grow' => 'ulta-grow', 'Shrink' => 'ulta-shrink', 'Pulse' => 'ulta-pulse', 'Pulse Grow' => 'ulta-pulse-grow', 'Pulse Shrink' => 'ulta-pulse-shrink', 'Push' => 'ulta-push', 'Pop' => 'ulta-pop', 'Rotate' => 'ulta-rotate', 'Grow Rotate' => 'ulta-grow-rotate', 'Float' => 'ulta-float', 'Sink' => 'ulta-sink', 'Hover' => 'ulta-hover', 'Hang' => 'ulta-hang', 'Skew' => 'ulta-skew', 'Skew Forward' => 'ulta-skew-forward', 'Skew Backward' => 'ulta-skew-backward', 'Wobble Horizontal' => 'ulta-wobble-horizontal', 'Wobble Vertical' => 'ulta-wobble-vertical', 'Wobble to Bottom Right' => 'ulta-wobble-to-bottom-right', 'Wobble to Top Right' => 'ulta-wobble-to-top-right', 'Wobble Top' => 'ulta-wobble-top', 'Wobble Bottom' => 'ulta-wobble-bottom', 'Wobble Skew' => 'ulta-wobble-skew', 'Buzz' => 'ulta-buzz', 'Buzz Out' => 'ulta-buzz-out', ), 'description' => '', 'group' => 'Background', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Hover Background Color', 'ultimate_vc' ), 'param_name' => 'btn_bg_color_hover', 'value' => '', 'description' => '', 'group' => 'Background', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Hover Text Color', 'ultimate_vc' ), 'param_name' => 'btn_title_color_hover', 'value' => '', 'description' => '', 'group' => 'Background', ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Button Background Image', 'ultimate_vc' ), 'param_name' => 'button_bg_img', 'value' => '', 'description' => __( 'Upload the image on which you want to place the button.', 'ultimate_vc' ), 'group' => 'Background', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose, you can", 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'group' => 'Icon', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'group' => 'Icon', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'group' => 'Icon', ), array( 'type' => 'ult_button', 'class' => '', 'heading' => __( 'Icon Position ', 'ultimate_vc' ), 'param_name' => 'btn_icon_pos', 'value' => '', 'json' => $json, 'description' => '', 'group' => 'Icon', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Border Style', 'ultimate_vc' ), 'param_name' => 'btn_border_style', 'value' => array( 'None' => '', 'Solid' => 'solid', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => '', 'group' => 'Styling', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'btn_color_border', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'group' => 'Styling', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color on Hover', 'ultimate_vc' ), 'param_name' => 'btn_color_border_hover', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'group' => 'Styling', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'btn_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'group' => 'Styling', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'btn_radius', 'value' => 3, 'min' => 0, 'max' => 500, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_border_style', 'not_empty' => true, ), 'group' => 'Styling', ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_adv_btn', 'group' => __( 'Styling', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Button Shadow', 'ultimate_vc' ), 'param_name' => 'btn_shadow', 'value' => array( __( 'No Shadow', 'ultimate_vc' ) => '', __( 'Shadow at Top', 'ultimate_vc' ) => 'shd-top', __( 'Shadow at Bottom', 'ultimate_vc' ) => 'shd-bottom', __( 'Shadow at Left', 'ultimate_vc' ) => 'shd-left', __( 'Shadow at Right', 'ultimate_vc' ) => 'shd-right', ), 'group' => 'Shadow', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Shadow Color', 'ultimate_vc' ), 'param_name' => 'btn_shadow_color', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'btn_shadow', 'not_empty' => true, ), 'group' => 'Shadow', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Shadow Color on Hover', 'ultimate_vc' ), 'param_name' => 'btn_shadow_color_hover', 'value' => '', 'description' => '', 'dependency' => array( 'element' => 'btn_shadow', 'not_empty' => true, ), 'group' => 'Shadow', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Shadow Size', 'ultimate_vc' ), 'param_name' => 'btn_shadow_size', 'value' => 5, 'min' => 0, 'max' => 100, 'suffix' => 'px', 'description' => '', 'dependency' => array( 'element' => 'btn_shadow', 'not_empty' => true, ), 'group' => 'Shadow', ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Button Click Effect', 'ultimate_vc' ), 'param_name' => 'btn_shadow_click', 'value' => '', 'options' => array( 'enable' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'description' => __( 'Enable Click effect on hover', 'ultimate_vc' ), 'dependency' => array( 'element' => 'btn_shadow', 'not_empty' => true, ), 'group' => 'Shadow', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'btn_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'btn_font_style', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'btn_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'btn_line_height', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography', ), array( 'type' => 'checkbox', 'class' => '', 'heading' => __( 'Tooltip Options', 'ultimate_vc' ), 'param_name' => 'enable_tooltip', 'value' => array( 'Enable tooltip on button' => 'yes' ), 'group' => 'Tooltip', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Text', 'ultimate_vc' ), 'param_name' => 'tooltip_text', 'value' => '', 'dependency' => array( 'element' => 'enable_tooltip', 'value' => 'yes', ), 'group' => 'Tooltip', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Position', 'ultimate_vc' ), 'param_name' => 'tooltip_pos', 'value' => array( __( 'Tooltip from Left', 'ultimate_vc' ) => 'left', __( 'Tooltip from Right', 'ultimate_vc' ) => 'right', __( 'Tooltip from Top', 'ultimate_vc' ) => 'top', __( 'Tooltip from Bottom', 'ultimate_vc' ) => 'bottom', ), 'description' => __( 'Select the tooltip position', 'ultimate_vc' ), 'dependency' => array( 'element' => 'enable_tooltip', 'value' => 'yes', ), 'group' => 'Tooltip', ), array( 'type' => 'ult_param_heading', 'text' => "" . __( 'Watch Video Tutorial', 'ultimate_vc' ) . "   ", 'param_name' => 'notification', 'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12', 'group' => 'General', ), ), ) ); } } } new Ultimate_Buttons(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ult_Buttons' ) ) { /** * Function that initializes Ultimate Buttons Module * * @class WPBakeryShortCode_Ult_Buttons */ class WPBakeryShortCode_Ult_Buttons extends WPBakeryShortCode { } } } ultimate_video_banner.php000064400000042553150212230100011607 0ustar00 __( 'Video Banner', 'ultimate_vc' ), 'base' => 'ultimate_video_banner', 'icon' => 'vc_ultimate_video_banner', 'category' => 'Ultimate VC Addons', 'description' => __( 'Show your video in ease.', 'ultimate_vc' ), 'deprecated' => '3.13.5', 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Link to the video in MP4 Format', 'ultimate_vc' ), 'param_name' => 'video_banner_mp4_link', ), array( 'type' => 'textfield', 'heading' => __( 'Link to the video in WebM / Ogg Format', 'ultimate_vc' ), 'param_name' => 'video_banner_webm_ogg_link', 'description' => __( 'IE, Chrome & Safari', 'ultimate_vc' ) . ' ' . __( 'support', 'ultimate_vc' ) . ' ' . __( 'MP4 format, while Firefox & Opera prefer WebM / Ogg formats.', 'ultimate_vc' ) . ' ' . __( 'You can upload the video through', 'ultimate_vc' ) . ' ' . __( 'WordPress Media Library', 'ultimate_vc' ) . '.', ), array( 'type' => 'ult_img_single', 'heading' => __( 'Placeholder', 'ultimate_vc' ), 'param_name' => 'video_banner_placeholder', ), array( 'type' => 'dropdown', 'heading' => __( 'Effect', 'ultimate_vc' ), 'param_name' => 'video_banner_effect', 'value' => array( __( 'Style 1', 'ultimate_vc' ) => 'ult-vdo-effect-style1', __( 'Style 2', 'ultimate_vc' ) => 'ult-vdo-effect-style2', __( 'Style 3', 'ultimate_vc' ) => 'ult-vdo-effect-style3', __( 'Style 4', 'ultimate_vc' ) => 'ult-vdo-effect-style4', __( 'Style 5', 'ultimate_vc' ) => 'ult-vdo-effect-style5', __( 'Style 6', 'ultimate_vc' ) => 'ult-vdo-effect-style6', __( 'Style 7', 'ultimate_vc' ) => 'ult-vdo-effect-style7', ), ), array( 'type' => 'textfield', 'heading' => __( 'Title', 'ultimate_vc' ), 'param_name' => 'video_banner_title', 'group' => 'Content', ), array( 'type' => 'textarea', 'heading' => __( 'Content', 'ultimate_vc' ), 'param_name' => 'video_banner_content', 'group' => 'Content', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Title Settings', 'ultimate_vc' ), 'param_name' => 'title_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'title_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'title_font_style', 'group' => 'Typography', ), array( 'type' => 'number', 'class' => 'font-size', 'heading' => __( 'Font Size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'min' => 10, 'suffix' => 'px', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'title_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_height', 'value' => '', 'suffix' => 'px', 'group' => 'Typography', ), array( 'type' => 'ult_param_heading', 'text' => __( 'Desciption Settings', 'ultimate_vc' ), 'param_name' => 'desc_typograpy', 'group' => 'Typography', 'class' => 'ult-param-heading', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Font Family', 'ultimate_vc' ), 'param_name' => 'desc_font_family', 'description' => __( 'Select the font of your choice.', 'ultimate_vc' ) . ' ' . __( 'You can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'desc_font_style', 'group' => 'Typography', ), array( 'type' => 'number', 'class' => 'font-size', 'heading' => __( 'Font Size', 'ultimate_vc' ), 'param_name' => 'desc_font_size', 'min' => 10, 'suffix' => 'px', 'group' => 'Typography', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Font Color', 'ultimate_vc' ), 'param_name' => 'desc_color', 'value' => '', 'group' => 'Typography', ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'desc_line_height', 'value' => '', 'suffix' => 'px', 'group' => 'Typography', ), array( 'type' => 'ultimate_responsive', 'heading' => __( 'Banner Size', 'ultimate_vc' ), 'param_name' => 'video_banner_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Design', ), array( 'type' => 'colorpicker', 'heading' => __( 'Overlay Color', 'ultimate_vc' ), 'param_name' => 'video_banner_overlay_color', 'group' => 'Design', ), array( 'type' => 'colorpicker', 'heading' => __( 'Overlay Hover Color', 'ultimate_vc' ), 'param_name' => 'video_banner_overlay_hover_color', 'group' => 'Design', ), array( 'type' => 'css_editor', 'heading' => __( 'CSS', 'ultimate_vc' ), 'param_name' => 'video_banner_vc_css', 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border video_banner_css_editor', 'group' => 'Design', ), array( 'type' => 'number', 'heading' => __( 'Start Time', 'ultimate_vc' ), 'param_name' => 'video_banner_start_time', 'suffix' => 'in seconds', 'group' => 'Advanced Settings', ), array( 'type' => 'checkbox', 'heading' => __( 'Mute', 'ultimate_vc' ), 'param_name' => 'video_banner_mute', 'value' => array( __( 'Enable', 'ultimate_vc' ) => 'muted', ), 'group' => 'Advanced Settings', ), ), ) ); } } /** * Render function for Ultimate Heading Module. * * @param array $atts represts module attribuits. * @param string $content value has been set to null. * @access public */ public function ultimate_video_banner_shortcode( $atts, $content = null ) { $ult_vb_settings = shortcode_atts( array( 'video_banner_mp4_link' => '', 'video_banner_webm_ogg_link' => '', 'video_banner_effect' => 'ult-vdo-effect-style1', 'video_banner_placeholder' => '', 'video_banner_title' => '', 'video_banner_content' => '', 'title_font_family' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_color' => '', 'title_line_height' => '', 'desc_font_family' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_color' => '', 'desc_line_height' => '', 'video_banner_size' => '', 'video_banner_overlay_color' => '', 'video_banner_overlay_hover_color' => '', 'video_banner_vc_css' => '', 'video_banner_start_time' => '0', 'video_banner_mute' => '', ), $atts ); $output = ''; $placeholder = ''; $placeholder_css = ''; $vc_css_class = ''; $vc_css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_vb_settings['video_banner_vc_css'], ' ' ), 'ultimate_video_banner', $atts ); $video_id = 'ult-video-banner-' . uniqid( wp_rand() ); $args = array( 'target' => '#' . $video_id, 'media_sizes' => array( 'width' => $ult_vb_settings['video_banner_size'], ), ); $banner_height_responsive_data = get_ultimate_vc_responsive_media_css( $args ); if ( preg_match( '/^#[a-f0-9]{6}$/i', $ult_vb_settings['video_banner_overlay_color'] ) ) { // hex color is valid. $ult_vb_settings['video_banner_overlay_color'] = hex2rgbUltParallax( $ult_vb_settings['video_banner_overlay_color'], $opacity = 0.8 ); } if ( preg_match( '/^#[a-f0-9]{6}$/i', $ult_vb_settings['video_banner_overlay_hover_color'] ) ) { // hex color is valid. $ult_vb_settings['video_banner_overlay_hover_color'] = hex2rgbUltParallax( $ult_vb_settings['video_banner_overlay_hover_color'], $opacity = 0.4 ); } /* ---- main heading styles ---- */ $title_style_inline = ''; if ( '' != $ult_vb_settings['title_font_family'] ) { $ult_vb_settings['title_font_family'] = get_ultimate_font_family( $ult_vb_settings['title_font_family'] ); if ( $ult_vb_settings['title_font_family'] ) { $title_style_inline .= 'font-family:\'' . $ult_vb_settings['title_font_family'] . '\';'; } } // main heading font style. $title_style_inline .= get_ultimate_font_style( $ult_vb_settings['title_font_style'] ); // attach font size if set. if ( '' != $ult_vb_settings['title_font_size'] ) { $title_style_inline .= 'font-size:' . $ult_vb_settings['title_font_size'] . 'px;'; } // attach font color if set. if ( '' != $ult_vb_settings['title_color'] ) { $title_style_inline .= 'color:' . $ult_vb_settings['title_color'] . ';'; } // line height. if ( '' != $ult_vb_settings['title_line_height'] ) { $title_style_inline .= 'line-height:' . $ult_vb_settings['title_line_height'] . 'px;'; } /* ---- description styles ---- */ $desc_style_inline = ''; if ( '' != $ult_vb_settings['desc_font_family'] ) { $ult_vb_settings['desc_font_family'] = get_ultimate_font_family( $ult_vb_settings['desc_font_family'] ); if ( $ult_vb_settings['desc_font_family'] ) { $desc_style_inline .= 'font-family:\'' . $ult_vb_settings['desc_font_family'] . '\';'; } } // desc font style. $desc_style_inline .= get_ultimate_font_style( $ult_vb_settings['desc_font_style'] ); // attach font size if set. if ( '' != $ult_vb_settings['desc_font_size'] ) { $desc_style_inline .= 'font-size:' . $ult_vb_settings['desc_font_size'] . 'px;'; } // attach font color if set. if ( '' != $ult_vb_settings['desc_color'] ) { $desc_style_inline .= 'color:' . $ult_vb_settings['desc_color'] . ';'; } // line height. if ( '' != $ult_vb_settings['desc_line_height'] ) { $desc_style_inline .= 'line-height:' . $ult_vb_settings['desc_line_height'] . 'px;'; } if ( '' != $ult_vb_settings['video_banner_placeholder'] ) { $img_info = apply_filters( 'ult_get_img_single', $ult_vb_settings['video_banner_placeholder'], 'url', 'full' ); $placeholder = $img_info; $placeholder_css = 'background-image:url(' . esc_url( $placeholder ) . ');'; } $output = '
    '; if ( '' != $ult_vb_settings['video_banner_mp4_link'] || '' != $ult_vb_settings['video_banner_webm_ogg_link'] ) : $output .= ''; endif; if ( '' != $ult_vb_settings['video_banner_title'] || '' != $content ) : $output .= '
    '; if ( '' != $ult_vb_settings['video_banner_title'] ) : $output .= '

    ' . __( $ult_vb_settings['video_banner_title'], 'ultimate_vc' ) . '

    '; // PHPCS:ignore:WordPress.WP.I18n.NonSingularStringLiteralText endif; if ( '' != $ult_vb_settings['video_banner_content'] ) : $output .= '
    ' . __( $ult_vb_settings['video_banner_content'], 'ultimate_vc' ) . '
    '; // PHPCS:ignore:WordPress.WP.I18n.NonSingularStringLiteralText endif; $output .= '
    '; endif; $output .= '
    '; $output .= '
    '; return $output; } } } $ultimate_video_banner = new Ultimate_Video_Banner(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Video_Banner' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Video_Banner extends WPBakeryShortCode { } } ultimate_expandable_section.php000064400000132064150212230100013000 0ustar00 ' ', 'heading_style' => ' ', 'font_family' => ' ', 'title_font_size' => '20', 'title_line_ht' => '20', 'text_color' => '#333333', 'text_hovercolor' => '#333333', 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_hover_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_hoverbg' => '#ecf0f1', 'icon_border_style' => 'solid', 'icon_color_border' => '#333333', 'icon_color_hoverborder' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '0', 'icon_border_spacing' => '30', 'icon_align' => 'center', 'extra_class' => ' ', 'css' => ' ', 'background_color' => '#dbdbdb', 'bghovercolor' => '#e5e5e5', 'cnt_bg_color' => '#dbdbdb', 'cnt_hover_bg_color' => ' ', 'exp_icon' => ' ', 'exp_effect' => 'slideToggle', 'cont_css' => ' ', 'section_width' => ' ', 'map_override' => '0', 'new_title' => ' ', 'new_icon' => ' ', 'new_icon_img' => ' ', 'title_active' => '#333333', 'title_active_bg' => '#dbdbdb', 'icon_active_color' => '#333333', 'icon_active_color_bg' => '#ffffff', 'title_margin' => ' ', 'title_alignment' => 'center', 'iconmargin_css' => ' ', 'icon_color_activeborder' => '#333333', 'title_margin' => ' ', 'title_padding' => ' ', 'desc_padding' => ' ', 'desc_margin' => ' ', 'icon_margin' => ' ', 'section_height' => '0', ), $atts ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; /* ---------- data attribute----------------------------- */ $data = ''; $data .= 'data-textcolor="' . esc_attr( $utl_ues_settings['text_color'] ) . '"'; if ( ' ' == $utl_ues_settings['text_hovercolor'] ) { $utl_ues_settings['text_hovercolor'] = $utl_ues_settings['text_color']; } if ( '' == $utl_ues_settings['title_alignment'] ) { $utl_ues_settings['title_alignment'] = 'center'; } $data .= 'data-texthover="' . esc_attr( $utl_ues_settings['text_hovercolor'] ) . '"'; $data .= 'data-icncolor="' . esc_attr( $utl_ues_settings['icon_color'] ) . '"'; $data .= 'data-ihover="' . esc_attr( $utl_ues_settings['icon_hover_color'] ) . '"'; $data .= 'data-height="' . esc_attr( $utl_ues_settings['section_height'] ) . '"'; $data .= 'data-cntbg="' . esc_attr( $utl_ues_settings['background_color'] ) . '"'; $data .= 'data-cnthvrbg="' . esc_attr( $utl_ues_settings['bghovercolor'] ) . '"'; $data .= 'data-headerbg="' . esc_attr( $utl_ues_settings['background_color'] ) . '"'; if ( ' ' == $utl_ues_settings['bghovercolor'] ) { $utl_ues_settings['bghovercolor'] = $utl_ues_settings['background_color']; } $data .= 'data-headerhover="' . esc_attr( $utl_ues_settings['bghovercolor'] ) . '"'; $data .= 'data-title="' . esc_attr( $utl_ues_settings['title'] ) . '"'; if ( ' ' == $utl_ues_settings['new_title'] ) { $utl_ues_settings['new_title'] = $utl_ues_settings['title']; } $data .= 'data-newtitle="' . esc_attr( $utl_ues_settings['new_title'] ) . '"'; $data .= 'data-icon="' . esc_attr( $utl_ues_settings['icon'] ) . '"'; if ( ' ' == $utl_ues_settings['new_icon'] ) { $utl_ues_settings['new_icon'] = $utl_ues_settings['icon']; } if ( 'none' == $utl_ues_settings['new_icon'] ) { $utl_ues_settings['new_icon'] = $utl_ues_settings['icon']; } $data .= 'data-newicon="' . esc_attr( $utl_ues_settings['new_icon'] ) . '"'; /*----active icon --------*/ if ( '' == $utl_ues_settings['icon_active_color'] ) { $utl_ues_settings['icon_active_color'] = $utl_ues_settings['icon_hover_color']; } $data .= 'data-activeicon="' . esc_attr( $utl_ues_settings['icon_active_color'] ) . '"'; if ( 'none' != $utl_ues_settings['icon_style'] ) { $data .= 'data-icnbg="' . esc_attr( $utl_ues_settings['icon_color_bg'] ) . '"'; $data .= 'data-icnhvrbg="' . esc_attr( $utl_ues_settings['icon_color_hoverbg'] ) . '"'; if ( ' ' == $utl_ues_settings['icon_active_color_bg'] ) { $utl_ues_settings['icon_active_color_bg'] = $utl_ues_settings['icon_color_hoverbg']; } $data .= 'data-activeiconbg="' . esc_attr( $utl_ues_settings['icon_active_color_bg'] ) . '"'; } if ( 'advanced' == $utl_ues_settings['icon_style'] ) { $data .= 'data-icnbg="' . esc_attr( $utl_ues_settings['icon_color_bg'] ) . '"'; $data .= 'data-icnhvrbg="' . esc_attr( $utl_ues_settings['icon_color_hoverbg'] ) . '"'; $data .= 'data-icnborder="' . esc_attr( $utl_ues_settings['icon_color_border'] ) . '"'; if ( ' ' == $utl_ues_settings['icon_color_hoverborder'] ) { $utl_ues_settings['icon_color_hoverborder'] = $utl_ues_settings['icon_color_border']; } $data .= 'data-icnhvrborder="' . esc_attr( $utl_ues_settings['icon_color_hoverborder'] ) . '"'; if ( ' ' == $utl_ues_settings['icon_active_color_bg'] ) { $utl_ues_settings['icon_active_color_bg'] = $utl_ues_settings['bghovercolor']; } $data .= 'data-activeiconbg="' . esc_attr( $utl_ues_settings['icon_active_color_bg'] ) . '"'; if ( ' ' == $utl_ues_settings['icon_color_activeborder'] ) { $utl_ues_settings['icon_color_activeborder'] = $icnhvrborder; } $data .= 'data-activeborder="' . esc_attr( $utl_ues_settings['icon_color_activeborder'] ) . '"'; } $data .= 'data-effect="' . esc_attr( $utl_ues_settings['exp_effect'] ) . '"'; $data .= 'data-override="' . esc_attr( $utl_ues_settings['map_override'] ) . '"'; /*---active color ----------*/ if ( '' == $utl_ues_settings['title_active'] ) { $utl_ues_settings['title_active'] = $utl_ues_settings['text_hovercolor']; } $data .= 'data-activetitle="' . esc_attr( $utl_ues_settings['title_active'] ) . '"'; if ( ' ' == $utl_ues_settings['title_active_bg'] ) { $utl_ues_settings['title_active_bg'] = $utl_ues_settings['bghovercolor']; } $data .= 'data-activebg="' . esc_attr( $utl_ues_settings['title_active_bg'] ) . '"'; /*----active icon --------*/ /*------------icon style---------*/ $iconoutput = ''; $newsrc = ''; $src1 = ''; $img_ext = ''; $style = ''; $css_trans = ''; $iconbgstyle = ''; if ( 'custom' == $utl_ues_settings['icon_type'] ) { if ( '' !== $utl_ues_settings['icon_img'] ) { $img = apply_filters( 'ult_get_img_single', $utl_ues_settings['icon_img'], 'url', 'large' ); $newimg = apply_filters( 'ult_get_img_single', $utl_ues_settings['new_icon_img'], 'url', 'large' ); $newsrc = $newimg; $src1 = $img; $alt = apply_filters( 'ult_get_img_single', $utl_ues_settings['icon_img'], 'alt' ); if ( 'none' !== $utl_ues_settings['icon_style'] ) { if ( '' !== $utl_ues_settings['icon_color_bg'] ) { $style .= 'background:' . $utl_ues_settings['icon_color_bg'] . ';'; } } if ( 'circle' == $utl_ues_settings['icon_style'] ) { $el_class .= ' uavc-circle '; $img_ext .= 'ult_circle '; } if ( 'square' == $utl_ues_settings['icon_style'] ) { $el_class .= ' uavc-square '; $img_ext .= 'ult_square '; } if ( 'advanced' == $utl_ues_settings['icon_style'] && '' !== $utl_ues_settings['icon_border_style'] ) { $style .= 'border-style:' . $utl_ues_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $utl_ues_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $utl_ues_settings['icon_border_size'] . 'px;'; $style .= 'padding:' . $utl_ues_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $utl_ues_settings['icon_border_radius'] . 'px;'; } if ( ! empty( $img ) ) { if ( 'center' == $utl_ues_settings['icon_align'] ) { $style .= 'display:inline-block;'; } $iconoutput .= "\n" . '
    '; // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found $iconoutput .= "\n\t" . '' . esc_attr( $alt ) . ''; $iconoutput .= "\n" . ''; } if ( ! empty( $img ) ) { $iconoutput = $iconoutput; } else { $iconoutput = ''; } } } else { if ( '' !== $utl_ues_settings['icon'] ) { if ( '' !== $utl_ues_settings['icon_color'] ) { $style .= 'color:' . $utl_ues_settings['icon_color'] . ';'; } if ( 'none' !== $utl_ues_settings['icon_style'] ) { if ( '' !== $utl_ues_settings['icon_color_bg'] ) { $style .= 'background:' . $utl_ues_settings['icon_color_bg'] . ';'; } } if ( 'advanced' == $utl_ues_settings['icon_style'] ) { $style .= 'border-style:' . $utl_ues_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $utl_ues_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $utl_ues_settings['icon_border_size'] . 'px;'; $style .= 'width:' . $utl_ues_settings['icon_border_spacing'] . 'px;'; $style .= 'height:' . $utl_ues_settings['icon_border_spacing'] . 'px;'; $style .= 'line-height:' . $utl_ues_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $utl_ues_settings['icon_border_radius'] . 'px;'; } if ( '' !== $utl_ues_settings['icon_size'] ) { $style .= 'font-size:' . $utl_ues_settings['icon_size'] . 'px;'; } if ( 'left' !== $utl_ues_settings['icon_align'] ) { $style .= 'display:inline-block;'; } if ( '' !== $utl_ues_settings['icon'] ) { $iconoutput .= "\n" . ''; $iconoutput .= "\n\t" . ''; $iconoutput .= "\n" . ''; } if ( '' !== $utl_ues_settings['icon'] && 'none' !== $utl_ues_settings['icon'] ) { $iconoutput = $iconoutput; } else { $iconoutput = ''; } } } /*----------- image replace ----------------*/ $data .= 'data-img="' . esc_url( $src1 ) . '"'; if ( '' == $newsrc ) { $newsrc = $src1; } $data .= 'data-newimg="' . esc_url( $newsrc ) . '"'; /*------------header bg style---------*/ $headerstyle = ''; if ( '' != $utl_ues_settings['text_color'] ) { $headerstyle .= 'color:' . $utl_ues_settings['text_color'] . ';'; } if ( '' != $utl_ues_settings['background_color'] ) { $headerstyle .= 'background-color:' . $utl_ues_settings['background_color'] . ';'; } if ( function_exists( 'get_ultimate_font_family' ) ) { $mhfont_family = get_ultimate_font_family( $utl_ues_settings['font_family'] ); if ( '' != $mhfont_family ) { $headerstyle .= 'font-family:' . $mhfont_family . ';'; } } if ( function_exists( 'get_ultimate_font_style' ) ) { $headerstyle .= get_ultimate_font_style( $utl_ues_settings['heading_style'] ); } if ( is_numeric( $utl_ues_settings['title_font_size'] ) ) { $utl_ues_settings['title_font_size'] = 'desktop:' . $utl_ues_settings['title_font_size'] . 'px;'; } if ( is_numeric( $utl_ues_settings['title_line_ht'] ) ) { $utl_ues_settings['title_line_ht'] = 'desktop:' . $utl_ues_settings['title_line_ht'] . 'px;'; } $ult_expandable_id = 'uvc-exp-wrap-' . wp_rand( 1000, 9999 ); $ult_expandable_args = array( 'target' => '#' . $ult_expandable_id . '', // set targeted element e.g. unique class/id etc. 'media_sizes' => array( 'font-size' => $utl_ues_settings['title_font_size'], // set 'css property' & 'ultimate_responsive' sizes. Here $utl_ues_settings['title']_responsive_font_size holds responsive font sizes from user input. 'line-height' => $utl_ues_settings['title_line_ht'], ), ); $data_list = get_ultimate_vc_responsive_media_css( $ult_expandable_args ); $headerstyle .= $utl_ues_settings['title_margin']; $headerstyle .= $utl_ues_settings['title_padding']; /*---------------title padding---------------------*/ $css_class = ''; $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $utl_ues_settings['css'], ' ' ), 'ultimate_exp_section', $atts ); $css_class = esc_attr( $css_class ); /*---------------desc padding---------------------*/ $desc_css_class = ''; $desc_css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $utl_ues_settings['cont_css'], ' ' ), 'ultimate_exp_section', $atts ); $desc_css_class = esc_attr( $desc_css_class ); /*---------------desc padding---------------------*/ $icon_css_class = ''; $icon_css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $utl_ues_settings['iconmargin_css'], ' ' ), 'ultimate_exp_section', $atts ); $icon_css_class = esc_attr( $icon_css_class ); /* --------------------- full width row settings--------------------- */ /*------------content style--------------------------*/ $cnt_style = ''; if ( '' != $utl_ues_settings['cnt_bg_color'] ) { $cnt_style .= 'background-color:' . $utl_ues_settings['cnt_bg_color'] . ';'; } $cnt_style .= $utl_ues_settings['desc_padding']; $cnt_style .= $utl_ues_settings['desc_margin']; $position = ''; if ( 'left' == $utl_ues_settings['icon_align'] ) { $position = 'ult_expleft_icon'; } if ( 'right' == $utl_ues_settings['icon_align'] ) { $position = 'ult_expright_icon'; } $top = ''; $output = ''; $icon_output = ''; $text_align = ''; if ( 'top' == $utl_ues_settings['icon_align'] ) { if ( 'custom' == $utl_ues_settings['icon_type'] ) { $text_align .= 'text-align:center;'; } else { $text_align .= 'text-align:center;'; } } $text_align .= $utl_ues_settings['icon_margin']; $headerstyle .= 'text-align:' . $utl_ues_settings['title_alignment'] . ';'; if ( '' != $iconoutput ) { $icon_output = '
    ' . $iconoutput . '
    '; } if ( empty( $iconoutput ) || ' ' == $iconoutput ) { $icon_output = ''; } $section_style = ' '; if ( ' ' !== $utl_ues_settings['section_width'] ) { $section_style = 'max-width:' . $utl_ues_settings['section_width'] . 'px;'; } $output .= '
    '; if ( 'left' == $utl_ues_settings['icon_align'] ) { $output .= '
    ' . $icon_output . '
    ' . $utl_ues_settings['title'] . '
    '; } elseif ( 'top' == $utl_ues_settings['icon_align'] ) { $output .= '
    ' . $icon_output . '
    ' . $utl_ues_settings['title'] . '
    '; } else { $output .= '
    ' . $utl_ues_settings['title'] . '
    ' . $icon_output . '
    '; } if ( '' != $content ) { $output .= '
    '; $output .= '
    '; $output .= do_shortcode( $content ); $output .= '
    '; } // $output .= '
    '; // if ( ' ' != $utl_ues_settings['title'] || ' ' != $utl_ues_settings['new_title'] ) { return $output; } } /** * For vc map check * * @since ---- * @access public */ public function ultimate_ultimate_exp_section() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Expandable Section' ), 'base' => 'ultimate_exp_section', 'icon' => 'uvc_expandable', 'class' => 'uvc_expandable', 'as_parent' => array( 'except' => 'ultimate_exp_section' ), 'category' => __( 'Ultimate VC Addons', 'ultimate_vc' ), 'description' => __( 'Add a Expandable Section.', 'ultimate_vc' ), 'content_element' => true, 'front_enqueue_css' => UAVC_URL . 'assets/css/expandable-section.css', 'front_enqueue_js' => UAVC_URL . 'assets/js/expandable-section.js', 'controls' => 'full', 'show_settings_on_create' => true, 'params' => array( // Play with icon selector. array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title ', 'ultimate_vc' ), 'param_name' => 'title', 'value' => '', ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Title After Click ', 'ultimate_vc' ), 'param_name' => 'new_title', 'value' => '', 'description' => __( 'Keep empty if you want to dispaly same title as previous.', 'ultimate_vc' ), ), /*-----------general------------*/ array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Color', 'ultimate_vc' ), 'param_name' => 'text_color', 'value' => '', 'group' => 'Color', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Background Color', 'ultimate_vc' ), 'param_name' => 'background_color', 'value' => '', 'group' => 'Color', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Hover Color', 'ultimate_vc' ), 'param_name' => 'text_hovercolor', 'value' => '', 'group' => 'Color', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Hover Background Color', 'ultimate_vc' ), 'param_name' => 'bghovercolor', 'value' => '', 'group' => 'Color', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Active Color', 'ultimate_vc' ), 'param_name' => 'title_active', 'value' => '', 'group' => 'Color', ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Title Active Background Color', 'ultimate_vc' ), 'param_name' => 'title_active_bg', 'value' => '', 'group' => 'Color', 'edit_field_class' => 'vc_col-sm-12 vc_column ult_space_border', ), /*--container bg color---*/ array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Content Background Color', 'ultimate_vc' ), 'param_name' => 'cnt_bg_color', 'value' => '', 'group' => 'Color', ), /*---icon---*/ array( 'type' => 'ult_param_heading', 'param_name' => 'btn1_icon_setting', 'text' => __( 'Icon / Image ', 'ultimate_vc' ), 'value' => '', 'class' => '', 'group' => __( 'Icon', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( 'Font Icon Manager' => 'selector', 'Custom Image Icon' => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => '', 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'btn1_icon_setting', 'text' => '', 'value' => '', 'class' => '', 'group' => __( 'Icon', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon For On Click ', 'ultimate_vc' ), 'param_name' => 'new_icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image On Click:', 'ultimate_vc' ), 'param_name' => 'new_icon_img', 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon / Image Position', 'ultimate_vc' ), 'param_name' => 'icon_align', 'value' => array( 'Bottom' => '', 'Top' => 'top', 'Left' => 'left', 'Right' => 'right', ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => '', 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Hover Color', 'ultimate_vc' ), 'param_name' => 'icon_hover_color', 'value' => '', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon Active Color', 'ultimate_vc' ), 'param_name' => 'icon_active_color', 'value' => '', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon / Image Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( 'Simple' => 'none', 'Circle Background' => 'circle', 'Square Background' => 'square', 'Design your own' => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Background Color ', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '', 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Hover Background Color ', 'ultimate_vc' ), 'param_name' => 'icon_color_hoverbg', 'value' => '', 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Active Background Color ', 'ultimate_vc' ), 'param_name' => 'icon_active_color_bg', 'value' => '', 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon / Image Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( 'Solid' => '', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Inset' => 'inset', 'Outset' => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '', 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Hover Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_hoverborder', 'value' => '', 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Icon / Image Active Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_activeborder', 'value' => '', 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon / Image Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => '', 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Icon / Image Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => '', 'min' => 1, 'max' => 100, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => '', 'min' => 2, 'max' => 100, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), 'group' => __( 'Icon', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Effect ', 'ultimate_vc' ), 'param_name' => 'exp_effect', 'value' => array( 'Slide' => '', 'Fade' => 'fadeToggle', ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'ultimate_vc' ), 'param_name' => 'extra_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Expandable Section Width Override', 'ultimate_vc' ), 'param_name' => 'map_override', 'value' => array( 'Default Width' => '0', "Apply 1st parent element's width" => '1', "Apply 2nd parent element's width" => '2', "Apply 3rd parent element's width" => '3', "Apply 4th parent element's width" => '4', "Apply 5th parent element's width" => '5', "Apply 6th parent element's width" => '6', "Apply 7th parent element's width" => '7', "Apply 8th parent element's width" => '8', "Apply 9th parent element's width" => '9', 'Full Width ' => 'full', 'Maximum Full Width' => 'ex-full', ), 'description' => __( "By default, the section will be given to the WPBakery Page Builder row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output..", 'ultimate_vc' ), 'group' => __( 'Design ', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Content Width', 'ultimate_vc' ), 'param_name' => 'section_width', 'value' => '', 'min' => 200, 'max' => 1200, 'suffix' => 'px', 'description' => __( 'Adjust width of your content. Keep empty for full width.', 'ultimate_vc' ), 'group' => __( 'Design ', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Top Gutter Position', 'ultimate_vc' ), 'param_name' => 'section_height', 'value' => '', 'min' => 0, 'max' => 1200, 'suffix' => 'px', 'description' => __( 'After click distance between viewport top & expandable section.', 'ultimate_vc' ), 'group' => __( 'Design ', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title-setting', 'text' => __( 'Title ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Title Text Alignment', 'ultimate_vc' ), 'param_name' => 'title_alignment', 'value' => array( 'Center' => 'center', 'Left' => 'left', 'Right' => 'right', ), 'description' => __( 'Select the title and icon alignment.', 'ultimate_vc' ), 'group' => __( 'Design ', 'ultimate_vc' ), ), array( 'type' => 'ultimate_spacing', 'heading' => ' Title Margin ', 'param_name' => 'title_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing from outside to titlebar.', 'ultimate_vc' ), ), array( 'type' => 'ultimate_spacing', 'heading' => ' Title Padding ', 'param_name' => 'title_padding', 'mode' => 'padding', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing from inside to titlebar.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'title-setting', 'text' => __( 'Content ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Content Margin ', 'param_name' => 'desc_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing from outside to content.', 'ultimate_vc' ), ), array( 'type' => 'ultimate_spacing', 'heading' => ' Content Padding ', 'param_name' => 'desc_padding', 'mode' => 'padding', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing from inside to content.', 'ultimate_vc' ), ), array( 'type' => 'ult_param_heading', 'param_name' => 'icn-setting', 'text' => __( 'Icon ', 'ultimate' ), 'value' => '', 'class' => '', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_spacing', 'heading' => ' Icon Margin ', 'param_name' => 'icon_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all 'positions' => array( // Also set 'defaults'. 'Top' => '', 'Right' => '', 'Bottom' => '', 'Left' => '', ), 'group' => __( 'Design ', 'ultimate_vc' ), 'description' => __( 'Add spacing to icon.', 'ultimate_vc' ), ), /*---typography-------*/ array( 'type' => 'ultimate_google_fonts', 'heading' => __( 'Title Font Family', 'ultimate_vc' ), 'param_name' => 'font_family', 'description' => __( 'Select the font of your choice. ', 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new in the collection here', 'ultimate_vc' ) . '.', 'group' => 'Typography ', ), array( 'type' => 'ultimate_google_fonts_style', 'heading' => __( 'Font Style', 'ultimate_vc' ), 'param_name' => 'heading_style', 'group' => 'Typography ', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Font size', 'ultimate_vc' ), 'param_name' => 'title_font_size', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography ', ), array( 'type' => 'ultimate_responsive', 'class' => '', 'heading' => __( 'Line Height', 'ultimate_vc' ), 'param_name' => 'title_line_ht', 'unit' => 'px', 'media' => array( 'Desktop' => '', 'Tablet' => '', 'Tablet Portrait' => '', 'Mobile Landscape' => '', 'Mobile' => '', ), 'group' => 'Typography ', ), ), 'js_view' => 'VcColumnView', ) ); } } } } if ( class_exists( 'AIO_Ultimate_Exp_Section' ) ) { $AIO_Ultimate_Exp_Section = new AIO_Ultimate_Exp_Section(); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase } if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Exp_Section' ) ) { /** * Function that initializes Ultimate Expandable section Module * * @class WPBakeryShortCode_Ultimate_Exp_Section */ class WPBakeryShortCode_Ultimate_Exp_Section extends WPBakeryShortCodesContainer { } } ultimate_content_box.php000064400000047003150212230100011471 0ustar00 'bg_color', 'bg_image' => '', 'bg_color' => '', 'bg_repeat' => 'repeat', 'bg_size' => 'cover', 'bg_position' => 'center center', 'border' => '', 'box_shadow' => '', 'box_shadow_color' => '', 'padding' => '', 'margin' => '', 'link' => '', 'hover_bg_color' => '', 'hover_border_color' => '', 'hover_box_shadow' => '', 'box_hover_shadow_color' => '', 'min_height' => '', 'el_class' => '', 'trans_property' => 'all', 'trans_duration' => '700', 'trans_function' => 'ease', 'responsive_margin' => '', ), $atts ); /* init var's */ $style = ''; $url = ''; $link_title = ''; $target = ''; $responsive_margins = ''; $normal_margins = ''; $hover = ''; $shadow = ''; $data_attr = ''; $target = ''; $link_title = ''; $rel = ''; if ( '' != $ult_cb_settings['bg_type'] ) { switch ( $ult_cb_settings['bg_type'] ) { case 'bg_color': /* background color */ if ( '' != $ult_cb_settings['bg_color'] ) { $style .= 'background-color:' . $ult_cb_settings['bg_color'] . ';'; $data_attr .= ' data-bg="' . esc_attr( $ult_cb_settings['bg_color'] ) . '" '; } if ( '' != $ult_cb_settings['hover_bg_color'] ) { $hover .= ' data-hover_bg_color="' . esc_attr( $ult_cb_settings['hover_bg_color'] ) . '" '; } break; case 'bg_image': if ( '' != $ult_cb_settings['bg_image'] ) { $img = wp_get_attachment_image_src( $ult_cb_settings['bg_image'], 'large' ); $style .= "background-image:url('" . esc_url( $img[0] ) . "');"; $style .= 'background-size: ' . esc_attr( $ult_cb_settings['bg_size'] ) . ';'; $style .= 'background-repeat: ' . esc_attr( $ult_cb_settings['bg_repeat'] ) . ';'; $style .= 'background-position: ' . esc_attr( $ult_cb_settings['bg_position'] ) . ';'; $style .= 'background-color: rgba(0, 0, 0, 0);'; } break; } } /* box shadow */ if ( '' != $ult_cb_settings['box_shadow'] ) { $style .= apply_filters( 'ultimate_getboxshadow', $ult_cb_settings['box_shadow'], 'css' ); } /* box shadow - {HOVER} */ if ( '' != $ult_cb_settings['hover_box_shadow'] ) { $data = apply_filters( 'ultimate_getboxshadow', $ult_cb_settings['hover_box_shadow'], 'data' ); if ( false !== strpos( $data, 'none' ) ) { $data = 'none'; } // Apply default box shadow. if ( false !== strpos( $data, 'inherit' ) ) { if ( '' != $ult_cb_settings['box_shadow'] ) { $data = apply_filters( 'ultimate_getboxshadow', $ult_cb_settings['box_shadow'], 'data' ); } } $hover .= ' data-hover_box_shadow="' . esc_attr( $data ) . '" '; } /* border */ if ( '' != $ult_cb_settings['border'] ) { $border_array = explode( '|', $ult_cb_settings['border'] ); $border_color = ''; foreach ( $border_array as $border_val ) { $border_value_array = explode( ':', $border_val ); if ( isset( $border_value_array[0] ) && 'border-color' === $border_value_array[0] ) { $border_color = ( isset( $border_value_array[1] ) ) ? rtrim( $border_value_array[1], ';' ) : ''; } } $temp_border = str_replace( '|', '', $ult_cb_settings['border'] ); $style .= $temp_border; $data_attr .= ' data-border_color="' . esc_attr( $border_color ) . '" '; } /* link */ if ( '' != $ult_cb_settings['link'] ) { $href = vc_build_link( $ult_cb_settings['link'] ); $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; } /* padding */ if ( '' != $ult_cb_settings['padding'] ) { $style .= $ult_cb_settings['padding']; } /* margin */ if ( '' != $ult_cb_settings['margin'] ) { $style .= $ult_cb_settings['margin']; } // HOVER. if ( '' != $ult_cb_settings['hover_border_color'] ) { $hover .= ' data-hover_border_color="' . esc_attr( $ult_cb_settings['hover_border_color'] ) . '" '; } if ( '' != $ult_cb_settings['min_height'] ) { $style .= 'min-height:' . esc_attr( $ult_cb_settings['min_height'] ) . 'px;'; } // Transition Effect. if ( '' != $ult_cb_settings['trans_property'] && '' != $ult_cb_settings['trans_duration'] && '' != $ult_cb_settings['trans_function'] ) { $style .= '-webkit-transition: ' . $ult_cb_settings['trans_property'] . ' ' . $ult_cb_settings['trans_duration'] . 'ms ' . $ult_cb_settings['trans_function'] . ';'; $style .= '-moz-transition: ' . $ult_cb_settings['trans_property'] . ' ' . $ult_cb_settings['trans_duration'] . 'ms ' . $ult_cb_settings['trans_function'] . ';'; $style .= '-ms-transition: ' . $ult_cb_settings['trans_property'] . ' ' . $ult_cb_settings['trans_duration'] . 'ms ' . $ult_cb_settings['trans_function'] . ';'; $style .= '-o-transition: ' . $ult_cb_settings['trans_property'] . ' ' . $ult_cb_settings['trans_duration'] . 'ms ' . $ult_cb_settings['trans_function'] . ';'; $style .= 'transition: ' . $ult_cb_settings['trans_property'] . ' ' . $ult_cb_settings['trans_duration'] . 'ms ' . $ult_cb_settings['trans_function'] . ';'; } /* Margins - Responsive */ if ( '' != $ult_cb_settings['responsive_margin'] ) { $responsive_margins .= ' data-responsive_margins="' . esc_attr( $ult_cb_settings['responsive_margin'] ) . '" '; } /* Margins - Normal */ if ( '' != $ult_cb_settings['margin'] ) { $normal_margins .= ' data-normal_margins="' . esc_attr( $ult_cb_settings['margin'] ) . '" '; } $output = '
    '; if ( '' != $ult_cb_settings['link'] ) { $output .= ' '; } $output .= '
    '; $output .= do_shortcode( $content ); $output .= '
    '; if ( '' != $ult_cb_settings['link'] ) { $output .= '
    '; } $output .= '
    '; return $output; } /** * For vc map check * * @since ---- * @access public */ public function ult_content_box_init() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Content Box', 'ultimate_vc' ), 'base' => 'ult_content_box', 'icon' => 'vc_icon_content_box', 'class' => 'vc_icon_content_box', 'as_parent' => array( 'except' => 'ult_content_box' ), 'controls' => 'full', 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'description' => __( 'Content Box.', 'ultimate_vc' ), 'js_view' => 'VcColumnView', 'params' => array( array( 'type' => 'dropdown', 'heading' => __( 'Background Type', 'ultimate_vc' ), 'param_name' => 'bg_type', 'value' => array( __( 'Background Color', 'ultimate_vc' ) => 'bg_color', __( 'Background Image', 'ultimate_vc' ) => 'bg_image', ), ), array( 'type' => 'colorpicker', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'bg_color', 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_color', ), ), array( 'type' => 'attach_image', 'heading' => __( 'Background Image', 'ultimate_vc' ), 'param_name' => 'bg_image', 'description' => __( 'Set background image for content box.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_image', ), ), array( 'type' => 'ultimate_border', 'heading' => __( 'Border', 'ultimate_vc' ), 'param_name' => 'border', 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'radius' => array( __( 'Top Left', 'ultimate_vc' ) => '', __( 'Top Right', 'ultimate_vc' ) => '', __( 'Bottom Right', 'ultimate_vc' ) => '', __( 'Bottom Left', 'ultimate_vc' ) => '', ), ), array( 'type' => 'ultimate_boxshadow', 'heading' => __( 'Box Shadow', 'ultimate_vc' ), 'param_name' => 'box_shadow', 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( __( 'Horizontal', 'ultimate_vc' ) => '', __( 'Vertical', 'ultimate_vc' ) => '', __( 'Blur', 'ultimate_vc' ) => '', __( 'Spread', 'ultimate_vc' ) => '', ), ), // Spacing. array( 'type' => 'ult_param_heading', 'param_name' => 'content_spacing', 'text' => __( 'Spacing', 'ultimate_vc' ), 'value' => '', 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Padding', 'ultimate_vc' ), 'param_name' => 'padding', 'mode' => 'padding', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), ), array( 'type' => 'ultimate_spacing', 'heading' => __( 'Margin', 'ultimate_vc' ), 'param_name' => 'margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), ), array( 'type' => 'vc_link', 'heading' => __( 'Content Box Link', 'ultimate_vc' ), 'param_name' => 'link', ), array( 'type' => 'number', 'heading' => __( 'Min Height', 'ultimate_vc' ), 'param_name' => 'min_height', 'suffix' => 'px', 'min' => '0', ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), // Background. array( 'type' => 'dropdown', 'heading' => __( 'Background Image Repeat', 'ultimate_vc' ), 'param_name' => 'bg_repeat', 'value' => array( __( 'Repeat', 'ultimate_vc' ) => 'repeat', __( 'Repeat X', 'ultimate_vc' ) => 'repeat-x', __( 'Repeat Y', 'ultimate_vc' ) => 'repeat-y', __( 'No Repeat', 'ultimate_vc' ) => 'no-repeat', ), 'group' => 'Background', 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_image', ), ), array( 'type' => 'dropdown', 'heading' => __( 'Background Image Size', 'ultimate_vc' ), 'param_name' => 'bg_size', 'value' => array( __( 'Cover - Image to be as large as possible', 'ultimate_vc' ) => 'cover', __( 'Contain - Image will try to fit inside the container area', 'ultimate_vc' ) => 'contain', __( 'Initial', 'ultimate_vc' ) => 'initial', ), 'group' => 'Background', 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_image', ), ), array( 'type' => 'textfield', 'heading' => __( 'Background Image Posiiton', 'ultimate_vc' ), 'param_name' => 'bg_position', 'description' => __( 'You can use any number with px, em, %, etc. Example- 100px 100px.', 'ultimate_vc' ), 'group' => 'Background', 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_image', ), ), // Hover. array( 'type' => 'colorpicker', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'hover_bg_color', 'dependency' => array( 'element' => 'bg_type', 'value' => 'bg_color', ), 'group' => 'Hover', ), array( 'type' => 'colorpicker', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'hover_border_color', 'edit_field_class' => 'vc_col-sm-12 vc_column border_ultimate_border', // Custom dependency. 'group' => 'Hover', ), array( 'type' => 'ultimate_boxshadow', 'heading' => __( 'Box Shadow', 'ultimate_vc' ), 'param_name' => 'hover_box_shadow', 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( __( 'Horizontal', 'ultimate_vc' ) => '', __( 'Vertical', 'ultimate_vc' ) => '', __( 'Blur', 'ultimate_vc' ) => '', __( 'Spread', 'ultimate_vc' ) => '', ), 'label_color' => __( 'Shadow Color', 'ultimate_vc' ), 'group' => 'Hover', ), // Effect. array( 'type' => 'ult_param_heading', 'param_name' => 'content_transition', 'text' => __( 'Transition Options', 'ultimate_vc' ), 'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12', 'group' => 'Hover', ), array( 'type' => 'dropdown', 'heading' => __( 'Transition Property', 'ultimate_vc' ), 'param_name' => 'trans_property', 'value' => array( __( 'All', 'ultimate_vc' ) => 'all', __( 'Background', 'ultimate_vc' ) => 'background', __( 'Color', 'ultimate_vc' ) => 'color', __( 'Height', 'ultimate_vc' ) => 'height', __( 'Width', 'ultimate_vc' ) => 'width', __( 'Outline', 'ultimate_vc' ) => 'outline', ), 'group' => 'Hover', ), array( 'type' => 'number', 'heading' => __( 'Duration', 'ultimate_vc' ), 'param_name' => 'trans_duration', 'suffix' => 'ms', 'min' => '0', 'value' => '', 'group' => 'Hover', ), array( 'type' => 'dropdown', 'heading' => __( 'Transition Effect', 'ultimate_vc' ), 'param_name' => 'trans_function', 'value' => array( __( 'Ease', 'ultimate_vc' ) => 'ease', __( 'Linear', 'ultimate_vc' ) => 'linear', __( 'Ease-In', 'ultimate_vc' ) => 'ease-in', __( 'Ease-Out', 'ultimate_vc' ) => 'ease-out', __( 'Ease-In-Out', 'ultimate_vc' ) => 'ease-in-out', ), 'group' => 'Hover', ), // Responsive. array( 'type' => 'ultimate_spacing', 'heading' => __( 'Margin', 'ultimate_vc' ), 'param_name' => 'responsive_margin', 'mode' => 'margin', // margin/padding. 'unit' => 'px', // [required] px,em,%,all Default all. 'positions' => array( // Also set 'defaults'. __( 'Top', 'ultimate_vc' ) => '', __( 'Right', 'ultimate_vc' ) => '', __( 'Bottom', 'ultimate_vc' ) => '', __( 'Left', 'ultimate_vc' ) => '', ), 'group' => __( 'Responsive', 'ultimate_vc' ), 'description' => __( 'This margin will apply below screen 768px.', 'ultimate_vc' ), ), ), ) ); } } /** * Function to regester scripts * * @since ---- * @access public */ public function ult_content_box_scripts() { Ultimate_VC_Addons::ultimate_register_style( 'ult_content_box_css', 'content-box' ); Ultimate_VC_Addons::ultimate_register_script( 'ult_content_box_js', 'content-box', false, array( 'jquery' ) ); } } // Finally initialize code. new Ult_Content_Box(); if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ult_Content_Box' ) ) { /** * Function that initializes Ultimate Content Box Module * * @class WPBakeryShortCode_Ult_Animation_Block */ class WPBakeryShortCode_Ult_Content_Box extends WPBakeryShortCodesContainer { } } } ultimate_sticky_section.php000064400000033271150212230100012203 0ustar00 '', 'sticky_gutter' => '', 'sticky_offset_class' => '', 'sticky_width' => '', 'sticky_custom_width' => '', 'stick_behaviour' => '', 'sticky_position' => '', 'sticky_position_lr' => 'left', 'permanent_lr' => '', 'btn_mobile' => '', 'btn_support' => '', ), $atts ); $sticky_classes_data = array(); $sticky_gutter_class = " data-sticky_gutter_class= '"; $sticky_gutter_id = " data-sticky_gutter_id= '"; $class_flag = -1; $id_flag = -1; $stick_behaviour_data = ''; $left_right_postion = ''; $data_mobile = ''; $data_support = ''; if ( 'enable' == $ult_sticky_settings['btn_mobile'] ) { $data_mobile = " data-mobile='yes'"; } else { $data_mobile = " data-mobile='no'"; } if ( 'enable' == $ult_sticky_settings['btn_support'] ) { $data_support = " data-support='yes'"; } else { $data_support = " data-support='no'"; } // gutter classes explode. if ( '' != $ult_sticky_settings['sticky_offset_class'] ) { if ( strpos( $ult_sticky_settings['sticky_offset_class'], ',' ) !== false ) { $sticky_classes_data = explode( ',', $ult_sticky_settings['sticky_offset_class'] ); foreach ( $sticky_classes_data as $data ) { if ( strpos( $data, '.' ) !== false ) { $class_flag = 0; $sticky_gutter_class .= trim( $data ); $sticky_gutter_class .= ' '; } elseif ( strpos( $data, '#' ) !== false ) { $id_flag = 0; $sticky_gutter_id .= trim( $data ); $sticky_gutter_id .= ' '; } } } else { if ( strpos( $ult_sticky_settings['sticky_offset_class'], '.' ) !== false ) { $class_flag = 0; $sticky_gutter_class .= trim( $ult_sticky_settings['sticky_offset_class'] ); } elseif ( strpos( $ult_sticky_settings['sticky_offset_class'], '#' ) !== false ) { $id_flag = 0; $sticky_gutter_id .= trim( $ult_sticky_settings['sticky_offset_class'] ); } }//checked ',' in string end else. if ( 0 != $class_flag ) { $sticky_gutter_class = ''; } else { $sticky_gutter_class = rtrim( $sticky_gutter_class ) . "'"; } if ( 0 != $id_flag ) { $sticky_gutter_id = ''; } else { $sticky_gutter_id = rtrim( $sticky_gutter_id ) . "'"; } } else { $sticky_gutter_class = ''; $sticky_gutter_id = ''; } //check sticky_offset_class end else. // width data. if ( 'customwidth' == $ult_sticky_settings['sticky_width'] ) { if ( '' != $ult_sticky_settings['sticky_custom_width'] ) { if ( strpos( $ult_sticky_settings['sticky_custom_width'], 'px' ) !== false || strpos( $ult_sticky_settings['sticky_custom_width'], 'em' ) !== false || strpos( $ult_sticky_settings['sticky_custom_width'], '%' ) !== false ) { $ult_sticky_settings['sticky_custom_width'] .= " data-sticky_customwidth= '" . esc_attr( $ult_sticky_settings['sticky_custom_width'] ); } else { $ult_sticky_settings['sticky_custom_width'] .= " data-sticky_customwidth= '" . esc_attr( $ult_sticky_settings['sticky_custom_width'] ) . 'px'; } } else { $ult_sticky_settings['sticky_custom_width'] .= " data-sticky_customwidth= '60%"; } $ult_sticky_settings['sticky_custom_width'] .= "'"; } // sticky bahviour. $stick_behaviour_data = '' != $ult_sticky_settings['stick_behaviour'] ? " data-stick_behaviour= '" . esc_attr( $ult_sticky_settings['stick_behaviour'] ) . "'" : " data-stick_behaviour= 'stick_with_scroll_row'"; // permanent data. if ( 'stick_permanent' == $ult_sticky_settings['stick_behaviour'] ) { $left_right_postion = " data-lr_position= '" . esc_attr( $ult_sticky_settings['sticky_position_lr'] ) . "' "; if ( '' != $ult_sticky_settings['permanent_lr'] ) { if ( strpos( $ult_sticky_settings['permanent_lr'], 'px' ) !== false || strpos( $ult_sticky_settings['permanent_lr'], 'em' ) !== false || strpos( $ult_sticky_settings['permanent_lr'], '%' ) !== false ) { $left_right_postion .= " data-lr_value= '" . esc_attr( $ult_sticky_settings['permanent_lr'] ); } else { $left_right_postion .= " data-lr_value= '" . esc_attr( $ult_sticky_settings['permanent_lr'] ) . 'px'; } } else { $left_right_postion .= "data-lr_value= '0"; } $left_right_postion .= "'"; } $custom_data = '' != $ult_sticky_settings['sticky_gutter'] ? " data-gutter= '" . esc_attr( $ult_sticky_settings['sticky_gutter'] ) . "'" : ''; $custom_data .= $stick_behaviour_data; $custom_data .= $left_right_postion; $custom_data .= $sticky_gutter_class . ' ' . $sticky_gutter_id; $custom_data .= '' != $ult_sticky_settings['sticky_width'] ? " data-sticky_width= '" . esc_attr( $ult_sticky_settings['sticky_width'] ) . "'" : ''; $custom_data .= $ult_sticky_settings['sticky_custom_width']; $custom_data .= '' != $ult_sticky_settings['sticky_position'] ? " data-sticky_position= '" . esc_attr( $ult_sticky_settings['sticky_position'] ) . "'" : " data-sticky_position= 'top'"; $custom_data .= $data_mobile; $custom_data .= $data_support; $output = '
    '; $output .= '
    '; $output .= '
    '; $output .= do_shortcode( $content ); $output .= '
    '; $output .= '
    '; $output .= '
    '; return $output; }//end sticky_shortcode() /** * Mapper function for Sticky Section Module. * * @method sticky_shortcode_mapper * @access public */ public function sticky_shortcode_mapper() { if ( function_exists( 'vc_map' ) ) { vc_map( array( 'name' => __( 'Sticky Section', 'ultimate_vc' ), 'base' => 'ult_sticky_section', 'icon' => 'vc_icon_sticky_section', 'class' => '', 'as_parent' => array( 'except' => 'ult_sticky_section' ), 'content_element' => true, 'controls' => 'full', 'show_settings_on_create' => true, 'category' => 'Ultimate VC Addons', 'description' => __( 'Make any elements sticky anywhere.', 'ultimate_vc' ), 'params' => array( // sticky behaviour. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Stick Behaviour', 'ultimate_vc' ), 'param_name' => 'stick_behaviour', 'value' => array( 'Stick with Row' => 'stick_with_scroll_row', 'Stick with Window' => 'stick_with_scroll', 'Stick Permanent' => 'stick_permanent', ), 'description' => __( 'Set behaviour of sticky section', 'ultimate_vc' ), ), // sticky section width. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Sticky Section Width', 'ultimate_vc' ), 'param_name' => 'sticky_width', 'value' => array( 'Default' => '', 'Full Width' => 'fullwidth', 'Custom Width' => 'customwidth', ), 'description' => __( 'Set the width of container', 'ultimate_vc' ), 'dependency' => array( 'element' => 'stick_behaviour', 'value' => array( 'stick_with_scroll', 'stick_permanent' ), ), ), // sticy section custom width. array( 'type' => 'textfield', 'heading' => __( 'Custom Width', 'ultimate_vc' ), 'param_name' => 'sticky_custom_width', 'description' => __( 'Ex : 20px, 20%, 20em', 'ultimate_vc' ), 'dependency' => array( 'element' => 'sticky_width', 'value' => 'customwidth', ), ), // sticky section position. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Sticky Section Postion Top / Bottom', 'ultimate_vc' ), 'param_name' => 'sticky_position', 'value' => array( 'Top' => '', 'Bottom' => 'bottom', ), 'description' => __( 'Set the postion of container', 'ultimate_vc' ), 'dependency' => array( 'element' => 'stick_behaviour', 'value' => array( 'stick_permanent' ), ), ), // permanent position. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Sticky Section Postion Left / Right', 'ultimate_vc' ), 'param_name' => 'sticky_position_lr', 'value' => array( 'Left' => 'left', 'Right' => 'right', ), 'description' => __( 'Default is Left : 0px ', 'ultimate_vc' ), 'dependency' => array( 'element' => 'stick_behaviour', 'value' => 'stick_permanent', ), ), array( 'type' => 'textfield', 'heading' => __( 'Value', 'ultimate_vc' ), 'param_name' => 'permanent_lr', 'description' => __( 'Ex : 20px, 20%, 20em', 'ultimate_vc' ), 'dependency' => array( 'element' => 'sticky_position_lr', 'value' => array( 'left', 'right' ), ), ), // num value. array( 'type' => 'number', 'heading' => __( 'Gutter Space', 'ultimate_vc' ), 'param_name' => 'sticky_gutter', 'suffix' => 'px', 'description' => __( 'Ex : 20', 'ultimate_vc' ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Enable on Mobile', 'ultimate_vc' ), 'param_name' => 'btn_mobile', 'value' => '', 'options' => array( 'enable' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'description' => __( 'Enable Sticky Element on Smartphone.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'stick_behaviour', 'value' => array( 'stick_with_scroll_row', 'stick_with_scroll', 'stick_permanent' ), ), ), array( 'type' => 'ult_switch', 'class' => '', 'heading' => __( 'Enable support', 'ultimate_vc' ), 'param_name' => 'btn_support', 'value' => '', 'options' => array( 'enable' => array( 'label' => '', 'on' => 'Yes', 'off' => 'No', ), ), 'description' => __( 'Enable this incase Sticky Element not working.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'stick_behaviour', 'value' => array( 'stick_with_scroll' ), ), ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'ultimate_vc' ), 'param_name' => 'el_class', 'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ), ), ), 'js_view' => 'VcColumnView', ) );// end vc_map. }//end vc_map checker. }//end sticky_shortcode_mapper() /** * Function that register styles and scripts for Sticky Section Module. * * @method ult_sticky_section_scripts */ public function ult_sticky_section_scripts() { Ultimate_VC_Addons::ultimate_register_script( 'ult_sticky_js', 'fixto', false, array( 'jquery' ), ULTIMATE_VERSION, true ); Ultimate_VC_Addons::ultimate_register_script( 'ult_sticky_section_js', 'sticky-section', false, array( 'ult_sticky_js' ), ULTIMATE_VERSION, true ); Ultimate_VC_Addons::ultimate_register_style( 'ult_sticky_section_css', 'sticky-section' ); }//end ult_sticky_section_scripts() }//end class // Instantiate the class. new Ultimate_Sticky_Section(); if ( class_exists( 'WPBakeryShortCodesContainer' ) && ! class_exists( 'WPBakeryShortCode_Ult_Sticky_Section' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ult_Sticky_Section extends WPBakeryShortCodesContainer { } } } ultimate_spacer.php000064400000012647150212230100010432 0ustar00 __( 'Spacer / Gap', 'ultimate_vc' ), 'base' => 'ultimate_spacer', 'class' => 'vc_ultimate_spacer', 'icon' => 'vc_ultimate_spacer', 'category' => 'Ultimate VC Addons', 'description' => __( 'Adjust space between components.', 'ultimate_vc' ), 'params' => array( array( 'type' => 'number', 'class' => '', 'heading' => __( " Desktop", 'ultimate_vc' ), 'param_name' => 'height', 'admin_label' => true, 'value' => 10, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Enter value in pixels', 'ultimate_vc' ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( " Tabs", 'ultimate_vc' ), 'param_name' => 'height_on_tabs', 'admin_label' => true, 'value' => '', 'min' => 1, 'max' => 500, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-3 vc_column', ), array( 'type' => 'number', 'class' => '', 'heading' => __( " Tabs", 'ultimate_vc' ), 'param_name' => 'height_on_tabs_portrait', 'admin_label' => true, 'value' => '', 'min' => 1, 'max' => 500, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-3 vc_column', ), array( 'type' => 'number', 'class' => '', 'heading' => __( " Mobile", 'ultimate_vc' ), 'param_name' => 'height_on_mob_landscape', 'admin_label' => true, 'value' => '', 'min' => 1, 'max' => 500, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-3 vc_column', ), array( 'type' => 'number', 'class' => '', 'heading' => __( " Mobile", 'ultimate_vc' ), 'param_name' => 'height_on_mob', 'admin_label' => true, 'value' => '', 'min' => 1, 'max' => 500, 'suffix' => 'px', 'edit_field_class' => 'vc_col-sm-3 vc_column', ), ), ) ); } } /** * Render function for Ultimate Spacer Module. * * @param array $atts represts module attribuits. * @access public */ public function ultimate_spacer_shortcode( $atts ) { $output = ''; $ults_settings = shortcode_atts( array( 'height' => '', 'height_on_tabs' => '', 'height_on_tabs_portrait' => '', 'height_on_mob' => '', 'height_on_mob_landscape' => '', ), $atts ); if ( '' == $ults_settings['height_on_mob'] && '' == $ults_settings['height_on_tabs'] ) { $ults_settings['height_on_mob'] = $ults_settings['height']; $ults_settings['height_on_tabs'] = $ults_settings['height']; } $style = 'clear:both;'; $style .= 'display:block;'; $uid = uniqid(); $output .= '
    '; return $output; } } // end class new Ultimate_Spacer(); if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Spacer' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Ultimate_Spacer extends WPBakeryShortCode { } } } ultimate_just_icon.php000064400000052652150212230100011152 0ustar00 __( 'Just Icon', 'ultimate_vc' ), 'base' => 'just_icon', 'class' => 'vc_simple_icon', 'icon' => 'vc_just_icon', 'category' => 'Ultimate VC Addons', 'description' => __( 'Add a simple icon and give some custom style.', 'ultimate_vc' ), 'params' => array( // Play with icon selector. array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon to display:', 'ultimate_vc' ), 'param_name' => 'icon_type', 'value' => array( __( 'Font Icon Manager', 'ultimate_vc' ) => 'selector', __( 'Custom Image Icon', 'ultimate_vc' ) => 'custom', ), 'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ), ), array( 'type' => 'icon_manager', 'class' => '', 'heading' => __( 'Select Icon ', 'ultimate_vc' ), 'param_name' => 'icon', 'value' => '', 'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . " " . __( 'add new here', 'ultimate_vc' ) . '.', 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'ult_img_single', 'class' => '', 'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ), 'param_name' => 'icon_img', 'admin_label' => true, 'value' => '', 'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Image Width', 'ultimate_vc' ), 'param_name' => 'img_width', 'value' => 48, 'min' => 16, 'max' => 512, 'suffix' => 'px', 'description' => __( 'Provide image width', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'custom' ), ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Size of Icon', 'ultimate_vc' ), 'param_name' => 'icon_size', 'value' => 32, 'min' => 12, 'max' => 72, 'suffix' => 'px', 'description' => __( 'How big would you like it?', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Color', 'ultimate_vc' ), 'param_name' => 'icon_color', 'value' => '#333333', 'description' => __( 'Give it a nice paint!', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon or Image Style', 'ultimate_vc' ), 'param_name' => 'icon_style', 'value' => array( __( 'Simple', 'ultimate_vc' ) => 'none', __( 'Circle Background', 'ultimate_vc' ) => 'circle', __( 'Square Background', 'ultimate_vc' ) => 'square', __( 'Hexagon Background', 'ultimate_vc' ) => 'hexagon', __( 'Design your own', 'ultimate_vc' ) => 'advanced', ), 'description' => __( 'We have given three quick preset if you are in a hurry. Otherwise, create your own with various options.', 'ultimate_vc' ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Background Color', 'ultimate_vc' ), 'param_name' => 'icon_color_bg', 'value' => '#ffffff', 'description' => __( 'Select background color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'circle', 'square', 'advanced', 'hexagon' ), ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Icon Border Style', 'ultimate_vc' ), 'param_name' => 'icon_border_style', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Solid', 'ultimate_vc' ) => 'solid', __( 'Dashed', 'ultimate_vc' ) => 'dashed', __( 'Dotted', 'ultimate_vc' ) => 'dotted', __( 'Double', 'ultimate_vc' ) => 'double', __( 'Inset', 'ultimate_vc' ) => 'inset', __( 'Outset', 'ultimate_vc' ) => 'outset', ), 'description' => __( 'Select the border style for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_style', 'value' => array( 'advanced' ), ), ), array( 'type' => 'colorpicker', 'class' => '', 'heading' => __( 'Border Color', 'ultimate_vc' ), 'param_name' => 'icon_color_border', 'value' => '#333333', 'description' => __( 'Select border color for icon.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Width', 'ultimate_vc' ), 'param_name' => 'icon_border_size', 'value' => 1, 'min' => 1, 'max' => 10, 'suffix' => 'px', 'description' => __( 'Thickness of the border.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Border Radius', 'ultimate_vc' ), 'param_name' => 'icon_border_radius', 'value' => 500, 'min' => 1, 'max' => 500, 'suffix' => 'px', 'description' => __( '0 pixel value will create a square border. As you increase the value, the shape convert in circle slowly. (e.g 500 pixels).', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'number', 'class' => '', 'heading' => __( 'Background Size', 'ultimate_vc' ), 'param_name' => 'icon_border_spacing', 'value' => 50, 'min' => 30, 'max' => 500, 'suffix' => 'px', 'description' => __( 'Spacing from center of the icon till the boundary of border / background', 'ultimate_vc' ), 'dependency' => array( 'element' => 'icon_border_style', 'not_empty' => true, ), ), array( 'type' => 'vc_link', 'class' => '', 'heading' => __( 'Link ', 'smile' ), 'param_name' => 'icon_link', 'value' => '', 'description' => __( 'Add a custom link or select existing page. You can remove existing link as well.', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Animation', 'ultimate_vc' ), 'param_name' => 'icon_animation', 'value' => array( __( 'No Animation', 'ultimate_vc' ) => '', __( 'Swing', 'ultimate_vc' ) => 'swing', __( 'Pulse', 'ultimate_vc' ) => 'pulse', __( 'Fade In', 'ultimate_vc' ) => 'fadeIn', __( 'Fade In Up', 'ultimate_vc' ) => 'fadeInUp', __( 'Fade In Down', 'ultimate_vc' ) => 'fadeInDown', __( 'Fade In Left', 'ultimate_vc' ) => 'fadeInLeft', __( 'Fade In Right', 'ultimate_vc' ) => 'fadeInRight', __( 'Fade In Up Long', 'ultimate_vc' ) => 'fadeInUpBig', __( 'Fade In Down Long', 'ultimate_vc' ) => 'fadeInDownBig', __( 'Fade In Left Long', 'ultimate_vc' ) => 'fadeInLeftBig', __( 'Fade In Right Long', 'ultimate_vc' ) => 'fadeInRightBig', __( 'Slide In Down', 'ultimate_vc' ) => 'slideInDown', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Slide In Left', 'ultimate_vc' ) => 'slideInLeft', __( 'Bounce In', 'ultimate_vc' ) => 'bounceIn', __( 'Bounce In Up', 'ultimate_vc' ) => 'bounceInUp', __( 'Bounce In Down', 'ultimate_vc' ) => 'bounceInDown', __( 'Bounce In Left', 'ultimate_vc' ) => 'bounceInLeft', __( 'Bounce In Right', 'ultimate_vc' ) => 'bounceInRight', __( 'Rotate In', 'ultimate_vc' ) => 'rotateIn', __( 'Light Speed In', 'ultimate_vc' ) => 'lightSpeedIn', __( 'Roll In', 'ultimate_vc' ) => 'rollIn', ), 'description' => __( 'Like CSS3 Animations? We have several options for you!', 'ultimate_vc' ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Tooltip', 'ultimate_vc' ), 'param_name' => 'tooltip_disp', 'value' => array( __( 'None', 'ultimate_vc' ) => '', __( 'Tooltip from Left', 'ultimate_vc' ) => 'left', __( 'Tooltip from Right', 'ultimate_vc' ) => 'right', __( 'Tooltip from Top', 'ultimate_vc' ) => 'top', __( 'Tooltip from Bottom', 'ultimate_vc' ) => 'bottom', ), 'description' => __( 'Select the tooltip position', 'ultimate_vc' ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Tooltip Text', 'ultimate_vc' ), 'param_name' => 'tooltip_text', 'value' => '', 'description' => __( 'Enter your tooltip text here.', 'ultimate_vc' ), 'dependency' => array( 'element' => 'tooltip_disp', 'not_empty' => true, ), ), array( 'type' => 'dropdown', 'class' => '', 'heading' => __( 'Alignment', 'ultimate_vc' ), 'param_name' => 'icon_align', 'value' => array( __( 'Center', 'ultimate_vc' ) => 'center', __( 'Left', 'ultimate_vc' ) => 'left', __( 'Right', 'ultimate_vc' ) => 'right', ), ), array( 'type' => 'textfield', 'class' => '', 'heading' => __( 'Custom CSS Class', 'ultimate_vc' ), 'param_name' => 'el_class', 'value' => '', 'description' => __( 'Ran out of options? Need more styles? Write your own CSS and mention the class name here.', 'ultimate_vc' ), ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'ultimate_vc' ), 'param_name' => 'css_just_icon', 'group' => __( 'Design ', 'ultimate_vc' ), 'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor', ), ), ) ); } } /** * Render function for Just Icon Module. * * @param array $atts represts module attribuits. * @access public */ public function just_icon_shortcode( $atts ) { $ult_just_settings = shortcode_atts( array( 'icon_type' => 'selector', 'icon' => 'none', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_link' => '', 'icon_animation' => 'none', 'tooltip_disp' => '', 'tooltip_text' => '', 'el_class' => '', 'icon_align' => 'center', 'css_just_icon' => '', ), $atts ); $is_preset = false; if ( isset( $_GET['preset'] ) ) { // PHPCS:ignore:WordPress.Security.NonceVerification.Recommended $is_preset = true; } $ult_just_settings['css_just_icon'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_just_settings['css_just_icon'], ' ' ), 'just_icon', $atts ); $ult_just_settings['css_just_icon'] = esc_attr( $ult_just_settings['css_just_icon'] ); $ultimate_js = get_option( 'ultimate_js' ); if ( '' !== $ult_just_settings['tooltip_text'] && 'enable' !== $ultimate_js ) { wp_enqueue_script( 'ultimate-tooltip' ); } $output = ''; $style = ''; $link_sufix = ''; $link_prefix = ''; $target = ''; $href = ''; $icon_align_style = ''; $css_trans = ''; $target = ''; $link_title = ''; $rel = ''; if ( trim( $ult_just_settings['icon_animation'] ) === '' ) { $ult_just_settings['icon_animation'] = 'none'; } if ( 'none' !== $ult_just_settings['icon_animation'] ) { $css_trans = 'data-animation="' . esc_attr( $ult_just_settings['icon_animation'] ) . '" data-animation-delay="03"'; } $uniqid = uniqid(); $href = vc_build_link( $ult_just_settings['icon_link'] ); if ( '' !== $ult_just_settings['icon_link'] ) { if ( null != $href['url'] ) { $url = ( isset( $href['url'] ) && '' !== $href['url'] ) ? $href['url'] : ''; $target = ( isset( $href['target'] ) && '' !== $href['target'] ) ? esc_attr( trim( $href['target'] ) ) : ''; $link_title = ( isset( $href['title'] ) && '' !== $href['title'] ) ? esc_attr( $href['title'] ) : ''; $rel = ( isset( $href['rel'] ) && '' !== $href['rel'] ) ? esc_attr( $href['rel'] ) : ''; $link_prefix .= ''; $link_sufix .= ''; } } if ( '' !== $ult_just_settings['tooltip_disp'] && '' == $link_title ) { $link_prefix .= '
    '; $link_sufix .= '
    '; } $elx_class = ''; /* position fix */ if ( 'right' == $ult_just_settings['icon_align'] ) { $icon_align_style .= 'text-align:right;'; } elseif ( 'center' == $ult_just_settings['icon_align'] ) { $icon_align_style .= 'text-align:center;'; } elseif ( 'left' == $ult_just_settings['icon_align'] ) { $icon_align_style .= 'text-align:left;'; } if ( 'custom' == $ult_just_settings['icon_type'] ) { $img = apply_filters( 'ult_get_img_single', $ult_just_settings['icon_img'], 'url' ); $alt = apply_filters( 'ult_get_img_single', $ult_just_settings['icon_img'], 'alt' ); if ( 'none' !== $ult_just_settings['icon_style'] ) { if ( '' !== $ult_just_settings['icon_color_bg'] ) { $style .= 'background:' . $ult_just_settings['icon_color_bg'] . ';'; } } if ( 'circle' == $ult_just_settings['icon_style'] ) { $elx_class .= ' uavc-circle '; } if ( 'square' == $ult_just_settings['icon_style'] ) { $elx_class .= ' uavc-square '; } if ( 'hexagon' == $ult_just_settings['icon_style'] ) { $elx_class .= ' uavc-hexagon '; $style .= 'border-color:' . $ult_just_settings['icon_color_bg'] . ';'; } if ( 'advanced' == $ult_just_settings['icon_style'] && '' !== $ult_just_settings['icon_border_style'] ) { $style .= 'border-style:' . $ult_just_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $ult_just_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $ult_just_settings['icon_border_size'] . 'px;'; $style .= 'padding:' . $ult_just_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $ult_just_settings['icon_border_radius'] . 'px;'; } if ( ! empty( $img ) ) { if ( '' == $ult_just_settings['icon_link'] || 'center' == $ult_just_settings['icon_align'] ) { $style .= 'display:inline-block;'; } $output .= "\n" . $link_prefix . '
    '; $output .= "\n\t" . '' . esc_attr( $alt ) . ''; $output .= "\n" . '
    ' . $link_sufix; } $output = $output; } else { if ( '' !== $ult_just_settings['icon_color'] ) { $style .= 'color:' . $ult_just_settings['icon_color'] . ';'; } if ( 'none' !== $ult_just_settings['icon_style'] ) { if ( '' !== $ult_just_settings['icon_color_bg'] ) { $style .= 'background:' . $ult_just_settings['icon_color_bg'] . ';'; } } if ( 'hexagon' == $ult_just_settings['icon_style'] ) { $style .= 'border-color:' . $ult_just_settings['icon_color_bg'] . ';'; } if ( 'advanced' == $ult_just_settings['icon_style'] ) { $style .= 'border-style:' . $ult_just_settings['icon_border_style'] . ';'; $style .= 'border-color:' . $ult_just_settings['icon_color_border'] . ';'; $style .= 'border-width:' . $ult_just_settings['icon_border_size'] . 'px;'; $style .= 'width:' . $ult_just_settings['icon_border_spacing'] . 'px;'; $style .= 'height:' . $ult_just_settings['icon_border_spacing'] . 'px;'; $style .= 'line-height:' . $ult_just_settings['icon_border_spacing'] . 'px;'; $style .= 'border-radius:' . $ult_just_settings['icon_border_radius'] . 'px;'; } if ( '' !== $ult_just_settings['icon_size'] ) { $style .= 'font-size:' . $ult_just_settings['icon_size'] . 'px;'; } if ( 'left' !== $ult_just_settings['icon_align'] ) { $style .= 'display:inline-block;'; } if ( '' !== $ult_just_settings['icon'] ) { $output .= "\n" . $link_prefix . '
    '; $output .= "\n\t" . ''; $output .= "\n" . '
    ' . $link_sufix; } $output = $output; } if ( '' !== $ult_just_settings['tooltip_disp'] && '' !== $ult_just_settings['tooltip_text'] ) { $output .= ''; } /* alignment fix */ if ( '' !== $icon_align_style ) { $output = '
    ' . $output . '
    '; } $output = '
    ' . $output . '
    '; if ( $is_preset ) { $text = 'array ( '; foreach ( $atts as $key => $att ) { $text .= '
    \'' . $key . '\' => \'' . $att . '\','; } if ( '' != $content ) { $text .= '
    \'content\' => \'' . $content . '\','; } $text .= '
    )'; $output .= '
    ';
    				$output .= $text;
    				$output .= '
    '; } return $output; } } } if ( class_exists( 'AIO_Just_Icon' ) ) { $aio_just_icon = new AIO_Just_Icon(); } if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Just_Icon' ) ) { /** * Function that checks if the class is exists or not. */ class WPBakeryShortCode_Just_Icon extends WPBakeryShortCode { } } ultimate_modals.php000064400000202260150212230100010424 0ustar00 'none', 'icon' => '', 'icon_img' => '', 'modal_on' => 'ult-button', 'modal_on_selector' => '', 'close_icon_position' => 'top-right', 'modal_contain' => 'ult-html', 'onload_delay' => '2', 'init_extra_class' => '', 'btn_size' => 'sm', 'overlay_bg_color' => '#333333', 'overlay_bg_opacity' => '80', 'btn_bg_color' => '#333333', 'btn_bg_hover_color' => '', 'btn_txt_color' => '#FFFFFF', 'img_close_background_color' => '', 'keypress_enable_controls' => 'keypress_controls', 'overlay_click_enable_controls' => 'overlay_click_controls', 'btn_text' => '', 'read_text' => '', 'txt_color' => '#f60f60', 'btn_img' => '', 'modal_title' => '', 'modal_size' => 'small', 'modal_style' => 'overlay-cornerbottomleft', 'content_bg_color' => '', 'content_text_color' => '', 'header_bg_color' => '', 'header_text_color' => '#333333', 'modal_on_align' => 'center', 'modal_border_style' => 'solid', 'modal_border_width' => '2', 'modal_border_color' => '#333333', 'modal_border_radius' => '0', 'el_class' => '', 'img_size' => '', 'header_typography' => '', 'header_font' => '', 'header_font_style' => '', 'header_font_size' => '', 'header_line_height' => '', 'content_font' => '', 'content_font_style' => '', 'content_font_size' => '', 'content_line_height' => '', 'trigger_text_font' => '', 'trigger_text_font_style' => '', 'trigger_text_font_size' => '', 'trigger_text_line_height' => '', 'button_text_font' => '', 'button_text_font_style' => '', 'button_text_font_size' => '', 'button_text_line_height' => '', 'ult_hide_modal' => '', 'ult_hide_modal_tablet' => '', 'ult_hide_modal_mobile' => '', 'css_modal_box' => '', ), $atts, 'ultimate_modal' ); $ult_modal_box_settings['css_modal_box'] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $ult_modal_box_settings['css_modal_box'], ' ' ), 'ultimate_modal', $atts ); $ult_modal_box_settings['css_modal_box'] = esc_attr( $ult_modal_box_settings['css_modal_box'] ); $vc_version = ( defined( 'WPB_VC_VERSION' ) ) ? WPB_VC_VERSION : 0; $is_vc_49_plus = ( version_compare( 4.9, $vc_version, '<=' ) ) ? 'ult-adjust-bottom-margin' : ''; $html = ''; $style = ''; $box_icon = ''; $modal_class = ''; $modal_data_class = ''; $uniq = ''; $overlay_bg = ''; $trigger_text_style = ''; $content_style = ''; $header_style = ''; $border_style = ''; $button_text_style = ''; if ( 'ult-button' == $ult_modal_box_settings['modal_on'] ) { $ult_modal_box_settings['modal_on'] = 'button'; } // Create style for content background color. if ( '' !== $ult_modal_box_settings['content_bg_color'] ) { $content_style .= 'background:' . $ult_modal_box_settings['content_bg_color'] . ';'; } // Create style for content text color. if ( '' !== $ult_modal_box_settings['content_text_color'] ) { $content_style .= 'color:' . $ult_modal_box_settings['content_text_color'] . ';'; } if ( '' != $ult_modal_box_settings['content_font'] ) { $font_family = get_ultimate_font_family( $ult_modal_box_settings['content_font'] ); if ( '' != $font_family ) { $content_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_modal_box_settings['content_font_style'] ) { $content_style .= get_ultimate_font_style( $ult_modal_box_settings['content_font_style'] ); } // Responsive param. if ( is_numeric( $ult_modal_box_settings['content_font_size'] ) ) { $ult_modal_box_settings['content_font_size'] = 'desktop:' . $ult_modal_box_settings['content_font_size'] . 'px;'; } if ( is_numeric( $ult_modal_box_settings['content_line_height'] ) ) { $ult_modal_box_settings['content_line_height'] = 'desktop:' . $ult_modal_box_settings['content_line_height'] . 'px;'; } $modal_uid = 'ult-modal-wrap-' . wp_rand( 0000, 9999 ); $modal_content_args = array( 'target' => '#' . $modal_uid . ' .ult_modal-body', 'media_sizes' => array( 'font-size' => $ult_modal_box_settings['content_font_size'], 'line-height' => $ult_modal_box_settings['content_line_height'], ), ); $madal_content_data_list = get_ultimate_vc_responsive_media_css( $modal_content_args ); // Create style for header background color. if ( '' !== $ult_modal_box_settings['header_bg_color'] ) { $header_style .= 'background:' . $ult_modal_box_settings['header_bg_color'] . ';'; } // Create style for header text color. if ( '' !== $ult_modal_box_settings['header_text_color'] ) { $header_style .= 'color:' . $ult_modal_box_settings['header_text_color'] . ';'; } if ( '' != $ult_modal_box_settings['header_font'] ) { $font_family = get_ultimate_font_family( $ult_modal_box_settings['header_font'] ); if ( '' != $font_family ) { $header_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_modal_box_settings['header_font_style'] ) { $header_style .= get_ultimate_font_style( $ult_modal_box_settings['header_font_style'] ); } // Responsive param. if ( is_numeric( $ult_modal_box_settings['header_font_size'] ) ) { $ult_modal_box_settings['header_font_size'] = 'desktop:' . $ult_modal_box_settings['header_font_size'] . 'px;'; } if ( is_numeric( $ult_modal_box_settings['header_line_height'] ) ) { $ult_modal_box_settings['header_line_height'] = 'desktop:' . $ult_modal_box_settings['header_line_height'] . 'px;'; } $modal_heading_args = array( 'target' => '#' . $modal_uid . ' .ult_modal-title', 'media_sizes' => array( 'font-size' => $ult_modal_box_settings['header_font_size'], 'line-height' => $ult_modal_box_settings['header_line_height'], ), ); $madal_heading_data_list = get_ultimate_vc_responsive_media_css( $modal_heading_args ); if ( '' != $ult_modal_box_settings['trigger_text_font'] ) { $font_family = get_ultimate_font_family( $ult_modal_box_settings['trigger_text_font'] ); if ( '' != $font_family ) { $trigger_text_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_modal_box_settings['trigger_text_font_style'] ) { $trigger_text_style .= get_ultimate_font_style( $ult_modal_box_settings['trigger_text_font_style'] ); } // Responsive param. if ( is_numeric( $ult_modal_box_settings['trigger_text_font_size'] ) ) { $ult_modal_box_settings['trigger_text_font_size'] = 'desktop:' . $ult_modal_box_settings['trigger_text_font_size'] . 'px;'; } if ( is_numeric( $ult_modal_box_settings['trigger_text_line_height'] ) ) { $ult_modal_box_settings['trigger_text_line_height'] = 'desktop:' . $ult_modal_box_settings['trigger_text_line_height'] . 'px;'; } $modal_trgs_id = 'modal-trg-txt-wrap-' . wp_rand( 1000, 9999 ); $modal_trg_args = array( 'target' => '#' . $modal_trgs_id . ' .mycust', 'media_sizes' => array( 'font-size' => $ult_modal_box_settings['trigger_text_font_size'], 'line-height' => $ult_modal_box_settings['trigger_text_line_height'], ), ); $madal_trg_data_list = get_ultimate_vc_responsive_media_css( $modal_trg_args ); if ( '' != $ult_modal_box_settings['button_text_font'] ) { $font_family = get_ultimate_font_family( $ult_modal_box_settings['button_text_font'] ); if ( '' != $font_family ) { $button_text_style .= 'font-family:\'' . $font_family . '\';'; } } if ( '' != $ult_modal_box_settings['button_text_font_style'] ) { $button_text_style .= get_ultimate_font_style( $ult_modal_box_settings['button_text_font_style'] ); } // Responsive param. if ( is_numeric( $ult_modal_box_settings['button_text_font_size'] ) ) { $ult_modal_box_settings['button_text_font_size'] = 'desktop:' . $ult_modal_box_settings['button_text_font_size'] . 'px;'; } if ( is_numeric( $ult_modal_box_settings['button_text_line_height'] ) ) { $ult_modal_box_settings['button_text_line_height'] = 'desktop:' . $ult_modal_box_settings['button_text_line_height'] . 'px;'; } $button_trg_args = array( 'target' => '#' . $modal_trgs_id . ' .btn-modal', 'media_sizes' => array( 'font-size' => $ult_modal_box_settings['button_text_font_size'], 'line-height' => $ult_modal_box_settings['button_text_line_height'], ), ); $button_trg_data_list = get_ultimate_vc_responsive_media_css( $button_trg_args ); if ( '' !== $ult_modal_box_settings['modal_border_style'] ) { $border_style .= 'border-style:' . $ult_modal_box_settings['modal_border_style'] . ';'; $border_style .= 'border-width:' . $ult_modal_box_settings['modal_border_width'] . 'px;'; $border_style .= 'border-radius:' . $ult_modal_box_settings['modal_border_radius'] . 'px;'; $border_style .= 'border-color:' . $ult_modal_box_settings['modal_border_color'] . ';'; $header_style .= 'border-color:' . $ult_modal_box_settings['modal_border_color'] . ';'; } $ult_modal_box_settings['overlay_bg_opacity'] = ( $ult_modal_box_settings['overlay_bg_opacity'] / 100 ); if ( '' !== $ult_modal_box_settings['overlay_bg_color'] ) { if ( strlen( $ult_modal_box_settings['overlay_bg_color'] ) <= 7 ) { $overlay_bg = ultimate_hex2rgb( $ult_modal_box_settings['overlay_bg_color'], $ult_modal_box_settings['overlay_bg_opacity'] ); } else { $overlay_bg = $ult_modal_box_settings['overlay_bg_color']; } if ( 'overlay-show-cornershape' != $ult_modal_box_settings['modal_style'] && 'overlay-show-genie' != $ult_modal_box_settings['modal_style'] && 'overlay-show-boxes' != $ult_modal_box_settings['modal_style'] ) { $overlay_bg = 'background:' . $overlay_bg . ';'; } else { $overlay_bg = 'fill:' . $overlay_bg . ';'; } } if ( 'onload' == $ult_modal_box_settings['modal_on'] && '' != $ult_modal_box_settings['ult_hide_modal_mobile'] && '' != $ult_modal_box_settings['ult_hide_modal'] ) { if ( ( ! self::uavc_is_medium_device() ) && wp_is_mobile() ) { $ult_modal_box_settings['ult_hide_modal'] = 'modal-hide-' . $ult_modal_box_settings['ult_hide_modal_mobile']; } } if ( 'onload' == $ult_modal_box_settings['modal_on'] && '' != $ult_modal_box_settings['ult_hide_modal_tablet'] && '' != $ult_modal_box_settings['ult_hide_modal'] ) { if ( self::uavc_is_medium_device() ) { $ult_modal_box_settings['ult_hide_modal'] = ' modal-hide-' . $ult_modal_box_settings['ult_hide_modal_tablet']; } } $uniq = uniqid( '', true ); $uniq = str_replace( '.', '-', $uniq ); if ( 'custom' == $ult_modal_box_settings['icon_type'] ) { $ico_img = apply_filters( 'ult_get_img_single', $ult_modal_box_settings['icon_img'], 'url' ); $ico_alt = apply_filters( 'ult_get_img_single', $ult_modal_box_settings['icon_img'], 'alt' ); $box_icon = ''; } elseif ( 'selector' == $ult_modal_box_settings['icon_type'] ) { if ( '' !== $ult_modal_box_settings['icon'] ) { $box_icon = ''; } } if ( 'overlay-show-cornershape' != $ult_modal_box_settings['modal_style'] && 'overlay-show-genie' != $ult_modal_box_settings['modal_style'] && 'overlay-show-boxes' != $ult_modal_box_settings['modal_style'] ) { $modal_class = 'overlay-show'; $modal_data_class = 'data-overlay-class="' . esc_attr( $ult_modal_box_settings['modal_style'] ) . '"'; } else { $modal_class = $ult_modal_box_settings['modal_style']; $modal_data_class = ''; } $keypress_controls = ''; $overlay_controls = ''; $keypress_controls_selector = ''; $overlay_controls_selector = ''; if ( 'keypress_controls' == $ult_modal_box_settings['keypress_enable_controls'] ) { $keypress_controls = 'data-keypress-control="keypress-control-enable"'; $keypress_controls_selector = 'keypress-control-enable'; } if ( 'overlay_click_controls' == $ult_modal_box_settings['overlay_click_enable_controls'] ) { $overlay_controls = 'data-overlay-control="overlay-control-enable"'; $overlay_controls_selector = 'overlay-control-enable'; } $html .= '
    '; if ( 'button' == $ult_modal_box_settings['modal_on'] ) { if ( '' !== $ult_modal_box_settings['btn_bg_color'] ) { $style .= 'background:' . $ult_modal_box_settings['btn_bg_color'] . ';'; $style .= 'border-color:' . $ult_modal_box_settings['btn_bg_color'] . ';'; } if ( '' !== $ult_modal_box_settings['btn_txt_color'] ) { $style .= 'color:' . $ult_modal_box_settings['btn_txt_color'] . ';'; } if ( '' != $ult_modal_box_settings['el_class'] ) { $modal_class .= ' ' . $ult_modal_box_settings['el_class'] . '-button '; } if ( '' != $ult_modal_box_settings['btn_bg_hover_color'] ) { $html .= ''; } $html .= ''; } elseif ( 'image' == $ult_modal_box_settings['modal_on'] ) { if ( '' !== $ult_modal_box_settings['btn_img'] ) { if ( '' != $ult_modal_box_settings['el_class'] ) { $modal_class .= ' ' . $ult_modal_box_settings['el_class'] . '-image '; } $img = apply_filters( 'ult_get_img_single', $ult_modal_box_settings['btn_img'], 'url' ); $btn_alt = apply_filters( 'ult_get_img_single', $ult_modal_box_settings['btn_img'], 'alt' ); $html .= '' . esc_attr( $btn_alt ) . ''; } } elseif ( 'onload' == $ult_modal_box_settings['modal_on'] ) { $html .= '
    '; } elseif ( 'custom-selector' == $ult_modal_box_settings['modal_on'] ) { $html .= ' '; } else { if ( '' !== $ult_modal_box_settings['txt_color'] ) { $style .= 'color:' . $ult_modal_box_settings['txt_color'] . ';'; $style .= 'cursor:pointer;'; } if ( '' != $ult_modal_box_settings['el_class'] ) { $modal_class .= ' ' . $ult_modal_box_settings['el_class'] . '-link '; } $html .= '' . $ult_modal_box_settings['read_text'] . ''; } $html .= '
    '; if ( 'overlay-show-cornershape' == $ult_modal_box_settings['modal_style'] ) { $html .= "\n" . '