当前位置: 首页>>代码示例>>PHP>>正文


PHP vc_shortcode_custom_css_class函数代码示例

本文整理汇总了PHP中vc_shortcode_custom_css_class函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_shortcode_custom_css_class函数的具体用法?PHP vc_shortcode_custom_css_class怎么用?PHP vc_shortcode_custom_css_class使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了vc_shortcode_custom_css_class函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => '', 'suffix' => '', 'prefix' => '', 'image' => '', 'link' => '', 'img_size' => 'thumbnail', 'align' => 'center', 'el_class' => '', 'css' => '', 'style' => '1', 'overlay' => '', 'position' => 'middle'), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'banner ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'style' => 'style' . $style, 'overlay' => 'banner-' . $overlay, 'align' => 'banner-' . $align, 'position' => 'position-' . $position);
     $banner_link = '';
     $img_id = preg_replace('/[^\\d]/', '', $image);
     $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'img-responsive'));
     if ($img == null) {
         $img['thumbnail'] = '<img class="vc_img-placeholder img-responsive" src="' . vc_asset_url('vc/no_image.png') . '" />';
     }
     $output = $img['thumbnail'];
     $suffix = $suffix ? '<p class="banner-suffix">' . $suffix . '</p>' : '';
     $prefix = $prefix ? '<p class="banner-prefix">' . $prefix . '</p>' : '';
     $output .= sprintf('<div class="banner-content">%s<h3 class="banner-title">%s</h3>%s</div>', $suffix, $title, $prefix);
     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) . '"');
         $banner_link = '<a class="banner-link" ' . implode(' ', $icon_box_link) . '></a>';
     }
     $output .= $banner_link;
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:26,代码来源:banner.php

示例2: vc_gitem_template_attribute_vcex_post_video

/**
 * Add data to the vcex_gitem_post_video shortcode
 *
 * @since 1.4.1
 */
function vc_gitem_template_attribute_vcex_post_video($value, $data)
{
    // Extract data
    extract(array_merge(array('output' => '', 'post' => null, 'data' => ''), $data));
    // Get and extract shortcode attributes
    $atts = array();
    parse_str($data, $atts);
    extract(shortcode_atts(array('post_id' => '', 'css' => ''), $atts));
    // Get post id
    $post_id = !empty($post_id) ? $post_id : $post->ID;
    // Get video
    $video = wpex_get_post_video($post_id);
    $video = $video ? wpex_get_post_video_html($video) : '';
    if ($video) {
        // Custom CSS
        if ($css) {
            $css = ' ' . vc_shortcode_custom_css_class($css);
        }
        // Generate output
        $output .= '<div class="vcex-gitem-post-video wpex-clear' . $css . '">';
        $output .= $video;
        $output .= '</div><!-- .vcex-gitem-post-video -->';
        // Return output
        return $output;
    }
}
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:post_video.php

示例3: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('name' => '', 'image' => '', 'image_size' => 'full', 'agency' => '', 'facebook_link' => '', 'twitter_link' => '', 'dribbble_link' => '', 'linkedin_link' => '', 'el_class' => '', 'css' => ''), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'team ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class));
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     $img_id = preg_replace('/[^\\d]/', '', $image);
     $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $image_size, 'class' => 'vc_single_image-img img-responsive team-avatar'));
     if ($img == null) {
         $img['thumbnail'] = '<img class="vc_img-placeholder vc_single_image-img team-avatar" src="' . vc_asset_url('vc/no_image.png') . '" />';
     }
     $output = '';
     $socials = array('<i class="fa fa-facebook"></i>' => $facebook_link, '<i class="fa fa-twitter"></i>' => $twitter_link, '<i class="fa fa-dribbble"></i>' => $dribbble_link, '<i class="fa fa-linkedin"></i>' => $linkedin_link);
     if ($name) {
         $output .= '<div class="' . $elementClass . '">';
         $output .= $img['thumbnail'];
         $output .= '<div class="team-attr">';
         $output .= '<h4 class="name">' . $name . '</h4>';
         $output .= '<div class="agency">' . $agency . '</div>';
         if ($facebook_link || $twitter_link || $dribbble_link || $linkedin_link) {
             $output .= '<ul class="clearfix">';
             foreach ($socials as $key => $value) {
                 if ($value) {
                     $output .= '<li><a href="' . $value . '">' . $key . '</a></li>';
                 }
             }
             $output .= '</ul>';
         }
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:websideas,项目名称:Mondova,代码行数:32,代码来源:team.php

示例4: content

    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('edo_vertical_menu', $atts) : $atts;
        $atts = shortcode_atts(array('title' => 'Categories', 'theme' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        ?>
         <!-- Block vertical-menu -->
        <div class="<?php 
        echo esc_attr($theme);
        ?>
">
            <div class="block block-vertical-menu <?php 
        echo esc_attr($elementClass);
        ?>
 ">
                <div class="vertical-head">
                    <h5 class="vertical-title"><?php 
        echo $title;
        ?>
</h5>
                </div>
                <div class="vertical-menu-content">
                    <?php 
        wp_nav_menu(array('menu' => 'vertical-menu', 'theme_location' => 'vertical-menu', 'depth' => 2, 'container' => '', 'container_class' => '', 'container_id' => 'vertial-menu', 'menu_class' => 'vertical-menu-list', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()));
        ?>
                </div>
            </div>
        </div>
        <!-- ./Block vertical-menu -->
        <?php 
        return ob_get_clean();
    }
开发者ID:ngocthangict,项目名称:edo,代码行数:35,代码来源:vertical-menu.php

示例5: animate_shortcode

 function animate_shortcode($atts, $content = null)
 {
     //wp_enqueue_script('ultimate-appear');
     //wp_enqueue_script('ultimate-custom');
     $output = $animation = $opacity = $opacity_start_effect = $animation_duration = $animation_delay = $animation_iteration_count = $inline_disp = $el_class = '';
     $opacity_start_effect_data = '';
     extract(shortcode_atts(array("animation" => "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($css, ' '), "ult_createlink", $atts);
     $css_class = esc_attr($css_class);
     $ultimate_animation = get_option('ultimate_animation');
     if ($ultimate_animation == "disable") {
         $mobile_opt = 'ult-no-mobile';
     }
     if ($inline_disp !== '') {
         $style .= 'display:inline-block;';
     }
     if ($opacity == "set") {
         $style .= 'opacity:0;';
         $el_class .= ' ult-animate-viewport ';
         $opacity_start_effect_data = 'data-opacity_start_effect="' . $opacity_start_effect . '"';
     }
     $inifinite_arr = array("InfiniteRotate", "InfiniteDangle", "InfiniteSwing", "InfinitePulse", "InfiniteHorizontalShake", "InfiniteBounce", "InfiniteFlash", "InfiniteTADA");
     if ($animation_iteration_count == 0 || in_array($animation, $inifinite_arr)) {
         $animation_iteration_count = 'infinite';
         $animation = 'infinite ' . $animation;
     }
     $output .= '<div class="ult-animation ' . $el_class . ' ' . $mobile_opt . ' ' . $css_class . '" data-animate="' . $animation . '" data-animation-delay="' . $animation_delay . '" data-animation-duration="' . $animation_duration . '" data-animation-iteration="' . $animation_iteration_count . '" style="' . $style . '" ' . $opacity_start_effect_data . '>';
     $output .= do_shortcode($content);
     $output .= '</div>';
     return $output;
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:32,代码来源:Ultimate_Animation.php

示例6: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('image_gallery' => '', 'image_size' => 'full', 'layout' => '', 'margin_image' => 10, 'gallery_popup' => 'true', 'image_size_popup' => 'full', 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $gallery_popup = apply_filters('kt_sanitize_boolean', $gallery_popup);
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wrapper-gallery-grid ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     $image_gallery = $image_gallery ? explode(',', $image_gallery) : array();
     $popup = $gallery_popup ? ' popup-gallery' : '';
     $lightbox_image = $output = '';
     if (count($image_gallery) > 0) {
         $output .= '<div class="' . esc_attr($elementClass) . '">';
         $output .= '<div class="gallery-grid' . $popup . '" data-popup="' . esc_attr($gallery_popup) . '" data-layout="' . esc_attr($layout) . '" data-margin="' . esc_attr($margin_image) . '">';
         foreach ($image_gallery as $attach_id) {
             if ($attach_id > 0) {
                 $image = wp_get_attachment_image_src($attach_id, $image_size);
                 if ($gallery_popup) {
                     $image_popup = wp_get_attachment_image_src($attach_id, $image_size_popup);
                     $lightbox_image = 'data-lightbox="' . $image_popup[0] . '"';
                 }
                 $output .= '<img src="' . $image[0] . '" alt="" ' . $lightbox_image . ' />';
             }
         }
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:websideas,项目名称:aquila,代码行数:28,代码来源:gallery-grid.php

示例7: TS_VCSC_Google_Trends_Function

function TS_VCSC_Google_Trends_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('trend_height' => '400', 'trend_width' => '1024', 'trend_average' => 'false', 'trend_tags' => '', 'trend_geo' => 'US', 'margin_top' => 20, 'margin_bottom' => 20, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    //format input
    $trend_height = (int) $trend_height;
    $trend_width = (int) $trend_width;
    $trend_tags = esc_attr($trend_tags);
    $trend_geo = esc_attr($trend_geo);
    $Trends_Array = explode(',', $trend_tags);
    $Trends_Count = count($Trends_Array);
    $output = '';
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Google-Trends', $atts);
    } else {
        $css_class = '';
    }
    $output .= '<div id="" class="ts-google-trend ' . $css_class . '" style="width: ' . $trend_width . 'px; height: auto; overflow: hidden; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
    if ($trend_average == "true") {
        $output .= '<script type="text/javascript" src="https://www.google.com/trends/embed.js?hl=en-US&q=' . $trend_tags . '&geo=' . $trend_geo . '&cmpt=q&content=1&cid=TIMESERIES_GRAPH_AVERAGES_CHART&export=5&w=' . $trend_width . '&h=' . $trend_height . '"></script>';
    } else {
        $output .= '<script type="text/javascript" src="https://www.google.com/trends/embed.js?hl=en-US&q=' . $trend_tags . '&geo=' . $trend_geo . '&cmpt=q&content=1&cid=TIMESERIES_GRAPH_0&export=5&w=' . $trend_width . '&h=' . $trend_height . '"></script>';
    }
    $output .= '</div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
开发者ID:Telemedellin,项目名称:fonvalmed,代码行数:30,代码来源:ts_vcsc_shortcode_google_trends.php

示例8: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'customnav' => '', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_services_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $customnav !== "true" ? $customnav = 'false' : '';
     $pagernav == "true" && $customnav == "true" ? $bxCustomNav = ' data-bxCustomNav="wt_bxNav_' . $id . '"' : ($bxCustomNav = '');
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     if ($pagernav == "true" && $customnav == "true") {
         $output .= "\n\t\t\t" . '<div id="wt_bxNav_' . $id . '" class="wt_bxslider_nav wt_services_buttons">';
         for ($i = 1; $i <= $slide_count; $i++) {
             $icon = '';
             $current = $i - 1;
             isset($atts["icon_" . $i]) && $atts["icon_" . $i] != "" ? $icon = esc_html($atts["icon_" . $i]) : '';
             $output .= '<a data-slide-index="' . $current . '" href="#" class="servicesLink"><i class="' . $icon . '"></i></a>';
         }
         $output .= "\n\t\t\t" . '</div>';
     }
     $speed = (int) $speed;
     $pause = (int) $pause;
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '" data-bx-customNav="' . $customnav . '"' . $bxCustomNav . '>';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item"><div class="wt_services_slider">';
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         $output .= "\t\t\t\t" . '</div></li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
开发者ID:panchortuzar,项目名称:revistaemprendedores-shop,代码行数:60,代码来源:wt_vcsc_services_slider.php

示例9: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'img_size' => 'thumbnail', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_testimonials_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $speed = (int) $speed;
     $pause = (int) $pause;
     $img_size = esc_html($img_size);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '">';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         $image = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         if ($atts["image_" . $i] != NULL) {
             $image = $atts["image_" . $i];
             $img_id = preg_replace('/[^\\d]/', '', $image);
             $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'wt_testimonial_image'));
         } else {
             $image = '';
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item">';
         if ($image != '') {
             $output .= "\n\t\t\t\t\t" . $img['thumbnail'];
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\t\t\t\t" . '</li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
开发者ID:panchortuzar,项目名称:revistaemprendedores-shop,代码行数:60,代码来源:wt_vcsc_testimonials_slider.php

示例10: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('image_gallery' => '', 'fullwidth' => true, 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wrapper-gallery-fullwidth ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     $image_gallery = $image_gallery ? explode(',', $image_gallery) : array();
     if ($fullwidth == 'true') {
         $class_fulwidth = ' fullwidth ';
     } else {
         $class_fulwidth = ' ';
     }
     $output = '';
     if (count($image_gallery) > 0) {
         $output .= '<div class="' . esc_attr($elementClass) . '">';
         $output .= '<div class="gallery-fullwidth' . $class_fulwidth . '">';
         foreach ($image_gallery as $attach_id) {
             if ($attach_id > 0) {
                 $image = wp_get_attachment_image_src($attach_id, 'kt_gallery_fullwidth');
                 $output .= '<img src="' . $image[0] . '" alt="" />';
             }
         }
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:websideas,项目名称:aquila,代码行数:27,代码来源:gallery_fullwidth.php

示例11: buildTemplate

 public function buildTemplate($atts, $content)
 {
     $output = array();
     $inline_css = array();
     $main_wrapper_classes = array('vc_cta3');
     $container_classes = array();
     if (!empty($atts['el_class'])) {
         $main_wrapper_classes[] = $atts['el_class'];
     }
     if (!empty($atts['style'])) {
         $main_wrapper_classes[] = 'vc_cta3-style-' . $atts['style'];
     }
     if (!empty($atts['shape'])) {
         $main_wrapper_classes[] = 'vc_cta3-shape-' . $atts['shape'];
     }
     if (!empty($atts['txt_align'])) {
         $main_wrapper_classes[] = 'vc_cta3-align-' . $atts['txt_align'];
     }
     if (!empty($atts['color']) && !(isset($atts['style']) && 'custom' === $atts['style'])) {
         $main_wrapper_classes[] = 'vc_cta3-color-' . $atts['color'];
     }
     if (isset($atts['style']) && 'custom' === $atts['style']) {
         if (!empty($atts['custom_background'])) {
             $inline_css[] = vc_get_css_color('background-color', $atts['custom_background']);
         }
     }
     if (!empty($atts['i_on_border'])) {
         $main_wrapper_classes[] = 'vc_cta3-icons-on-border';
     }
     if (!empty($atts['i_size'])) {
         $main_wrapper_classes[] = 'vc_cta3-icon-size-' . $atts['i_size'];
     }
     if (!empty($atts['i_background_style'])) {
         $main_wrapper_classes[] = 'vc_cta3-icons-in-box';
     }
     if (!empty($atts['el_width'])) {
         $container_classes[] = 'vc_cta3-size-' . $atts['el_width'];
     }
     if (!empty($atts['add_icon'])) {
         $output['icons-' . $atts['add_icon']] = $this->getVcIcon($atts);
         $main_wrapper_classes[] = 'vc_cta3-icons-' . $atts['add_icon'];
     }
     if (!empty($atts['add_button'])) {
         $output['actions-' . $atts['add_button']] = $this->getButton($atts);
         $main_wrapper_classes[] = 'vc_cta3-actions-' . $atts['add_button'];
     }
     if (!empty($atts['css_animation'])) {
         $main_wrapper_classes[] = $this->getCSSAnimation($atts['css_animation']);
     }
     if (!empty($atts['css'])) {
         $main_wrapper_classes[] = vc_shortcode_custom_css_class($atts['css']);
     }
     $output['content'] = wpb_js_remove_wpautop($content, true);
     $output['heading1'] = $this->getHeading('h2', $atts);
     $output['heading2'] = $this->getHeading('h4', $atts);
     $output['css-class'] = $main_wrapper_classes;
     $output['container-class'] = $container_classes;
     $output['inline-css'] = $inline_css;
     $this->template_vars = $output;
 }
开发者ID:severnrescue,项目名称:web,代码行数:60,代码来源:vc-cta.php

示例12: render

 public function render($atts, $content = null)
 {
     $css = '';
     extract(shortcode_atts(array('css' => ''), $atts));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '));
     $events = new WP_Query(array('post_type' => 'event', 'posts_per_page' => 4, 'order' => 'ASC', 'orderby' => 'event_when', 'meta_query' => array(array('key' => 'event_when', 'value' => current_time('timestamp'), 'compare' => '>'))));
     $output = '';
     if ($events->have_posts()) {
         $output .= '<div class="event_list_module ' . $css_class . '">';
         $output .= '<ul class="events_list clearfix">';
         while ($events->have_posts()) {
             $events->the_post();
             $output .= '<li id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class()) . '">';
             $output .= '<div class="event-content">';
             $output .= '<div class="event-date_wrapper">';
             $output .= '<div class="event_top"></div>';
             $output .= '<div class="event-date">';
             $output .= date('d', get_post_meta(get_the_ID(), 'event_when', true));
             $output .= '<span>' . date('F', get_post_meta(get_the_ID(), 'event_when', true)) . '</span>';
             $output .= '<div class="event-date-border"></div>';
             $output .= '</div>';
             $output .= '</div>';
             $output .= '<h5><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h5>';
             $output .= '<cite>' . get_post_meta(get_the_ID(), 'event_where', true) . '</cite>';
             $output .= '<a href="' . get_the_permalink() . '" class="button">' . __('More Details', STM_DOMAIN) . '</a>';
             $output .= '</div>';
             $output .= '</li>';
         }
         $output .= '</ul>';
         $output .= '</div>';
     }
     wp_reset_query();
     return $output;
 }
开发者ID:bogdandobritoiu,项目名称:aripi,代码行数:34,代码来源:coming_events.php

示例13: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('text' => __('This is custom heading', 'js_composer'), 'subtitle' => '', 'backend' => '', 'align' => 'center', 'layout' => '1', 'font_container' => '', 'use_theme_fonts' => 'yes', 'google_fonts' => '', 'font_container_subtitle' => '', 'font_container_backend' => '', 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'kt-heading ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'align' => 'text-' . $align, 'layout' => 'style' . $layout);
     $output = $style_title_css = $style_backend_css = $style_subtitle_css = '';
     $style_title = $this->getCustomStyle($atts);
     if (!empty($style_title['style'])) {
         $style_title_css = 'style="' . esc_attr(implode(';', $style_title['style'])) . '"';
     }
     $output_title = '<' . $style_title['data']['values']['tag'] . ' class="kt-heading-title" ' . $style_title_css . ' >' . $text . '</' . $style_title['data']['values']['tag'] . '>';
     $output_subtitle = '';
     if ($subtitle) {
         $atts['font_container'] = $atts['font_container_subtitle'];
         $atts['google_fonts'] = '';
         $style_subtitle = $this->getCustomStyle($atts);
         if (!empty($style_subtitle['style'])) {
             $style_subtitle_css = 'style="' . esc_attr(implode(';', $style_subtitle['style'])) . '"';
         }
         $output_subtitle = '<div class="kt-heading-subtitle" ' . $style_subtitle_css . '>' . $subtitle . '</div>';
     }
     $output_backend = '';
     if ($backend) {
         $atts['font_container'] = $atts['font_container_backend'];
         $atts['google_fonts'] = '';
         $style_backend = $this->getCustomStyle($atts);
         if (!empty($style_backend['style'])) {
             $style_backend_css = 'style="' . esc_attr(implode(';', $style_backend['style'])) . '"';
         }
         $output_backend = '<div class="kt-heading-backend" ' . $style_backend_css . '>' . $backend . '</div>';
     }
     $output .= $output_backend . $output_title . $output_subtitle;
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:35,代码来源:heading.php

示例14: TS_VCSC_Soundcloud_Function

function TS_VCSC_Soundcloud_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('url' => '', 'iframe' => 'true', 'width' => '100%', 'height' => 166, 'auto_play' => 'false', 'color' => '#ff7700', 'show_user' => 'true', 'show_artwork' => 'true', 'show_playcount' => 'true', 'show_comments' => 'true', 'show_reposts' => 'false', 'hide_related' => 'false', 'sharing' => 'true', 'download' => 'true', 'liking' => 'true', 'buying' => 'true', 'start_track' => 0, 'margin_top' => 0, 'margin_bottom' => 0, 'css' => ''), $atts));
    $output = $notice = $visible = '';
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Soundcloud', $atts);
    } else {
        $css_class = '';
    }
    $color = str_replace("#", "", $color);
    if ($iframe == 'true') {
        // Use iFrame
        $path = set_url_scheme('http://w.soundcloud.com/player?url=' . $url . '&amp;color=' . $color . '&amp;auto_play=' . $auto_play . '&amp;hide_related=' . $hide_related . '&amp;show_comments=' . $show_comments . '&amp;show_user=' . $show_user . '&amp;start_track=' . $start_track . '&amp;show_playcount=' . $show_playcount . '&amp;show_artwork=' . $show_artwork . '&amp;buying=' . $buying . '&amp;download=' . $download . '&amp;liking=' . $liking . '&amp;sharing=' . $sharing . '&amp;show_reposts=' . $show_reposts . '');
        $output .= '<div class="ts-soundcloud-iframe-container" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; width: 100%; height: 100%;">';
        //$output .= '<iframe style="width: 100%; height: ' . $height . 'px;" width="100%" height="' . $height . '" allowtransparency="true" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player?url=' . $url . '&amp;color=' . $color . '&amp;auto_play=' . $auto_play . '&amp;hide_related=' . $hide_related . '&amp;show_comments=' . $show_comments . '&amp;show_user=' . $show_user . '&amp;start_track=' . $start_track . '&amp;show_playcount=' . $show_playcount . '&amp;show_artwork=' . $show_artwork . '&amp;buying=' . $buying . '&amp;download=' . $download . '&amp;liking=' . $liking . '&amp;sharing=' . $sharing . '&amp;show_reposts=' . $show_reposts . '"></iframe>';
        $output .= '<iframe style="width: 100%; height: ' . $height . 'px;" width="100%" height="' . $height . '" allowtransparency="true" scrolling="no" frameborder="no" src="' . $path . '"></iframe>';
        $output .= '</div>';
    } else {
        // Use Flash
        $url = 'https://player.soundcloud.com/player.swf?' . http_build_query($atts);
        $output .= '<div class="ts-soundcloud-flash-container" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; width: 100%; height: 100%;">';
        $output .= '<object width="' . $width . '" height="' . $height . '">';
        $output .= '<param name="movie" value="' . $url . '"></param>';
        $output .= '<param name="allowscriptaccess" value="always"></param>';
        $output .= '<embed width="' . $width . '" height="' . $height . '" src="' . $url . '" allowscriptaccess="always" type="application/x-shockwave-flash"></embed>';
        $output .= '</object>';
        $output .= '</div>';
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
开发者ID:Telemedellin,项目名称:fonvalmed,代码行数:35,代码来源:ts_vcsc_shortcode_soundcloud.php

示例15: TS_VCSC_Background_Function

function TS_VCSC_Background_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-ytplayer');
    wp_enqueue_script('ts-extend-ytplayer');
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
        wp_enqueue_style('ts-visual-composer-extend-front');
        wp_enqueue_script('ts-visual-composer-extend-front');
    }
    extract(shortcode_atts(array('video_youtube' => '', 'video_mute' => 'true', 'video_loop' => 'false', 'video_start' => 'false', 'video_stop' => 'true', 'video_controls' => 'true', 'video_raster' => 'false', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    if (!empty($el_id)) {
        $background_id = $el_id;
    } else {
        $background_id = 'ts-vcsc-pageback-' . mt_rand(999999, 9999999);
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, '' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-YouTube-Background', $atts);
    } else {
        $css_class = '';
    }
    $output = '<div id="' . $background_id . '" class="ts-pageback-youtube ' . $css_class . ' ' . $el_class . '" data-inline="' . $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode . '" data-video="' . $video_youtube . '" data-controls="' . $video_controls . '" data-start="' . $video_start . '" data-raster="' . $video_raster . '" data-mute="' . $video_mute . '" data-loop="' . $video_loop . '"></div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
开发者ID:ryansm,项目名称:saud,代码行数:26,代码来源:ts_vcsc_shortcode_background.php


注:本文中的vc_shortcode_custom_css_class函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。