コード例 #1
0
ファイル: icon_box.php プロジェクト: websideas/Mondova
        if ($link) {
            $link = vc_build_link($link);
            $a_href = $link['url'];
            $a_title = $link['title'];
            $a_target = $link['target'];
            $icon_box_link = array('href="' . esc_attr($a_href) . '"', 'title="' . esc_attr($a_title) . '"', 'target="' . esc_attr($a_target) . '"');
            if ($title) {
                $style_link = '';
                if (isset($font_container_data['values']['color'])) {
                    $style_link .= ' style="color: ' . $font_container_data['values']['color'] . '"';
                }
                $title = '<a ' . implode(' ', $icon_box_link) . $style_link . '>' . $title . '</a>';
            }
            $icon_readmore = '<div class="feature-box-readmore"><a ' . implode(' ', $icon_box_link) . '>' . $readmore . '</a></div>';
        }
        $icon_box_title = $title ? '<' . $font_container_data['values']['tag'] . ' class="feature-box-title" ' . $style_title . '>' . $title . '</' . $font_container_data['values']['tag'] . '>' : '';
        $icon_box_content = $content ? '<div class="feature-box-content">' . $content . '</div>' : '';
        $output .= $icon_box_icon . $icon_box_title . $icon_box_content . $icon_readmore;
        if ($custom_css) {
            $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
        }
        if ($animation_delay) {
            $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div id="' . $uniqid . '" class="' . esc_attr($elementClass) . '"' . $animation_delay . '><div class="feature-box-inner">' . $output . $custom_css . '</div></div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Icon Box", 'cruxstore'), "base" => "icon_box", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "wrapper_class" => "clearfix", "params" => array_merge(array(array("type" => "textfield", 'heading' => esc_html__('Title', 'js_composer'), 'param_name' => 'title', "admin_label" => true, 'value' => esc_html__('Title', 'js_composer')), array('type' => 'vc_link', 'heading' => esc_html__('Link Url', 'js_composer'), 'param_name' => 'link'), array("type" => "textfield", 'heading' => esc_html__('Link Text', 'js_composer'), 'param_name' => 'readmore'), array("type" => "textarea_html", "heading" => esc_html__("Content", 'cruxstore'), "param_name" => "content", "value" => '', "description" => '', "holder" => "div"), array('type' => 'dropdown', 'heading' => esc_html__('Layout icon box', 'cruxstore'), 'param_name' => 'icon_box_layout', 'value' => array(esc_html__('Icon on Top of Title', 'cruxstore') => '1', esc_html__('Icon on Top of Title - Center', 'cruxstore') => '2', esc_html__('Icon in left Content', 'cruxstore') => '5', esc_html__('Boxed - Icon on Top of Title - Center', 'cruxstore') => '3', esc_html__('Border Boxed - Icon on Top of Title - Center', 'cruxstore') => '4', esc_html__('Boxed - Icon in left Content', 'cruxstore') => '6'), 'description' => esc_html__('Select your layout.', 'cruxstore'), "admin_label" => true), array('type' => 'dropdown', 'heading' => __('Background color', 'js_composer'), 'param_name' => 'boxed_background_color', 'value' => array_merge(array(esc_html__('Accent', 'cruxstore') => 'accent'), getVcShared('colors')), 'std' => 'grey', 'description' => __('Select background color for boxed.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown', 'dependency' => array('element' => 'icon_box_layout', 'value' => array('3', '4', '6'))), array('type' => 'dropdown', 'heading' => __('Border color', 'js_composer'), 'param_name' => 'boxed_border_color', 'value' => array_merge(array(esc_html__('Accent', 'cruxstore') => 'accent'), getVcShared('colors')), 'std' => 'grey', 'description' => __('Select border color for boxed.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown', 'dependency' => array('element' => 'icon_box_layout', 'value' => array('4'))), array('type' => 'dropdown', 'heading' => esc_html__('Skin icon box', 'cruxstore'), 'param_name' => 'skin', 'value' => array(esc_html__('Default', 'cruxstore') => '', esc_html__('Light', 'cruxstore') => 'light'), 'description' => esc_html__('Select your skin.', 'cruxstore')), cruxstore_map_add_css_animation(), cruxstore_map_add_css_animation_delay(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("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.", "js_composer"))), CruxStore_Icon_map(true, 'icon_'), array(array("type" => "cruxstore_number", "heading" => esc_html__("Letter spacing", 'cruxstore'), "param_name" => "letter_spacing", "value" => 0, "min" => 0, "max" => 10, "suffix" => "px", "description" => "", 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'font_container', 'param_name' => 'font_container', 'value' => '', 'settings' => array('fields' => array('tag' => 'h4', 'font_size', 'line_height', 'color', 'tag_description' => esc_html__('Select element tag.', 'js_composer'), 'text_align_description' => esc_html__('Select text alignment.', 'js_composer'), 'font_size_description' => esc_html__('Enter font size.', 'js_composer'), 'line_height_description' => esc_html__('Enter line height.', 'js_composer'), 'color_description' => esc_html__('Select heading color.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'checkbox', 'heading' => esc_html__('Use theme default font family?', 'js_composer'), 'param_name' => 'use_theme_fonts', 'value' => array(esc_html__('Yes', 'js_composer') => 'yes'), 'description' => esc_html__('Use font family from the theme.', 'js_composer'), 'group' => esc_html__('Typography', 'js_composer'), 'std' => 'yes'), array('type' => 'google_fonts', 'param_name' => 'google_fonts', 'value' => '', 'settings' => array('fields' => array('font_family_description' => esc_html__('Select font family.', 'js_composer'), 'font_style_description' => esc_html__('Select font styling.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore'), 'dependency' => array('element' => 'use_theme_fonts', 'value_not_equal_to' => 'yes'), 'description' => esc_html__('', 'js_composer')), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer'))))));
コード例 #2
0
ファイル: counter.php プロジェクト: websideas/Mondova
            wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
        }
        if (!empty($styles)) {
            $style_value .= 'style="' . esc_attr(implode(';', $styles)) . '"';
        }
        $decimals = explode('.', $to);
        $decimals_html = '';
        if (count($decimals) > 1) {
            $decimals_html = 'data-decimals="' . esc_attr(strlen($decimals[1])) . '"';
        }
        $from_attr = $from ? 'data-from="' . $from . '"' : 'data-from="0"';
        $speed = $speed ? $speed : 1;
        $counter_content = '<' . $font_container_data['values']['tag'] . ' class="counter-content" ' . $style_value . '>' . $prefix . '<span class="counter" ' . $from_attr . ' data-speed="' . intval($speed) . '"  ' . $decimals_html . ' data-to="' . esc_attr($to) . '">' . $from . '</span>' . $suffix . '</' . $font_container_data['values']['tag'] . '>';
        if ($layout == '4') {
            $algin = 'left';
        } else {
            $algin = 'center';
        }
        $counter_icon = do_shortcode('[cruxstore_icon hover_div="#' . $uniqid . ':hover .iconbox-ct" type = "' . $icon_type . '" image = "' . $icon_image . '" icon = "' . $icon_icon . '" size = "' . $icon_size . '" color = "' . $icon_color . '" custom_color = "' . $icon_custom_color . '" color_hover = "' . $icon_color_hover . '" custom_color_hover = "' . $icon_custom_color_hover . '" align="' . $algin . '"]');
        if ($layout == '3') {
            $output = $counter_content . $counter_icon . $counter_text;
        } else {
            $output = $counter_icon . $counter_content . $counter_text;
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Counter", 'cruxstore'), "base" => "counter", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array_merge(array(array("type" => "textfield", 'heading' => esc_html__('Title', 'js_composer'), 'param_name' => 'title', 'value' => esc_html__('Title', 'js_composer'), "admin_label" => true, 'description' => __('Enter text used as widget title (Note: located above content element).', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Layout icon box', 'cruxstore'), 'param_name' => 'layout', 'value' => array(esc_html__('Icon on Top of Number', 'cruxstore') => '1', esc_html__('Icon on Top of Number + Divider', 'cruxstore') => '2', esc_html__('Icon on bettween of Number and Title', 'cruxstore') => '3', esc_html__('Icon beside Number', 'cruxstore') => '4'), 'std' => 1, 'description' => esc_html__('Select your layout.', 'cruxstore'), "admin_label" => true), array("type" => "textfield", "heading" => esc_html__("Counter from", "js_composer"), "param_name" => "from", "value" => 0, "description" => esc_html__("The number to start counting from. Enter number for counter without any special character. You may enter a decimal number. Eg 10.17", 'cruxstore')), array("type" => "textfield", "heading" => __("Counter to", "js_composer"), "param_name" => "to", "admin_label" => true, "value" => 100, "description" => esc_html__("The number to stop counting at. Enter number for counter without any special character. You may enter a decimal number. Eg 10.17", 'cruxstore')), array("type" => "textfield", 'heading' => esc_html__('Counter Value prefix', 'cruxstore'), 'param_name' => 'prefix', "description" => esc_html__("Enter prefix for counter value", 'cruxstore')), array("type" => "textfield", 'heading' => esc_html__('Counter Value suffix', 'cruxstore'), 'param_name' => 'suffix', "description" => esc_html__("Enter suffix for counter value", 'cruxstore')), array("type" => "cruxstore_number", "heading" => esc_html__("Speed", 'cruxstore'), "param_name" => "speed", "value" => "2000", "suffix" => esc_html__("milliseconds", 'cruxstore'), "description" => esc_html__("The number of milliseconds it should take to finish counting", 'cruxstore')), array('type' => 'dropdown', 'heading' => esc_html__('Skin counter', 'cruxstore'), 'param_name' => 'skin', 'value' => array(esc_html__('Default', 'cruxstore') => '', esc_html__('Light', 'cruxstore') => 'light'), 'description' => esc_html__('Select your skin.', 'cruxstore')), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("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.", "js_composer")), array('type' => 'hidden', 'param_name' => 'link')), CruxStore_Icon_map(true, 'icon_', '', true), array(array("type" => "cruxstore_heading", "heading" => __("Title typography", 'cruxstore'), "param_name" => "title_typography", 'group' => __('Typography', 'cruxstore')), array('type' => 'font_container', 'param_name' => 'font_container', 'value' => '', 'settings' => array('fields' => array('font_size', 'line_height', 'color', 'tag_description' => esc_html__('Select element tag.', 'js_composer'), 'text_align_description' => esc_html__('Select text alignment.', 'js_composer'), 'font_size_description' => esc_html__('Enter font size.', 'js_composer'), 'line_height_description' => esc_html__('Enter line height.', 'js_composer'), 'color_description' => esc_html__('Select heading color.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'checkbox', 'heading' => esc_html__('Use theme default font family?', 'js_composer'), 'param_name' => 'use_theme_fonts', 'value' => array(esc_html__('Yes', 'js_composer') => 'yes'), 'description' => esc_html__('Use font family from the theme.', 'js_composer'), 'group' => esc_html__('Typography', 'js_composer'), 'std' => 'yes'), array('type' => 'google_fonts', 'param_name' => 'google_fonts', 'value' => '', 'settings' => array('fields' => array('font_family_description' => esc_html__('Select font family.', 'js_composer'), 'font_style_description' => esc_html__('Select font styling.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore'), 'dependency' => array('element' => 'use_theme_fonts', 'value_not_equal_to' => 'yes'), 'description' => esc_html__('', 'js_composer')), array("type" => "cruxstore_heading", "heading" => __("Value typography", 'cruxstore'), "param_name" => "value_typography", 'group' => __('Typography', 'cruxstore')), array('type' => 'font_container', 'param_name' => 'font_container_value', 'value' => '', 'settings' => array('fields' => array('tag' => 'h3', 'font_size', 'line_height', 'color', 'tag_description' => __('Select element tag.', 'js_composer'), 'text_align_description' => __('Select text alignment.', 'js_composer'), 'font_size_description' => __('Enter font size.', 'js_composer'), 'line_height_description' => __('Enter line height.', 'js_composer'), 'color_description' => __('Select heading color.', 'js_composer'))), 'group' => __('Typography', 'cruxstore')), array('type' => 'checkbox', 'heading' => __('Use theme default font family?', 'js_composer'), 'param_name' => 'use_theme_fonts_value', 'value' => array(__('Yes', 'js_composer') => 'yes'), 'description' => __('Use font family from the theme.', 'js_composer'), 'group' => __('Typography', 'cruxstore'), 'std' => 'yes'), array('type' => 'google_fonts', 'param_name' => 'google_fonts_value', 'value' => 'font_family:Montserrat|font_style:400%20regular%3A400%3Anormal', 'settings' => array('fields' => array('font_family_description' => __('Select font family.', 'js_composer'), 'font_style_description' => __('Select font styling.', 'js_composer'))), 'group' => __('Typography', 'cruxstore'), 'dependency' => array('element' => 'use_theme_fonts_value', 'value_not_equal_to' => 'yes')), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer'))))));
コード例 #3
0
ファイル: icon.php プロジェクト: websideas/Mondova
                $icon_style = sprintf('style="%s"', $icon_style);
            }
            if ($type == 'svg') {
                $svg = '<span class="svg-content">' . rawurldecode(base64_decode(strip_tags($svg))) . '</span>';
                $icon = 'icon-svg';
            } else {
                $svg = '';
            }
            $output = sprintf('<span class="%s %s" %s>%s</span>', $icon, implode(' ', $icon_class), $icon_style, $svg);
        }
        $url = vc_build_link($link);
        $rel = '';
        if (!empty($url['rel'])) {
            $rel = ' rel="' . esc_attr($url['rel']) . '"';
        }
        if (strlen($link) > 0 && strlen($url['url']) > 0) {
            $output = '<a class="iconbox-link" href="' . esc_attr($url['url']) . '" ' . $rel . ' title="' . esc_attr($url['title']) . '" target="' . (strlen($url['target']) > 0 ? esc_attr($url['target']) : '_self') . '">' . $output . '</a>';
        }
        if ($custom_css) {
            $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
        }
        if ($animation_delay) {
            $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div id="' . $uniqid . '" class="' . esc_attr($elementClass) . '"' . $animation_delay . '>' . $output . $custom_css . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Icon", 'cruxstore'), "base" => "cruxstore_icon", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "description" => esc_html__("", 'cruxstore'), "wrapper_class" => "clearfix", "params" => array_merge(array(array('type' => 'hidden', 'param_name' => 'hover_div'), array('type' => 'vc_link', 'heading' => esc_html__('Link Url', 'js_composer'), 'param_name' => 'link')), CruxStore_Icon_map(), array(array('type' => 'dropdown', 'heading' => esc_html__('Alignment', 'js_composer'), 'param_name' => 'align', 'value' => array(esc_html__('Center', 'js_composer') => 'center', esc_html__('Left', 'js_composer') => 'left', esc_html__('Right', 'js_composer') => "right"), 'description' => esc_html__('Select separator alignment.', 'js_composer')), cruxstore_map_add_css_animation(), cruxstore_map_add_css_animation_delay(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("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.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer'))))));