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


PHP ShortcodeHelper::avia_remove_autop方法代码示例

本文整理汇总了PHP中ShortcodeHelper::avia_remove_autop方法的典型用法代码示例。如果您正苦于以下问题:PHP ShortcodeHelper::avia_remove_autop方法的具体用法?PHP ShortcodeHelper::avia_remove_autop怎么用?PHP ShortcodeHelper::avia_remove_autop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShortcodeHelper的用法示例。


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

示例1: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     extract(shortcode_atts(array('title' => ''), $atts, $this->config['shortcode']));
     $output = "";
     $output .= "<div class='av-catalogue-container " . $meta['el_class'] . "'>";
     $output .= "<ul class='av-catalogue-list'>";
     $output .= ShortcodeHelper::avia_remove_autop($content, true);
     $output .= "</ul>";
     $output .= "</div>";
     return $output;
 }
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:19,代码来源:catalogue.php

示例2: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $custom_class = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     $output = '';
     $markup = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
     $markup_text = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
     $output .= '<section class="av_textblock_section" ' . $markup . '>';
     $output .= "<div class='avia_textblock {$custom_class}' {$markup_text}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     $output .= '</section>';
     return $output;
 }
开发者ID:DylanPeti,项目名称:socialize,代码行数:19,代码来源:textblock.php

示例3: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $output = "";
     if (!isset($atts['widget_area'])) {
         return $output;
     }
     if (is_dynamic_sidebar($atts['widget_area'])) {
         ob_start();
         dynamic_sidebar($atts['widget_area']);
         $output = ShortcodeHelper::avia_remove_autop(ob_get_clean(), true);
         if ($output) {
             $output = "<div class='avia-builder-widget-area clearfix " . $meta['el_class'] . "'>" . $output . "</div>";
         }
     }
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:24,代码来源:widgetarea.php

示例4: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     extract(shortcode_atts(array('font_color' => "", 'color' => '', 'size' => ''), $atts, $this->config['shortcode']));
     $custom_class = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     $output = '';
     $markup = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
     $markup_text = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
     $extra_styling = "";
     if ($size) {
         $extra_styling .= "font-size:{$size}px; ";
     }
     if ($font_color == "custom") {
         $custom_class .= " av_inherit_color";
         $extra_styling .= !empty($color) ? "color:{$color}; " : "";
     }
     if ($extra_styling) {
         $extra_styling = " style='{$extra_styling}'";
     }
     $output .= '<section class="av_textblock_section" ' . $markup . '>';
     $output .= "<div class='avia_textblock {$custom_class}' {$extra_styling} {$markup_text}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     $output .= '</section>';
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:31,代码来源:textblock.php

示例5: advanced_slide


//.........这里部分代码省略.........
             } else {
                 $slide = $this->slides[$id];
                 $linktitle = trim($slide->post_title) ? esc_attr($slide->post_title) : "";
                 if ($linktitle == "-") {
                     $linktitle = "";
                 }
                 $linkdescription = trim($slide->post_content) && empty($link) ? "title='" . esc_attr($slide->post_content) . "'" : "";
                 $linkalt = get_post_meta($slide->ID, '_wp_attachment_image_alt', true);
                 $linkalt = !empty($linkalt) ? esc_attr($linkalt) : '';
                 $img = wp_get_attachment_image_src($slide->ID, $this->config['size']);
                 $video = "";
             }
             if ($this->slide_count === 1) {
                 $extra_class .= " av-single-slide";
             }
             $blank = strpos($link_target, '_blank') !== false || $link_target == 'yes' ? ' target="_blank" ' : "";
             $blank .= strpos($link_target, 'nofollow') !== false ? ' rel="nofollow" ' : "";
             $tags = !empty($link) && $link_apply == 'image' ? array("a href='{$link}'{$blank}", 'a') : array('div', 'div');
             $caption = "";
             $button_html = "";
             $counter++;
             $button_count = "";
             if (strpos($link_apply, 'button-two') !== false) {
                 $button_count = "avia-multi-slideshow-button";
             }
             //if we got a CTA button apply the link to the button istead of the slide
             if (strpos($link_apply, 'button') !== false) {
                 $button_html .= $this->slideshow_cta_button($link1, $link_target1, $button_color, $button_label, $button_count);
                 $tags = array('div', 'div');
             }
             if (strpos($link_apply, 'button-two') !== false) {
                 $button_count .= " avia-slideshow-button-2";
                 $button_html .= $this->slideshow_cta_button($link2, $link_target2, $button_color2, $button_label2, $button_count);
             }
             //check if we got a caption
             $markup_description = avia_markup_helper(array('context' => 'description', 'echo' => false, 'id' => $attachment_id, 'custom_markup' => $custom_markup));
             $markup_name = avia_markup_helper(array('context' => 'name', 'echo' => false, 'id' => $attachment_id, 'custom_markup' => $custom_markup));
             if (trim($title) != "") {
                 $title = "<h2 class='avia-caption-title' {$markup_name}>" . trim(apply_filters('avf_slideshow_title', $title)) . "</h2>";
             }
             if (is_array($content)) {
                 $content = implode(' ', $content);
             }
             //temp fix for trim() expects string warning until I can actually reproduce the problem
             if (trim($content) != "") {
                 $content = "<div class='avia-caption-content' {$markup_description}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop(trim($content))) . "</div>";
             }
             if (trim($title . $content . $button_html) != "") {
                 if (trim($title) != "" && trim($button_html) != "" && trim($content) == "") {
                     $content = "<br/>";
                 }
                 if ($this->config['handle'] == 'av_slideshow_full' || $this->config['handle'] == 'av_fullscreen') {
                     $caption .= '<div class = "caption_fullwidth ' . $caption_pos . '">';
                     $caption .= '<div class = "container caption_container">';
                     $caption .= '<div class = "slideshow_caption">';
                     $caption .= '<div class = "slideshow_inner_caption">';
                     $caption .= '<div class = "slideshow_align_caption">';
                     $caption .= $title;
                     $caption .= $content;
                     $caption .= $button_html;
                     $caption .= '</div>';
                     $caption .= '</div>';
                     $caption .= '</div>';
                     $caption .= '</div>';
                     $caption .= '</div>';
                 } else {
                     $caption = '<div class="avia-caption"><div class="avia-inner-caption">' . $title . $content . "</div></div>";
                 }
             }
             if (!empty($img[0])) {
                 $slider_data .= $this->config['bg_slider'] == "true" ? "style='background-position:{$position};' data-img-url='" . $img[0] . "'" : "";
                 if ($slider_data) {
                     if (empty($this->ie8_fallback)) {
                         $this->ie8_fallback .= "<!--[if lte IE 8]>";
                         $this->ie8_fallback .= "<style type='text/css'>";
                     }
                     $this->ie8_fallback .= "\n #{$this->config['css_id']} .slide-{$counter}{";
                     $this->ie8_fallback .= "\n -ms-filter: \"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='{$img[0]}', sizingMethod='scale')\"; ";
                     $this->ie8_fallback .= "\n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='{$img[0]}', sizingMethod='scale'); ";
                     $this->ie8_fallback .= "\n } \n";
                 }
             }
             $html .= "<li {$slider_data} class='{$extra_class} slide-{$counter} ' >";
             $html .= "<" . $tags[0] . " data-rel='slideshow-" . avia_slideshow::$slider . "' class='avia-slide-wrap' {$linkdescription} >{$caption}";
             if ($this->config['bg_slider'] != "true" && empty($video)) {
                 $html .= "<img src='" . $img[0] . "' width='" . $img[1] . "' height='" . $img[2] . "' title='" . $linktitle . "' alt='" . $linkalt . "' {$markup_url} />";
             }
             $html .= $video;
             $html .= "</" . $tags[1] . ">";
             $html .= "</li>";
         } else {
             $this->slide_count--;
         }
     }
     if (!empty($this->ie8_fallback)) {
         $this->ie8_fallback .= "</style> <![endif]-->";
         add_action('wp_footer', array($this, 'add_ie8_fallback_to_footer'));
     }
     return $html;
 }
开发者ID:DylanPeti,项目名称:socialize,代码行数:101,代码来源:slideshow.php

示例6: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     avia_sc_grid_row::$count++;
     $atts = shortcode_atts(array('color' => 'main_color', 'border' => '', 'min_height' => '0', 'mobile' => 'av-flex-cells', 'id' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $output = "";
     $params['class'] = "av-layout-grid-container {$color} {$mobile} {$border}" . $meta['el_class'];
     $params['open_structure'] = false;
     $params['id'] = !empty($id) ? $id : "av-layout-grid-" . avia_sc_grid_row::$count;
     $params['custom_markup'] = $meta['custom_markup'];
     //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
     if (isset($meta['index']) && $meta['index'] == 0) {
         $params['close'] = false;
     }
     if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
         $params['close'] = false;
     }
     if (isset($meta['index']) && $meta['index'] != 0) {
         $params['class'] .= " submenu-not-first";
     }
     avia_sc_cell::$attr = $atts;
     $output .= avia_new_section($params);
     $output .= ShortcodeHelper::avia_remove_autop($content, true);
     $output .= avia_section_after_element_content($meta, 'after_submenu', false);
     return $output;
 }
开发者ID:spokehq,项目名称:emprise,代码行数:34,代码来源:grid_row.php

示例7: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('title' => '', 'color' => 'green', 'border' => '', 'custom_bg' => '#444444', 'custom_font' => '#ffffff', 'size' => 'large', 'icon_select' => 'yes', 'icon' => '', 'font' => ''), $atts, $this->config['shortcode']);
     $display_char = av_icon($atts['icon'], $atts['font']);
     $output = "";
     $style = "";
     if ($atts['color'] == "custom") {
         $style .= "style='background-color:" . $atts['custom_bg'] . "; color:" . $atts['custom_font'] . "; '";
     }
     $output .= "<div {$style} class='avia_message_box " . $this->class_by_arguments('color, size, icon_select, border', $atts, true) . $meta['el_class'] . "'>";
     if ($atts['title']) {
         $output .= "<span class='avia_message_box_title' >" . $atts['title'] . "</span>";
     }
     $output .= "<div class='avia_message_box_content' >";
     if ($atts['icon_select'] == 'yes') {
         $output .= "<span class='avia_message_box_icon' {$display_char}></span>";
     }
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     $output .= "</div>";
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:29,代码来源:notification.php

示例8: av_toggle

 function av_toggle($atts, $content = "", $shortcodename = "")
 {
     $output = $titleClass = $contentClass = "";
     $toggle_atts = shortcode_atts(array('title' => '', 'tags' => '', 'custom_id' => ''), $atts);
     if (is_numeric(avia_sc_toggle::$initial) && avia_sc_toggle::$counter == avia_sc_toggle::$initial) {
         $titleClass = "activeTitle";
         $contentClass = "activeToggle";
     }
     if (empty($toggle_atts['title'])) {
         $toggle_atts['title'] = avia_sc_toggle::$counter;
     }
     if (empty($toggle_atts['custom_id'])) {
         $toggle_atts['custom_id'] = 'toggle-id-' . avia_sc_toggle::$toggle_id++;
     }
     $output .= '<div class="single_toggle" ' . $this->create_tag_string($toggle_atts['tags']) . ' >';
     $output .= '<p data-fake-id="#' . $toggle_atts['custom_id'] . '" class="toggler ' . $titleClass . '">' . $toggle_atts['title'] . '<span class="toggle_icon">';
     $output .= '<span class="vert_icon"></span><span class="hor_icon"></span></span></p>';
     $output .= '<div id="' . $toggle_atts['custom_id'] . '-container" class="toggle_wrap ' . $contentClass . '" >';
     $output .= '<div class="toggle_content invers-color">';
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content));
     $output .= '</div>';
     $output .= '</div>';
     $output .= '</div>';
     avia_sc_toggle::$counter++;
     return $output;
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:26,代码来源:toggles.php

示例9: av_iconlist_item

 function av_iconlist_item($atts, $content = "", $shortcodename = "")
 {
     $icon_el = $this->elements[0]['subelements'][3];
     $chars = $icon_el['chars'];
     if (!is_array($chars)) {
         include $icon_el['chars'];
     }
     $display_char = isset($chars[$atts['icon'] - 1]) ? $chars[$atts['icon'] - 1] : $chars[0];
     $atts['linktarget'] = !empty($atts['linktarget']) && $atts['linktarget'] == 'no' ? '' : 'target="_blank"';
     if (!empty($atts['link'])) {
         $atts['link'] = aviaHelper::get_url($atts['link']);
         $atts['title'] = "<a href='{$atts['link']}' title='" . esc_attr($atts['title']) . "'>{$atts['title']}</a>";
     }
     $output = "";
     $output .= "<li>";
     $output .= "<div class='iconlist_icon avia-font-" . $icon_el['font'] . "'><span class='iconlist-char'>{$display_char}</span></div>";
     $output .= "<div class='iconlist_content_wrap'>";
     $output .= "<h4 class='iconlist_title'>" . $atts['title'] . "</h4>";
     $output .= "<div class='iconlist_content'>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     $output .= "</div>";
     $output .= "<div class='iconlist-timeline'></div>";
     $output .= "</li>";
     return $output;
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:24,代码来源:iconlist.php

示例10: av_testimonial_single

 function av_testimonial_single($atts, $content = "", $shortcodename = "")
 {
     extract(shortcode_atts(array('src' => "", 'name' => "", 'subtitle' => "", 'link' => "", 'linktext' => "", 'custom_markup' => ''), $atts, 'av_testimonial_single'));
     $output = "";
     $avatar = "";
     $grid = avia_sc_testimonial::$style == 'grid' ? true : false;
     $class = avia_sc_testimonial::$columnClass . " avia-testimonial-row-" . avia_sc_testimonial::$rows . " ";
     //if(count($testimonials) <= $rows * $columns) $class.= " avia-testimonial-row-last ";
     if (avia_sc_testimonial::$counter == 1) {
         $class .= "avia-first-testimonial";
     }
     if (avia_sc_testimonial::$counter == avia_sc_testimonial::$columns) {
         $class .= "avia-last-testimonial";
     }
     if ($link && !$linktext) {
         $linktext = $link;
     }
     if ($link == 'http://') {
         $link = "";
     }
     if (avia_sc_testimonial::$counter == 1) {
         $output .= "<section class ='avia-testimonial-row'>";
     }
     //avatar size filter
     $avatar_size = apply_filters('avf_testimonials_avatar_size', 'square', $src, $class);
     //avatar
     $markup = avia_markup_helper(array('context' => 'single_image', 'echo' => false, 'custom_markup' => $custom_markup));
     if ($src) {
         $avatar = "<div class='avia-testimonial-image' {$markup}>" . wp_get_attachment_image($src, $avatar_size, false, array('alt' => esc_attr(strip_tags($name)))) . "</div>";
     }
     //meta
     $markup_text = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $custom_markup));
     $markup_name = avia_markup_helper(array('context' => 'name', 'echo' => false, 'custom_markup' => $custom_markup));
     $markup_job = avia_markup_helper(array('context' => 'job', 'echo' => false, 'custom_markup' => $custom_markup));
     if (strstr($link, '@')) {
         $markup_url = avia_markup_helper(array('context' => 'email', 'echo' => false, 'custom_markup' => $custom_markup));
     } else {
         $markup_url = avia_markup_helper(array('context' => 'url', 'echo' => false, 'custom_markup' => $custom_markup));
     }
     //final output
     $markup = avia_markup_helper(array('context' => 'person', 'echo' => false, 'custom_markup' => $custom_markup));
     $output .= "<div class='avia-testimonial {$class}' {$markup}>";
     $output .= "<div class='avia-testimonial_inner'>";
     if ($grid) {
         $output .= $avatar;
     }
     $output .= "<div class='avia-testimonial-content {$this->content_class}'  {$this->content_styling} {$markup_text}>";
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content));
     $output .= "</div>";
     $output .= "<div class='avia-testimonial-meta'><div class='avia-testimonial-arrow-wrap'><div class='avia-arrow'></div></div>";
     if (!$grid) {
         $output .= $avatar;
     }
     $output .= "<div class='avia-testimonial-meta-mini'>";
     if ($name) {
         $output .= "<strong  class='avia-testimonial-name'  {$this->title_styling} {$markup_name}>{$name}</strong>";
     }
     if ($subtitle) {
         $output .= "<span  class='avia-testimonial-subtitle {$this->subtitle_class}' {$this->title_styling}  {$markup_job}>{$subtitle}</span>";
     }
     if ($link) {
         $output .= "<span class='hidden avia-testimonial-markup-link'  {$markup_url}>{$link}</span>";
     }
     if ($link) {
         $output .= " &ndash; <a class='aviablank avia-testimonial-link' href='{$link}' >{$linktext}</a>";
     }
     $output .= "</div>";
     $output .= "</div>";
     $output .= "</div>";
     $output .= "</div>";
     if (avia_sc_testimonial::$counter == avia_sc_testimonial::$columns) {
         $output .= "</section>";
     }
     avia_sc_testimonial::$counter++;
     if (avia_sc_testimonial::$counter > avia_sc_testimonial::$columns) {
         avia_sc_testimonial::$counter = 1;
         avia_sc_testimonial::$rows++;
     }
     return $output;
 }
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:80,代码来源:testimonials.php

示例11: shortcode_handler


//.........这里部分代码省略.........
     if (!empty(avia_sc_columns::$first_atts['space'])) {
         $extraClass .= " " . avia_sc_columns::$first_atts['space'];
     }
     if (!empty(avia_sc_columns::$first_atts['min_height'])) {
         $extraClass .= " flex_column_table_cell";
         $extraClass .= " " . avia_sc_columns::$first_atts['min_height'] . " " . avia_sc_columns::$first_atts['vertical_alignment'];
     } else {
         $extraClass .= " flex_column_div";
     }
     if (!empty(avia_sc_columns::$first_atts['custom_margin'])) {
         $explode_margin = explode(',', avia_sc_columns::$first_atts['margin']);
         if (count($explode_margin) <= 1) {
             $explode_margin[1] = $explode_margin[0];
         }
         $atts['margin-top'] = $explode_margin[0];
         $atts['margin-bottom'] = $explode_margin[1];
         $margins = "";
         $margins .= AviaHelper::style_string($atts, 'margin-top');
         $margins .= AviaHelper::style_string($atts, 'margin-bottom');
         if (!empty(avia_sc_columns::$first_atts['min_height'])) {
             $margin_style = AviaHelper::style_string($margins);
         } else {
             $outer_style .= $margins;
         }
     }
     $explode_padding = explode(',', $atts['padding']);
     if (count($explode_padding) > 1) {
         $atts['padding'] = "";
         foreach ($explode_padding as $value) {
             if (empty($value)) {
                 $value = "0";
             }
             $atts['padding'] .= $value . " ";
         }
     }
     if ($atts['padding'] == "0px" || $atts['padding'] == "0" || $atts['padding'] == "0%") {
         $extraClass .= " av-zero-column-padding";
         $atts['padding'] = "";
     }
     $explode_radius = explode(',', $atts['radius']);
     if (count($explode_radius) > 1) {
         $atts['radius'] = "";
         foreach ($explode_radius as $value) {
             if (empty($value)) {
                 $value = "0";
             }
             $atts['radius'] .= $value . " ";
         }
     }
     if ($atts['padding'] == "0px" || $atts['padding'] == "0" || $atts['padding'] == "0%") {
         $extraClass .= " av-zero-column-padding";
         $atts['padding'] = "";
     }
     if (!empty($atts['fetch_image'])) {
         $outer_style .= AviaHelper::style_string($atts, 'fetch_image', 'background-image');
         $outer_style .= AviaHelper::style_string($atts, 'background_position', 'background-position');
         $outer_style .= AviaHelper::style_string($atts, 'background_repeat', 'background-repeat');
         $outer_style .= AviaHelper::style_string($atts, 'background_attachment', 'background-attachment');
     }
     if (!empty($atts['border'])) {
         $outer_style .= AviaHelper::style_string($atts, 'border', 'border-width', 'px');
         $outer_style .= AviaHelper::style_string($atts, 'border_color', 'border-color');
         $outer_style .= AviaHelper::style_string($atts, 'border_style', 'border-style');
     }
     $outer_style .= AviaHelper::style_string($atts, 'padding');
     $outer_style .= AviaHelper::style_string($atts, 'background_color', 'background-color');
     $outer_style .= AviaHelper::style_string($atts, 'radius', 'border-radius');
     $outer_style = AviaHelper::style_string($outer_style);
     if ($first) {
         avia_sc_columns::$calculated_size = 0;
         if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], array('av_one_full', 'av_one_half', 'av_one_third', 'av_two_third', 'av_three_fourth', 'av_one_fourth', 'av_one_fifth', 'av_textblock'))) {
             avia_sc_columns::$extraClass = "column-top-margin";
         } else {
             avia_sc_columns::$extraClass = "";
         }
     }
     if (!empty(avia_sc_columns::$first_atts['min_height']) && avia_sc_columns::$calculated_size == 0) {
         $output .= "<div class='flex_column_table " . avia_sc_columns::$first_atts['min_height'] . "-flextable' {$margin_style}>";
     }
     if (!$first && empty(avia_sc_columns::$first_atts['space']) && !empty(avia_sc_columns::$first_atts['min_height'])) {
         $output .= "<div class='av-flex-placeholder'></div>";
     }
     avia_sc_columns::$calculated_size += avia_sc_columns::$size_array[$this->config['shortcode']];
     $output .= '<div class="flex_column ' . $shortcodename . ' ' . $extraClass . ' ' . $first . ' ' . $meta['el_class'] . ' ' . avia_sc_columns::$extraClass . '" ' . $outer_style . '>';
     //if the user uses the column shortcode without the layout builder make sure that paragraphs are applied to the text
     $content = empty($avia_config['conditionals']['is_builder_template']) ? ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) : ShortcodeHelper::avia_remove_autop($content, true);
     $output .= trim($content) . '</div>';
     $force_close = false;
     if (isset($meta['siblings']) && isset($meta['siblings']['next']) && isset($meta['siblings']['next']['tag'])) {
         if (!array_key_exists($meta['siblings']['next']['tag'], avia_sc_columns::$size_array)) {
             $force_close = true;
         }
     }
     if (!empty(avia_sc_columns::$first_atts['min_height']) && (avia_sc_columns::$calculated_size >= 0.95 || $force_close)) {
         $output .= "</div><!--close column table wrapper. Autoclose: {$force_close} -->";
         avia_sc_columns::$calculated_size = 0;
     }
     unset($avia_config['current_column']);
     return $output;
 }
开发者ID:gbaumgart,项目名称:enfold-wordpress-theme,代码行数:101,代码来源:columns.php

示例12: html

 public function html()
 {
     $output = "";
     $counter = 0;
     avia_content_slider::$slider++;
     if (empty($this->config['content'])) {
         return $output;
     }
     //$html .= empty($this->subslides) ? $this->default_slide() : $this->advanced_slide();
     extract($this->config);
     $extraClass = 'first';
     $grid = 'one_third';
     $slide_loop_count = 1;
     $loop_counter = 1;
     $total = $columns % 2 ? "odd" : "even";
     $heading = !empty($this->config['heading']) ? '<h3>' . $this->config['heading'] . '</h3>' : "&nbsp;";
     $slide_count = count($content);
     switch ($columns) {
         case "1":
             $grid = 'av_fullwidth';
             break;
         case "2":
             $grid = 'av_one_half';
             break;
         case "3":
             $grid = 'av_one_third';
             break;
         case "4":
             $grid = 'av_one_fourth';
             break;
         case "5":
             $grid = 'av_one_fifth';
             break;
         case "6":
             $grid = 'av_one_sixth';
             break;
     }
     $data = AviaHelper::create_data_string(array('autoplay' => $autoplay, 'interval' => $interval, 'animation' => $animation, 'show_slide_delay' => 30));
     $thumb_fallback = "";
     $output .= "<div {$data} class='avia-content-slider-element-container avia-content-slider-element-{$type} avia-content-slider avia-smallarrow-slider avia-content-{$type}-active avia-content-slider" . avia_content_slider::$slider . " avia-content-slider-{$total} {$class}' >";
     $heading_class = '';
     if ($navigation == 'no') {
         $heading_class .= ' no-content-slider-navigation ';
     }
     if ($heading == '&nbsp;') {
         $heading_class .= ' no-content-slider-heading ';
     }
     $output .= "<div class='avia-smallarrow-slider-heading {$heading_class}'>";
     $output .= "<div class='new-special-heading'>" . $heading . "</div>";
     if ($slide_count > $columns && $type == 'slider' && $navigation != 'no') {
         if ($navigation == 'dots') {
             $output .= $this->slide_navigation_dots();
         }
         if ($navigation == 'arrows') {
             $output .= $this->slide_navigation_arrows();
         }
     }
     $output .= "</div>";
     $output .= "<div class='avia-content-slider-inner'>";
     foreach ($content as $key => $value) {
         $link = $linktarget = "";
         extract($value['attr']);
         $link = aviaHelper::get_url($link);
         $blank = strpos($linktarget, '_blank') !== false || $linktarget == 'yes' ? ' target="_blank" ' : "";
         $blank .= strpos($linktarget, 'nofollow') !== false ? ' rel="nofollow" ' : "";
         $parity = $loop_counter % 2 ? 'odd' : 'even';
         $last = $slide_count == $slide_loop_count ? " post-entry-last " : "";
         $post_class = "post-entry slide-entry-overview slide-loop-{$slide_loop_count} slide-parity-{$parity} {$last}";
         if ($loop_counter == 1) {
             $output .= "<div class='slide-entry-wrap'>";
         }
         $markup = avia_markup_helper(array('context' => 'entry', 'echo' => false));
         $output .= "<section class='slide-entry flex_column {$post_class} {$grid} {$extraClass}' {$markup}>";
         $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false));
         $output .= !empty($title) ? "<h3 class='slide-entry-title entry-title' {$markup}>" : '';
         $output .= !empty($link) && !empty($title) ? "<a href='{$link}' {$blank} title='" . esc_attr($title) . "'>" . $title . "</a>" : $title;
         $output .= !empty($title) ? '</h3>' : '';
         $markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false));
         $output .= !empty($value['content']) ? "<div class='slide-entry-excerpt entry-content' {$markup}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($value['content'])) . "</div>" : "";
         $output .= '</section>';
         $loop_counter++;
         $slide_loop_count++;
         $extraClass = "";
         if ($loop_counter > $columns) {
             $loop_counter = 1;
             $extraClass = 'first';
         }
         if ($loop_counter == 1 || !empty($last)) {
             $output .= "</div>";
         }
     }
     $output .= "</div>";
     $output .= "</div>";
     return $output;
 }
开发者ID:Jiersone,项目名称:mac,代码行数:95,代码来源:contentslider.php

示例13: av_iconlist_item

 function av_iconlist_item($atts, $content = "", $shortcodename = "")
 {
     $atts = shortcode_atts(array('title' => '', 'link' => '', 'icon' => '', 'font' => '', 'linkelement' => '', 'linktarget' => '', 'custom_markup' => ''), $atts, 'av_iconlist_item');
     $display_char = av_icon($atts['icon'], $atts['font']);
     $display_char_wrapper = array();
     $blank = strpos($atts['linktarget'], '_blank') !== false || $atts['linktarget'] == 'yes' ? ' target="_blank" ' : "";
     $blank .= strpos($atts['linktarget'], 'nofollow') !== false ? ' rel="nofollow" ' : "";
     if (!empty($atts['link'])) {
         $atts['link'] = aviaHelper::get_url($atts['link']);
         if (!empty($atts['link'])) {
             $linktitle = $atts['title'];
             switch ($atts['linkelement']) {
                 case 'both':
                     $atts['title'] = "<a href='{$atts['link']}' title='" . esc_attr($linktitle) . "'{$blank}>{$linktitle}</a>";
                     $display_char_wrapper['start'] = "a href='{$atts['link']}' title='" . esc_attr($linktitle) . "' {$blank}";
                     $display_char_wrapper['end'] = 'a';
                     break;
                 case 'only_icon':
                     $display_char_wrapper['start'] = "a href='{$atts['link']}' title='" . esc_attr($linktitle) . "' {$blank}";
                     $display_char_wrapper['end'] = 'a';
                     break;
                 default:
                     $atts['title'] = "<a href='{$atts['link']}' title='" . esc_attr($linktitle) . "'{$blank}>{$linktitle}</a>";
                     $display_char_wrapper['start'] = 'div';
                     $display_char_wrapper['end'] = 'div';
                     break;
             }
         }
     }
     if (empty($display_char_wrapper)) {
         $display_char_wrapper['start'] = 'div';
         $display_char_wrapper['end'] = 'div';
     }
     $contentClass = "";
     if (trim($content) == "") {
         $contentClass = "av-iconlist-empty";
     }
     $output = "";
     $output .= "<li>";
     $output .= "<{$display_char_wrapper['start']} {$this->icon_html_styling} class='iconlist_icon avia-font-" . $atts['font'] . "'><span class='iconlist-char' {$display_char}></span></{$display_char_wrapper['end']}>";
     $output .= '<article class="article-icon-entry ' . $contentClass . '" ' . avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $atts['custom_markup'])) . '>';
     $output .= "<div class='iconlist_content_wrap'>";
     $output .= '<header class="entry-content-header">';
     $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'custom_markup' => $atts['custom_markup']));
     $output .= "<h4 class='iconlist_title' {$markup} {$this->title_styling}>" . $atts['title'] . "</h4>";
     $output .= '</header>';
     $markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'custom_markup' => $atts['custom_markup']));
     $output .= "<div class='iconlist_content {$this->content_class}' {$markup} {$this->content_styling}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     $output .= "</div>";
     $output .= '<footer class="entry-footer"></footer>';
     $output .= '</article>';
     $output .= "<div class='iconlist-timeline'></div>";
     $output .= "</li>";
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:55,代码来源:iconlist.php

示例14: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('style' => '', 'menu' => '', 'position' => 'center', 'sticky' => '', 'color' => 'main_color', 'mobile' => 'disabled', 'mobile_submenu' => '', 'which_menu' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $output = "";
     $sticky_div = "";
     avia_sc_submenu::$count++;
     avia_sc_submenu::$custom_items = 0;
     $params['class'] = "av-submenu-container {$color} " . $meta['el_class'];
     $params['open_structure'] = false;
     $params['id'] = "sub_menu" . avia_sc_submenu::$count;
     $params['custom_markup'] = $meta['custom_markup'];
     $params['style'] = "style='z-index:" . (avia_sc_submenu::$count + 300) . "'";
     if ($sticky && $sticky != "disabled") {
         $params['class'] .= " av-sticky-submenu";
         $params['before_new'] = "<div class='clear'></div>";
         $sticky_div = "<div class='sticky_placeholder'></div>";
     }
     //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
     if (isset($meta['index']) && $meta['index'] == 0) {
         $params['close'] = false;
     }
     if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
         $params['close'] = false;
     }
     if (isset($meta['index']) && $meta['index'] != 0) {
         $params['class'] .= " submenu-not-first";
     }
     if ($which_menu == "custom") {
         $element = "";
         $custom_menu = ShortcodeHelper::avia_remove_autop($content, true);
         if (!empty($custom_menu)) {
             $element .= "<ul id='av-custom-submenu-" . avia_sc_submenu::$count . "' class='av-subnav-menu av-submenu-pos-{$position}'>";
             $element .= $custom_menu;
             $element .= "</ul>";
         }
     } else {
         $element = wp_nav_menu(array('menu' => wp_get_nav_menu_object($menu), 'menu_class' => "av-subnav-menu av-submenu-pos-{$position}", 'fallback_cb' => '', 'container' => false, 'echo' => false, 'walker' => new avia_responsive_mega_menu(array('megamenu' => 'disabled'))));
     }
     $submenu_hidden = "";
     $mobile_button = $mobile == "active" ? "<a href='#' class='mobile_menu_toggle' " . av_icon_string('mobile_menu') . "><span class='av-current-placeholder'>" . __('Menu', 'avia_framework') . "</span></a>" : "";
     if (!empty($mobile_button) && !empty($mobile_submenu) && $mobile_submenu != "disabled") {
         $submenu_hidden = "av-submenu-hidden";
     }
     // if(!ShortcodeHelper::is_top_level()) return $element;
     $output .= avia_new_section($params);
     $output .= "<div class='container av-menu-mobile-{$mobile} {$submenu_hidden}'>{$mobile_button}" . $element . "</div>";
     $output .= avia_section_after_element_content($meta, 'after_submenu', false, $sticky_div);
     return $output;
 }
开发者ID:gbaumgart,项目名称:enfold-wordpress-theme,代码行数:58,代码来源:menu.php

示例15: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element 
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string 
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     extract(shortcode_atts(array('tag' => 'h3', 'padding' => '5', 'heading' => '', 'color' => '', 'style' => '', 'custom_font' => '', 'size' => '', 'subheading_active' => '', 'subheading_size' => ''), $atts, $this->config['shortcode']));
     $output = "";
     $styling = "";
     $subheading = "";
     $border_styling = "";
     $before = $after = "";
     $class = $meta['el_class'];
     if ($heading) {
         // add seo markup
         $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
         // filter heading for & symbol and convert them
         $heading = apply_filters('avia_ampersand', wptexturize($heading));
         //if the heading contains a strong tag make apply a custom class that makes the rest of the font appear smaller for a better effect
         if (strpos($heading, '<strong>') !== false) {
             $class .= " av-thin-font";
         }
         //apply the padding bottom styling
         $styling .= "padding-bottom:{$padding}px;";
         // if the color is a custom hex value add the styling for both border and font
         if ($color == "custom-color-heading" && $custom_font) {
             $styling .= "color:{$custom_font};";
             $border_styling = "style='border-color:{$custom_font}'";
         }
         // if a custom font size is set apply it to the container and also apply the inherit class so the actual heading uses the size
         if (!empty($style) && !empty($size)) {
             $styling .= "font-size:{$size}px;";
             $class .= " av-inherit-size";
         }
         //finish up the styling string
         if (!empty($styling)) {
             $styling = "style='{$styling}'";
         }
         //check if we got a subheading
         if (!empty($subheading_active) && !empty($content)) {
             $content = "<div class ='av-subheading av-{$subheading_active}' style='font-size:{$subheading_size}px;'>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
             if ($subheading_active == "subheading_above") {
                 $before = $content;
             } else {
                 $after = $content;
             }
         }
         //html markup
         $output .= "<div {$styling} class='av-special-heading av-special-heading-{$tag} {$color} {$style} {$class}'>";
         $output .= $before;
         $output .= "<{$tag} class='av-special-heading-tag' {$markup} {$styling}>{$heading}</{$tag}>";
         $output .= $after;
         $output .= "<div class='special-heading-border'><div class='special-heading-inner-border' {$border_styling}></div></div>";
         $output .= "</div>";
     }
     return $output;
 }
开发者ID:DylanPeti,项目名称:socialize,代码行数:61,代码来源:heading.php


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