• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpb_widget_title函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: gmap

function gmap($atts, $content = null)
{
    $atts = vc_map_get_attributes('gmap', $atts);
    extract($atts);
    if ($latitude == '') {
        $latitude = '-7.796873';
    }
    if ($longitude == '') {
        $longitude = '110.369180';
    }
    if ($size == '') {
        $size = 200;
    }
    if ($zoom == '') {
        $zoom = 14;
    }
    $out = '';
    wp_enqueue_script('gmap3');
    wp_enqueue_script('googleapis');
    $size = str_replace(array('px', ' '), array('', ''), $size);
    $out .= '<div class="gmaps_widget wpb_content_element">';
    $out .= '<div class="wpb_wrapper">';
    $out .= wpb_widget_title(array('title' => $title));
    $out .= '<div id="map" data-latitude="' . $latitude . '" data-longitude="' . $longitude . '" data-zoom="' . $zoom . '" data-height="' . $size . '"></div>';
    $out .= '</div>';
    $out .= '</div>';
    return $out;
}
开发者ID:devmoonshine,项目名称:development,代码行数:28,代码来源:vc_gmap3.php


示例2: shortcode_handler

 function shortcode_handler($atts, $content = null)
 {
     if (function_exists('wpb_map')) {
         //        extract($this->getPreparedAtts($atts, $content));
         //
         //        $src = $src ? wp_get_attachment_image_src($src, $image_size) : '';
         //        $src = is_array($src) ? $src[0] : '';
         //
         //        return sprintf('<img src="%s" class="img-%s">', $src, $style);
         $output = $el_class = $image = $img_size = $img_link = $img_link_target = $img_link_large = $title = $css_animation = '';
         extract(shortcode_atts(array('title' => '', 'image' => $image, 'img_size' => 'full', 'img_link_large' => false, 'img_link' => '', 'img_link_target' => '_self', 'el_class' => '', 'css_animation' => '', 'style' => '', 'align' => 'none'), $atts));
         $img_id = preg_replace('/[^\\d]/', '', $image);
         $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size));
         if ($img == NULL) {
             $img['thumbnail'] = '<img src="http://placekitten.com/g/400/300" /> <small>' . __('This is image placeholder, edit your page to replace it.', 'adap_sc') . '</small>';
         }
         $el_class = $this->getExtraClass($el_class);
         $a_class = '';
         if ($img_link_target == 'lightbox') {
             wp_enqueue_script('prettyphoto');
             wp_enqueue_style('prettyphoto');
             $a_class = ' class="prettyphoto"';
         } elseif ($el_class != '') {
             $tmp_class = explode(" ", strtolower($el_class));
             $tmp_class = str_replace(".", "", $tmp_class);
             if (in_array("prettyphoto", $tmp_class)) {
                 wp_enqueue_script('prettyphoto');
                 wp_enqueue_style('prettyphoto');
                 $a_class = ' class="prettyphoto"';
                 $el_class = str_ireplace(" prettyphoto", "", $el_class);
             }
         }
         $link_to = '';
         if ($img_link_large == true) {
             $link_to = wp_get_attachment_image_src($img_id, 'large');
             $link_to = $link_to[0];
         } else {
             if (!empty($img_link)) {
                 $link_to = $img_link;
             }
         }
         $img['thumbnail'] = str_replace('class="', 'class="' . $style . ' ', $img['thumbnail']);
         $image_string = !empty($link_to) ? '<a' . $a_class . ' href="' . $link_to . '"' . ($img_link_target != '_self' ? ' target="' . $img_link_target . '"' : '') . '>' . $img['thumbnail'] . '</a>' : $img['thumbnail'];
         $css_class = $this->getCSSAnimation($css_animation);
         $css_class .= ' pull-' . $align;
         $output .= "\n\t" . '<div class="' . $css_class . '">';
         $output .= "\n\t\t" . '<div class="wpb_wrapper">';
         $output .= "\n\t\t\t" . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_singleimage_heading'));
         $output .= "\n\t\t\t" . $image_string;
         $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
         $output .= "\n\t" . '</div> ' . $this->endBlockComment('.wpb_single_image');
         return $output;
     } else {
         return '';
     }
 }
开发者ID:hoonio,项目名称:PhoneAfrika,代码行数:56,代码来源:image.php


示例3: content_block_vc_func

function content_block_vc_func($atts, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'id' => '', 'el_class' => ''), $atts));
    $content = wpb_js_remove_wpautop($content);
    // fix unclosed/unwanted paragraph tags in $content
    $output = '';
    $width = '';
    $output .= "\n\t" . '<div class="wpb_content_block wpb_content_element' . $width . '">';
    $output .= "\n\t\t" . '<div class="wpb_wrapper">';
    $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_content_block_heading'));
    $output .= do_shortcode("[content_block id='{$id}']");
    $output .= "\n\t\t" . '</div> ';
    $output .= "\n\t" . '</div> ';
    return $output;
}
开发者ID:Plugins-Protoarte,项目名称:vc-content-block,代码行数:15,代码来源:content-blocks.php


示例4: contentInline

 protected function contentInline($atts, $content = null)
 {
     $output = '';
     extract(shortcode_atts(array('el_class' => '', 'title' => '', 'flickr_id' => '95572727@N00', 'count' => '6', 'type' => 'user', 'display' => 'latest'), $atts));
     $el_class = $this->getExtraClass($el_class);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_flickr_widget wpb_content_element' . $el_class, $this->settings['base']);
     $output .= "\n\t" . '<div class="' . $css_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_flickr_heading'));
     $output .= "\n\t\t\t" . '<div class="vc-flickr-inline-placeholder" data-link="http://www.flickr.com/badge_code_v2.gne?count=' . $count . '&amp;display=' . $display . '&amp;size=s&amp;layout=x&amp;source=' . $type . '&amp;' . $type . '=' . $flickr_id . '"></div>';
     $output .= "\n\t\t\t" . '<p class="flickr_stream_wrap"><a class="wpb_follow_btn wpb_flickr_stream" href="http://www.flickr.com/photos/' . $flickr_id . '">' . __("View stream on flickr", "js_composer") . '</a></p>';
     $output .= "\n\t\t" . '</div>' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div>' . $this->endBlockComment('.wpb_flickr_widget') . "\n";
     return $output;
 }
开发者ID:ksingh812,项目名称:thub-old,代码行数:15,代码来源:flickr.php


示例5: content

 protected function content($atts, $content = null)
 {
     $title = $link = $size = $zoom = $type = $el_position = $width = $el_class = '';
     extract(shortcode_atts(array('title' => '', 'link' => 'https://maps.google.com/maps?q=New+York&hl=en&sll=40.686236,-73.995409&sspn=0.038009,0.078192', 'size' => 200, 'zoom' => 14, 'type' => 'm', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     if ($link == '') {
         return null;
     }
     $el_class = $this->getExtraClass($el_class);
     $width = '';
     //wpb_translateColumnWidthToSpan($width);
     $size = str_replace(array('px', ' '), array('', ''), $size);
     $output .= "\n\t" . '<div class="wpb_gmaps_widget wpb_content_element' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     //$output .= ($title != '' ) ? "\n\t\t\t".'<h2 class="wpb_heading wpb_map_heading">'.$title.'</h2>' : '';
     $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_map_heading'));
     $output .= '<div class="wpb_map_wraper"><iframe width="100%" height="' . $size . '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $link . '&amp;t=' . $type . '&amp;z=' . $zoom . '&amp;output=embed"></iframe></div>';
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:unisexx,项目名称:drtooth,代码行数:22,代码来源:media.php


示例6: unset

<?php

if (isset($atts['el_class'])) {
    $el_class = ' ' . $atts['el_class'];
    unset($atts['el_class']);
} else {
    $el_class = '';
}
if (isset($atts['title'])) {
    $title = $atts['title'];
    unset($atts['title']);
} else {
    $title = '';
}
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-portfolio wpb_content_element' . $el_class, 'om_portfolio', $atts));
$atts_str = '';
foreach ($atts as $k => $v) {
    $atts_str .= ' ' . $k . '="' . $v . '"';
}
echo '<div class="' . implode(' ', $classes) . '">';
echo wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_om_portfolio_heading'));
echo do_shortcode('[portfolio' . $atts_str . ']');
echo '</div>';
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:23,代码来源:om_portfolio.php


示例7: unset

    if (!empty($a_attrs['class'])) {
        $wrapperClass .= ' ' . $a_attrs['class'];
        unset($a_attrs['class']);
    }
    $html = '<a ' . vc_stringify_attributes($a_attrs) . ' class="' . $wrapperClass . '">' . $img['thumbnail'] . '</a>';
} else {
    $html = '<div class="' . $wrapperClass . '">' . $img['thumbnail'] . '</div>';
}
$class_to_filter = 'wpb_single_image wpb_content_element vc_align_' . $alignment . ' ' . $this->getCSSAnimation($css_animation);
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
if (in_array($source, array('media_library', 'featured_image')) && 'yes' === $add_caption) {
    $post = get_post($img_id);
    $caption = $post->post_excerpt;
} else {
    if ('external_link' === $source) {
        $add_caption = 'yes';
    }
}
if ('yes' === $add_caption && '' !== $caption) {
    $html .= '<figcaption class="vc_figure-caption">' . esc_html($caption) . '</figcaption>';
}
$output = '
	<div class="' . esc_attr(trim($css_class)) . '">
		' . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_singleimage_heading')) . '
		<figure class="wpb_wrapper vc_figure">
			' . $html . '
		</figure>
	</div>
';
echo $output;
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:vc_single_image.php


示例8: trim

$link = trim(vc_value_from_safe($link));
$bubble = $bubble !== '' && $bubble !== '0' ? '&amp;iwloc=near' : '';
$size = str_replace(array('px', ' '), array('', ''), $size);
if (is_numeric($size)) {
    $link = preg_replace('/height="[0-9]*"/', 'height="' . $size . '"', $link);
}
$class_to_filter = 'wpb_gmaps_widget wpb_content_element' . ($size === '' ? ' vc_map_responsive' : '');
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
?>
<div class="<?php 
echo esc_attr($css_class);
?>
">
<?php 
echo wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_map_heading'));
?>
	<div class="wpb_wrapper">
	<div class="wpb_map_wraper">
		<?php 
if (preg_match('/^\\<iframe/', $link)) {
    echo $link;
} else {
    // TODO: refactor or remove outdated/deprecated attributes that is not mapped in gmaps.
    echo '<iframe width="100%" height="' . $size . '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $link . '&amp;t=' . $type . '&amp;z=' . $zoom . '&amp;output=embed' . $bubble . '"></iframe>';
}
?>
	</div>
	</div>
	</div>
开发者ID:jfbelisle,项目名称:magexpress,代码行数:30,代码来源:vc_gmaps.php


示例9: apply_filters

            $iconFile = apply_filters('4k_icon_font_pack_path', $iconFile, $cssFile);
            // Fix ligature icons (these are icons that use more than 1 symbol e.g. mono social icons)
            $ligatureStyle = '';
            if ($cssFile == 'mn') {
                $ligatureStyle = '-webkit-font-feature-settings:"liga","dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga","dlig";-ms-font-feature-settings:"liga","dlig";-o-font-feature-settings:"liga","dlig";
                         	 font-feature-settings:"liga","dlig";
                        	 text-rendering:optimizeLegibility;';
            }
            $iconCode = '';
            if (!empty($tab_atts['icon'])) {
                $iconCode = $iconContents[$tab_atts['icon']];
            }
            $ret = "<style>\n            @font-face {\n            \tfont-family: '" . $cssFile . "';\n            \tsrc:url('" . $iconFile . ".eot');\n            \tsrc:url('" . $iconFile . ".eot?#iefix') format('embedded-opentype'),\n            \t\turl('" . $iconFile . ".woff') format('woff'),\n            \t\turl('" . $iconFile . ".ttf') format('truetype'),\n            \t\turl('" . $iconFile . ".svg#oi') format('svg');\n            \tfont-weight: normal;\n            \tfont-style: normal;\n            }\n            #rand_" . $tab_id . " ." . $tab_atts['icon'] . ":before { font-family: '" . $cssFile . "'; font-weight: normal; font-style: normal; }\n            #rand_" . $tab_id . " ." . $tab_atts['icon'] . ":before { content: \"" . $iconCode . "\"; {$ligatureStyle} }\n";
            $ret .= "</style>";
            // Compress styles a bit for readability
            $ret = preg_replace("/\\s?(\\{|\\})\\s?/", "\$1", preg_replace("/\\s+/", " ", str_replace("\n", "", $ret))) . "\n";
            $tabs_nav .= $ret;
            $tabs_nav .= '<li class="tabli" id="rand_' . $tab_id . '"><a href="#tab-' . (isset($tab_atts['tab_id']) ? $tab_atts['tab_id'] : sanitize_title($tab_atts['title'])) . '"><i class="' . $tab_atts['icon'] . '"></i>' . $tab_atts['title'] . '</a></li>';
        } else {
            $tabs_nav .= '<li class="tabli"><a href="#tab-' . (isset($tab_atts['tab_id']) ? $tab_atts['tab_id'] : sanitize_title($tab_atts['title'])) . '">' . $tab_atts['title'] . '</a></li>';
        }
    }
}
$tabs_nav .= '</ul>' . "\n";
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, trim($element . ' wpb_content_element ' . $el_class), $this->settings['base'], $atts);
$output .= wpb_widget_title(array('title' => $title, 'extraclass' => $element . '_heading'));
$output .= "\n\t\t\t" . $tabs_nav;
$output .= "<div class='tab-box tabs-container'>";
$output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
$output .= "</div></div></div>";
echo !empty($output) ? $output : '';
开发者ID:axelander95,项目名称:wsguiavirtualpichincha,代码行数:31,代码来源:vc_tabs.php


示例10: apply_filters

$li_span_class = $this->spanClass($grid_columns_count);
$css_class = 'wpb_row wpb_teaser_grid wpb_content_element ' . $this->getMainCssClass($filter) . ' columns_count_' . $grid_columns_count . ' columns_count_' . $grid_columns_count . ' ' . $post_types_teasers;
// Css classes by selected post types
$class_to_filter = $css_class;
$class_to_filter .= $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
$this->setLinkTarget($grid_link_target);
?>
	<div
		class="<?php 
echo esc_attr(trim($css_class));
?>
">
		<div class="wpb_wrapper">
			<?php 
echo wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_teaser_grid_heading'));
?>
			<div class="teaser_grid_container">
				<?php 
if ('yes' === $filter && !empty($this->filter_categories)) {
    $categories_array = $this->getFilterCategories();
    echo '<ul class="categories_filter vc_col-sm-12 vc_clearfix">' . '<li class="active"><a href="#" data-filter="*">';
    _e('All', 'js_composer');
    echo '</a></li>';
    foreach ($this->getFilterCategories() as $cat) {
        echo '<li><a href="#"' . ' data-filter=".grid-cat-<?php echo $cat->term_id ?>">' . esc_attr($cat->name) . '</a></li>';
    }
    echo '</ul>';
    ?>
					<div class="vc_clearfix"></div>
				<?php 
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:vc_posts_grid.php


示例11: vc_map_get_attributes

 * @var $show_bg
 * @var $sidebar_id
 * Shortcode class
 * @var $this WPBakeryShortCode_VC_Widget_sidebar
 */
$title = $el_class = $sidebar_id = $show_bg = '';
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
if ('' === $sidebar_id) {
    return null;
}
$el_class = $this->getExtraClass($el_class);
if ('true' === $show_bg) {
    $el_class .= ' solid-bg';
}
ob_start();
dynamic_sidebar($sidebar_id);
$sidebar_value = ob_get_contents();
ob_end_clean();
$sidebar_value = trim($sidebar_value);
$sidebar_value = '<li' === substr($sidebar_value, 0, 3) ? '<ul>' . $sidebar_value . '</ul>' : $sidebar_value;
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_widgetised_column wpb_content_element sidebar-content' . $el_class, $this->settings['base'], $atts);
$output = '
	<div class="' . esc_attr($css_class) . '">
		<div class="wpb_wrapper">
			' . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_widgetised_column_heading')) . '
			' . $sidebar_value . '
		</div>
	</div>
';
echo $output;
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:vc_widget_sidebar.php


示例12: vc_theme_vc_video

        function vc_theme_vc_video($atts)
        {
            $output = $title = $link = $size = $el_class = $img_src = '';
            extract(shortcode_atts(array('title' => '', 'link' => 'http://vimeo.com/23237102', 'size' => isset($content_width) ? $content_width : 500, 'popup' => 'no', 'img' => '', 'img_size' => '300x200', 'el_class' => '', 'css' => ''), $atts));
            if ($link == '') {
                return null;
            }
            $src = '';
            if ($popup == 'yes') {
                $img_size = explode('x', $img_size);
                $width = $img_size[0];
                $height = $img_size[1];
                if ($img != '') {
                    $src = etheme_get_image($img, $width, $height);
                } elseif ($img_src != '') {
                    $src = do_shortcode($img_src);
                }
                $text = __('Show video', ETHEME_DOMAIN);
                if ($src != '') {
                    $text = '<img src="' . $src . '">';
                }
            }
            $video_w = isset($content_width) ? $content_width : 500;
            $video_h = $video_w / 1.61;
            //1.61 golden ratio
            global $wp_embed;
            $embed = $wp_embed->run_shortcode('[embed width="' . $video_w . '"' . $video_h . ']' . $link . '[/embed]');
            $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_video_widget wpb_content_element' . $el_class . $el_class . vc_shortcode_custom_css_class($css, ' '), 'vc_video');
            $rand = rand(1000, 9999);
            $css_class .= ' video-' . $rand;
            $output .= "\n\t" . '<div class="' . $css_class . '">';
            $output .= "\n\t\t" . '<div class="wpb_wrapper">';
            $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_video_heading'));
            if ($popup == 'yes') {
                $output .= '<a href="#" class="open-video-popup">' . $text . '</a>';
                $output .= "\n\t" . '<script type="text/javascript">';
                $output .= "\n\t\t" . 'jQuery(document).ready(function() {
						    jQuery(".video-' . $rand . ' .open-video-popup").magnificPopup({
							    items: [
							      {
							        src: "' . $link . '",
							        type: "iframe" 
							      },
							    ],
						    });
					    });';
                $output .= "\n\t" . '</script> ';
            } else {
                $output .= '<div class="wpb_video_wrapper">' . $embed . '</div>';
            }
            $output .= "\n\t\t" . '</div> ';
            $output .= "\n\t" . '</div> ';
            return $output;
        }
开发者ID:EmmaTope,项目名称:gadafunds,代码行数:54,代码来源:vc.php


示例13: wp_enqueue_script

    if (in_array("prettyphoto", $tmp_class)) {
        wp_enqueue_script('prettyphoto');
        wp_enqueue_style('prettyphoto');
        $a_class = ' class="prettyphoto"';
        $el_class = str_ireplace(" prettyphoto", "", $el_class);
    }
}
$link_to = '';
if ($img_link_large == true) {
    $link_to = wp_get_attachment_image_src($img_id, 'large');
    $link_to = $link_to[0];
} else {
    if (!empty($img_link)) {
        $link_to = $img_link;
    }
}
if (!empty($link_to) && !preg_match('/^(https?\\:\\/\\/|\\/\\/)/', $link_to)) {
    $link_to = 'http://' . $link_to;
}
$img_output = $style == 'vc_box_shadow_3d' ? '<span class="vc_box_shadow_3d_wrap">' . $img['thumbnail'] . '</span>' : $img['thumbnail'];
$image_string = !empty($link_to) ? '<a' . $a_class . ' href="' . $link_to . '"' . ($img_link_target != '_self' ? ' target="' . $img_link_target . '"' : '') . '>' . $img_output . '</a>' : $img_output;
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_single_image wpb_content_element' . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
$css_class .= $this->getCSSAnimation($css_animation);
$css_class .= ' vc_align_' . $alignment;
$output .= "\n\t" . '<div class="' . $css_class . '">';
$output .= "\n\t\t" . '<div class="wpb_wrapper">';
$output .= "\n\t\t\t" . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_singleimage_heading'));
$output .= "\n\t\t\t" . $image_string;
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment('.wpb_single_image');
echo $output;
开发者ID:apeachdev,项目名称:eyeboutique,代码行数:31,代码来源:vc_single_image.php


示例14: implode

	    pointHighlightFill: "#fff",
	    pointHighlightStroke: "rgba(220,220,220,1)",
	    data: [' . implode(',', $values) . ']
		}';
    } else {
        $color_a[3] = 0.8;
        $data_[] = '{
			label: "' . esc_js($set[0]) . '",
			color: "' . om_rgba2string($color) . '",
	    highlight: "' . om_rgba2string($color_a) . '",
	    value: ' . $values[0] . '
		}';
    }
}
echo '<div class="' . implode(' ', $classes) . '"' . (!empty($styles) ? ' style="' . implode(';', $styles) . '"' : '') . '>';
echo wpb_widget_title(array('title' => $title, 'extraclass' => 'vc_om-chart_heading'));
echo '<canvas id="' . $id . '" width="' . $width . '" height="' . $height . '"></canvas>';
echo '<script>';
$side_color = $labels_color ? $labels_color : get_option(OM_THEME_PREFIX . 'side_text_color');
$lines_color = om_parse2rgba($side_color);
$grid_color = $lines_color;
$backdrop_color = $lines_color;
$lines_color[3] = 0.25;
$lines_color = om_rgba2string($lines_color);
$grid_color[3] = 0.12;
$grid_color = om_rgba2string($grid_color);
$backdrop_color = om_rgb2hsl($backdrop_color);
if ($backdrop_color[2] <= 0.7) {
    $backdrop_color[2] += 0.5;
} else {
    $backdrop_color[2] -= 0.5;
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:om_chart.php


示例15: content

 protected function content($atts, $content = null)
 {
     $el_position = $title = $width = $el_class = $sidebar_id = '';
     extract(shortcode_atts(array('el_position' => '', 'title' => '', 'width' => '1/1', 'el_class' => '', 'sidebar_id' => '', 'top_margin' => 'none'), $atts));
     if ($sidebar_id == '') {
         return null;
     }
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = '';
     //wpb_translateColumnWidthToSpan($width);
     ob_start();
     dynamic_sidebar($sidebar_id);
     $sidebar_value = ob_get_contents();
     ob_end_clean();
     $sidebar_value = trim($sidebar_value);
     $sidebar_value = substr($sidebar_value, 0, 3) == '<li' ? '<ul>' . $sidebar_value . '</ul>' : $sidebar_value;
     //
     $output .= "\n\t" . '<div class="wpb_widgetised_column wpb_content_element clearfix' . $width . $el_class . ($top_margin != "none" ? ' ' . $top_margin : '') . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     //$output .= ($title != '' ) ? "\n\t\t\t".'<h2 class="wpb_heading wpb_widgetised_column_heading">'.$title.'</h2>' : '';
     $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_widgetised_column_heading'));
     $output .= "\n\t\t\t" . $sidebar_value;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:unisexx,项目名称:drtooth,代码行数:29,代码来源:default.php


示例16: array

$tab_titles = array();
/**
 * vc_tabs
 *
 */
if (isset($matches[1])) {
    $tab_titles = $matches[1];
}
$tabs_nav = '';
$tabs_nav .= '<ul class="wpb_tabs_nav ui-tabs-nav vc_clearfix">';
foreach ($tab_titles as $tab) {
    $tab_atts = shortcode_parse_atts($tab[0]);
    if (isset($tab_atts['title'])) {
        $tabs_nav .= '<li><a href="#tab-' . (isset($tab_atts['tab_id']) ? $tab_atts['tab_id'] : sanitize_title($tab_atts['title'])) . '">' . $tab_atts['title'] . '</a></li>';
    }
}
$tabs_nav .= '</ul>';
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, trim($element . ' wpb_content_element ' . $el_class), $this->settings['base'], $atts);
if ('vc_tour' === $this->shortcode) {
    $next_prev_nav = '<div class="wpb_tour_next_prev_nav vc_clearfix"> <span class="wpb_prev_slide"><a href="#prev" title="' . __('Previous tab', 'js_composer') . '">' . __('Previous tab', 'js_composer') . '</a></span> <span class="wpb_next_slide"><a href="#next" title="' . __('Next tab', 'js_composer') . '">' . __('Next tab', 'js_composer') . '</a></span></div>';
} else {
    $next_prev_nav = '';
}
$output = '
	<div class="' . $css_class . '" data-interval="' . $interval . '">
		<div class="wpb_wrapper wpb_tour_tabs_wrapper ui-tabs vc_clearfix">
			' . wpb_widget_title(array('title' => $title, 'extraclass' => $element . '_heading')) . $tabs_nav . wpb_js_remove_wpautop($content) . $next_prev_nav . '
		</div>
	</div>
';
echo $output;
开发者ID:hikaram,项目名称:wee,代码行数:31,代码来源:vc_tabs.php


示例17: uniqid

    $subtitle = '<p class="single-line">' . $subtitle . '</p>';
}
$count = 1;
$accordionID = uniqid('accordion-');
while (($letter_pos = strpos($content, '[vc_accordion_tab')) !== false) {
    if ($group_panels !== 'false') {
        if ($active_tab == $count) {
            $replaceText = '[panel parent="' . $accordionID . '" active="true"';
        } else {
            $replaceText = '[panel parent="' . $accordionID . '"';
        }
    } else {
        if ($active_tab == $count) {
            $replaceText = '[panel active="true"';
        } else {
            $replaceText = '[panel';
        }
    }
    $replaceTextCount = strlen('[vc_accordion_tab');
    $count++;
    $content = substr_replace($content, $replaceText, $letter_pos, $replaceTextCount);
}
$content = str_replace('[panel', '[vc_accordion_tab', $content);
$el_class = $this->getExtraClass($el_class);
$panel_class = !empty($accordion_style) ? $accordion_style : 'style-1';
$output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'accordion-title-' . $accordion_style));
$output .= "\n\t\t" . $subtitle;
$output .= "\n\t\t\t" . '<div id="' . $accordionID . '" class="panel-group-faq ' . $panel_class . ' panel-group">';
$output .= "\n\t\t\t\t" . wpb_js_remove_wpautop($content);
$output .= "\n\t\t\t" . '</div> ' . $this->endBlockComment('.panel-group');
echo $output;
开发者ID:Qualitair,项目名称:ecommerce,代码行数:31,代码来源:vc_accordion.php


示例18: portfolio

function portfolio($atts, $content = null)
{
    $atts = vc_map_get_attributes('portfolio', $atts);
    extract($atts);
    wp_enqueue_script('isotop');
    $out = $sidebar = $isotope = $grid = $width = $height = $thumb = $with_title = $mediatitle = $args = $my_query = $portfolio_taxs = $without_padding = $cats_array = '';
    global $paged;
    if ($cats) {
        $cats_array = explode(",", $cats);
        $args = array('post_type' => 'portfolio', 'posts_per_page' => $number, 'paged' => $paged, 'tax_query' => array(array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $cats_array)));
    } else {
        $args = array('post_type' => 'portfolio', 'posts_per_page' => $number, 'paged' => $paged);
    }
    $my_query = new WP_Query($args);
    if ($pagination != 'yes' && $filters == 'yes') {
        if (is_array($my_query->posts) && !empty($my_query->posts)) {
            foreach ($my_query->posts as $my_post) {
                $post_taxs = wp_get_post_terms($my_post->ID, 'portfolio_category', array("fields" => "all"));
                if (is_array($post_taxs) && !empty($post_taxs)) {
                    foreach ($post_taxs as $post_tax) {
                        if (is_array($cats_array) && !empty($cats_array) && (in_array($post_tax->term_id, $cats_array) || in_array($post_tax->parent, $cats_array))) {
                            $portfolio_taxs[urldecode($post_tax->slug)] = $post_tax->name;
                        }
                        if (empty($cats_array) || !isset($cats_array)) {
                            $portfolio_taxs[urldecode($post_tax->slug)] = $post_tax->name;
                        }
                    }
                }
            }
        }
        $all_terms = get_terms('portfolio_category');
        if (!empty($all_terms) && is_array($all_terms)) {
            foreach ($all_terms as $term) {
                if ($portfolio_taxs[urldecode($term->slug)]) {
                    $sorted_taxs[urldecode($term->slug)] = $term->name;
                }
            }
        }
        $portfolio_taxs = $sorted_taxs;
        $portfolio_category = get_terms('portfolio_category');
    }
    if ($layout_mode == 'masonry') {
        $isotope = ' data-layout-mode="masonry"';
        $width = 515;
        $height = 9999;
        $thumb = 'portfolio_masonry';
    } else {
        $isotope = ' data-layout-mode="fitRows"';
        $width = 515;
        $height = 339;
        $thumb = 'portfolio';
    }
    if ($column == '2') {
        $grid = 'grid_6';
    } else {
        if ($column == '3') {
            $grid = 'grid_4';
        } else {
            $grid = 'grid_3';
        }
    }
    if ($desc != 'yes') {
        $with_title = 'with_title';
    } else {
        $mediatitle = ' no_title_thumb';
    }
    if ($padding == 'yes') {
        $without_padding = ' nospace';
    }
    $out .= '<div class="wpb_content_element portfolios_wrap column_' . $column . '">';
    $out .= wpb_widget_title(array('title' => $title));
    $out .= '<div class="posts_layout grids_wrap">';
    $out .= '<div class="row_inner clearfix">';
    if (is_array($portfolio_taxs) && !empty($portfolio_taxs) && $filters == 'yes') {
        $out .= '<div class="filterable grid_12">';
        $out .= '<ul class="categories_filter clearfix">';
        $out .= '<li class="active"><a data-filter="*" href="#">' . __('All', 'corporative') . '</a></li>';
        foreach ($portfolio_taxs as $portfolio_cat_slug => $portfolio_cat_name) {
            $out .= '<li><a data-filter=".' . $portfolio_cat_slug . '" href="#">' . $portfolio_cat_name . '</a></li>';
        }
        $out .= '</ul>';
        $out .= '</div>';
    }
    $out .= '</div>';
    $out .= '<div class="row_inner clearfix">';
    $out .= '<ul class="grid_layout"' . $isotope . ' clearfix>';
    while ($my_query->have_posts()) {
        $my_query->the_post();
        $gallery = $videoURL = $format = $categories_css = '';
        if (get_field('portfolio_gallery')) {
            $gallery = get_field('portfolio_gallery');
        }
        if (get_field('portfolio_video')) {
            $videoURL = get_field('portfolio_video');
        }
        if (get_field('portfolio_format') == 'video') {
            $format = 'Video';
        } elseif (get_field('portfolio_format') == 'gallery') {
            $format = 'Gallery';
        } else {
//.........这里部分代码省略.........
开发者ID:devmoonshine,项目名称:development,代码行数:101,代码来源:vc_portfolio.php


示例19: extract

<?php

extract(shortcode_atts(array('title' => '', 'images' => '', 'onclick' => '', 'custom_links' => '', 'links_target' => '', 'img_size' => 'full', 'el_class' => ''), $atts));
if ($images == '') {
    return false;
}
$images = explode(',', $images);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
if ($onclick == 'custom_link') {
    $custom_links = explode(',', $custom_links);
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-logos wpb_content_element' . $el_class, $this->settings['base'], $atts);
echo '<div class="' . $css_class . '">' . wpb_widget_title(array('title' => $title, 'extraclass' => 'vc_om-logos_heading')) . '<div class="vc_om-logos-inner">';
foreach ($images as $i => $id) {
    $src = om_img_any_resize($id, $img_size, false, false);
    if ($src) {
        if (get_option(OM_THEME_PREFIX . 'lazyload') == 'true') {
            $img = '<img width="' . $src[1] . '" height="' . $src[2] . '" src="' . TEMPLATE_DIR_URI . '/img/e.png" data-original="' . $src[0] . '" alt="" class="lazyload" />';
        } else {
            $img = '<img width="' . $src[1] . '" height="' . $src[2] . '" src="' . $src[0] . '" alt=""/>';
        }
        if ($onclick == 'custom_link') {
            if (isset($custom_links[$i])) {
                $img = '<a href="' . esc_attr($custom_links[$i]) . '"' . ($links_target ? ' target="' . $links_target . '"' : '') . '>' . $img . '</a>';
            }
        } elseif ($onclick == 'description') {
            $attachment = get_post($id);
            $href = trim($attachment->post_content);
            if ($href) {
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:31,代码来源:om_logos.php


示例20: vc_map_get_attributes

}
/**
 * Shortcode attributes
 * @var $atts
 * @var $el_class
 * @var $title
 * @var $flickr_id
 * @var $count
 * @var $type
 * @var $display
 * @var $css
 * Shortcode class
 * @var $this WPBakeryShortCode_VC_flickr
 */
$el_class = $title = $flickr_id = $css = $count = $type = $display = '';
$output = '';
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
$class_to_filter = 'wpb_flickr_widget wpb_content_element';
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
$output = '
	<div class="' . esc_attr($css_class) . '">
		<div class="wpb_wrapper">
			' . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_flickr_heading')) . '
			& 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpcf7_add_shortcode函数代码示例发布时间:2022-05-23
下一篇:
PHP wpb_translateColumnWidthToSpan函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap