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


PHP ShortcodeHelper::avia_apply_autop方法代码示例

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


在下文中一共展示了ShortcodeHelper::avia_apply_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 = "")
 {
     $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

示例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 = "")
 {
     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

示例3: 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

示例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 = "")
 {
     $atts = shortcode_atts(array('name' => '', 'src' => '', 'description' => '', 'job' => '', 'custom_markup' => '', 'font_color' => '', 'custom_title' => '', 'custom_content' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $title_styling = "";
     $content_styling = "";
     $content_class = "";
     $title_class = "";
     if ($font_color == "custom") {
         $title_styling .= !empty($custom_title) ? "color:{$custom_title}; " : "";
         $content_styling .= !empty($custom_content) ? "color:{$custom_content}; " : "";
         if ($title_styling) {
             $title_styling = " style='{$title_styling}'";
             $title_class = "av_opacity_variation";
         }
         if ($content_styling) {
             $content_styling = " style='{$content_styling}'";
             $content_class = "av_inherit_color";
         }
     }
     $socials = ShortcodeHelper::shortcode2array($content);
     $output = "";
     $markup = avia_markup_helper(array('context' => 'person', 'echo' => false, 'custom_markup' => $custom_markup));
     $output .= "<section class='avia-team-member " . $meta['el_class'] . "' {$markup}>";
     if ($src) {
         $output .= "<div class='team-img-container'>";
         $markup = avia_markup_helper(array('context' => 'single_image', 'echo' => false, 'custom_markup' => $custom_markup));
         $output .= "<img class='avia_image avia_image_team' src='" . $src . "' alt='" . esc_attr($name) . "' {$markup} />";
         if (!empty($socials)) {
             $output .= "<div class='team-social'>";
             $output .= "<div class='team-social-inner'>";
             foreach ($socials as $social) {
                 //set defaults
                 $social['attr'] = shortcode_atts(array('link' => '', 'link_target' => '', 'icon' => '', 'font' => '', 'title' => ''), $social['attr'], 'av_social');
                 //build link for each social item
                 $tooltip = $social['attr']['title'] ? 'data-avia-tooltip="' . $social['attr']['title'] . '"' : "";
                 $target = $social['attr']['link_target'] ? "target='_blank'" : "";
                 //apply special class in case its a link to a known social media service
                 $social_class = $this->get_social_class($social['attr']['link']);
                 if (strstr($social['attr']['link'], '@')) {
                     $markup = avia_markup_helper(array('context' => 'email', 'echo' => false, 'custom_markup' => $custom_markup));
                 } else {
                     $markup = avia_markup_helper(array('context' => 'url', 'echo' => false, 'custom_markup' => $custom_markup));
                 }
                 $display_char = av_icon($social['attr']['icon'], $social['attr']['font']);
                 $output .= "<span class='hidden av_member_url_markup {$social_class}' {$markup}>" . $social['attr']['link'] . "</span>";
                 $output .= "<a rel='v:url' {$tooltip} {$target} class='{$social_class} avia-team-icon ' href='" . $social['attr']['link'] . "' {$display_char}>";
                 $output .= "</a>";
             }
             $output .= "</div>";
             $output .= "</div>";
         }
         $output .= "</div>";
     }
     if ($name) {
         $markup = avia_markup_helper(array('context' => 'name', 'echo' => false, 'custom_markup' => $custom_markup));
         $output .= "<h3 class='team-member-name' {$title_styling} {$markup}>{$name}</h3>";
     }
     if ($job) {
         $markup = avia_markup_helper(array('context' => 'job', 'echo' => false, 'custom_markup' => $custom_markup));
         $output .= "<div class='team-member-job-title {$title_class}' {$title_styling} {$markup}>{$job}</div>";
     }
     if ($description) {
         $markup = avia_markup_helper(array('context' => 'description', 'echo' => false, 'custom_markup' => $custom_markup));
         $output .= "<div class='team-member-description {$content_class}' {$markup} {$content_styling}>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($description)) . "</div>";
     }
     $markup = avia_markup_helper(array('context' => 'affiliation', 'echo' => false, 'custom_markup' => $custom_markup));
     $output .= "<span class='hidden team-member-affiliation' {$markup}>" . get_bloginfo('name') . "</span>";
     $output .= "</section>";
     return $output;
 }
开发者ID:gbaumgart,项目名称:enfold-wordpress-theme,代码行数:79,代码来源:team.php

示例5: 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

示例6: helper_array2form_fields

 function helper_array2form_fields($base)
 {
     $form_fields = array();
     $labels = array();
     if (is_array($base)) {
         foreach ($base as $key => $field) {
             $sanizited_id = trim(strtolower($field['attr']['label']));
             $labels[$sanizited_id] = empty($labels[$sanizited_id]) ? 1 : $labels[$sanizited_id] + 1;
             if ($labels[$sanizited_id] > 1) {
                 $sanizited_id = $sanizited_id . '_' . $labels[$sanizited_id];
             }
             $form_fields[$sanizited_id] = $field['attr'];
             if (!empty($field['content'])) {
                 $form_fields[$sanizited_id]['content'] = ShortcodeHelper::avia_apply_autop($field['content']);
             }
         }
     }
     return $form_fields;
 }
开发者ID:DylanPeti,项目名称:socialize,代码行数:19,代码来源:contact.php

示例7: 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

示例8: 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' => 'Title', 'icon' => '1', 'position' => 'left', 'link' => '', 'linktarget' => 'no'), $atts));
     $icon_el = $this->elements[0];
     $chars = $icon_el['chars'];
     $font = $icon_el['font'];
     if (!is_array($chars)) {
         include $icon_el['chars'];
     }
     $display_char = isset($chars[$icon - 1]) ? $chars[$icon - 1] : $chars[0];
     if ($position == 'top') {
         $position .= " main_color";
     }
     $linktarget = $linktarget == 'no' ? '' : 'target="_blank"';
     $link = aviaHelper::get_url($link);
     if (!empty($link)) {
         $title = "<a href='{$link}' title='" . esc_attr($title) . "' {$linktarget}>{$title}</a>";
     }
     // add blockquotes to the content
     $output = '<div class="iconbox iconbox_' . $position . ' ' . $meta['el_class'] . '">';
     $output .= '<div class="iconbox_content">';
     $output .= '<div class="iconbox_icon heading-color avia-font-' . $font . '">' . $display_char . '</div>';
     $output .= '<h3 class="iconbox_content_title">' . $title . "</h3>";
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content));
     $output .= '</div></div>';
     return $output;
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:35,代码来源:iconbox.php

示例9: 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

示例10: 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' => 'Title', 'icon' => '1', 'position' => 'left', 'link' => '', 'linktarget' => 'no', 'linkelement' => '', 'font' => ''), $atts));
     $display_char = av_icon($icon, $font);
     $display_char_wrapper = array();
     if ($position == 'top') {
         $position .= " main_color";
     }
     $blank = strpos($linktarget, '_blank') !== false || $linktarget == 'yes' ? ' target="_blank" ' : "";
     $blank .= strpos($linktarget, 'nofollow') !== false ? ' rel="nofollow" ' : "";
     $link = aviaHelper::get_url($link);
     if (!empty($link)) {
         $linktitle = $title;
         switch ($linkelement) {
             case 'both':
                 $title = "<a href='{$link}' title='" . esc_attr($linktitle) . "' {$blank}>{$linktitle}</a>";
                 $display_char_wrapper['start'] = "a href='{$link}' title='" . esc_attr($linktitle) . "' {$blank}";
                 $display_char_wrapper['end'] = 'a';
                 break;
             case 'only_icon':
                 $display_char_wrapper['start'] = "a href='{$link}' title='" . esc_attr($linktitle) . "' {$blank}";
                 $display_char_wrapper['end'] = 'a';
                 break;
             default:
                 $title = "<a href='{$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';
     }
     // add blockquotes to the content
     $markup = avia_markup_helper(array('context' => 'entry', 'echo' => false));
     $output = '<article class="iconbox iconbox_' . $position . ' ' . $meta['el_class'] . '" ' . $markup . '>';
     $output .= '        <div class="iconbox_content">';
     $output .= '        <header class="entry-content-header">';
     $output .= '            <' . $display_char_wrapper['start'] . ' class="iconbox_icon heading-color" ' . $display_char . '></' . $display_char_wrapper['end'] . '>';
     $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false));
     $output .= "            <h3 class='iconbox_content_title' {$markup}>" . $title . "</h3>";
     $output .= '        </header>';
     $markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false));
     $output .= "        <div class='iconbox_content_container' {$markup}>";
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content));
     $output .= '        </div>';
     $output .= '    </div>';
     $output .= '    <footer class="entry-footer"></footer>';
     $output .= '</article>';
     return $output;
 }
开发者ID:Jiersone,项目名称:mac,代码行数:60,代码来源:iconbox.php

示例11: 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 = "";
     $class = "";
     $alt = "";
     $title = "";
     /**
      * setting the variables for the extract function
      *
      * @var $src
      * @var $animation
      * @var $link
      * @var $attachment
      * @var $attachment_size
      * @var $target
      * @var $styling
      * @var $caption
      * @var $font_size
      * @var $appearance
      * @var $hover
      * @var $align
      * @var $overlay_opacity
      * @var $overlay_color
      * @var $overlay_text_color
      */
     $atts = shortcode_atts(array('src' => '', 'animation' => 'no-animation', 'link' => '', 'attachment' => '', 'attachment_size' => '', 'target' => 'no', 'styling' => '', 'caption' => '', 'font_size' => '', 'appearance' => '', 'hover' => '', 'align' => 'center', 'overlay_opacity' => '0.4', 'overlay_color' => '#444444', 'overlay_text_color' => '#ffffff'), $atts, $this->config['shortcode']);
     extract($atts);
     $post_id = get_the_ID();
     $primary_image = get_field('advertisement_package', $post_id) == '165' ? '' : $this->getPrimaryImage($post_id);
     if (!empty($primary_image)) {
         $alt = !empty($primary_image['alt']) ? esc_attr($primary_image['alt']) : '';
         $title = trim($primary_image['title']) ? esc_attr($primary_image['title']) : "";
         $src = $primary_image['url'];
     } else {
         $attachment = false;
     }
     if (!empty($src)) {
         $class = $animation == "no-animation" ? "" : "avia_animated_image avia_animate_when_almost_visible " . $animation;
         $class .= " av-styling-" . $styling . " " . $hover;
         if (is_numeric($src)) {
             //$output = wp_get_attachment_image($src,'large');
             $output = wp_get_attachment_image($src, 'large', false, array('class' => "avia_image {$class} " . $this->class_by_arguments('align', $atts, true)));
         } else {
             $link = aviaHelper::get_url($link, $attachment);
             $blank = strpos($target, '_blank') !== false || $target == 'yes' ? ' target="_blank" ' : "";
             $blank .= strpos($target, 'nofollow') !== false ? ' rel="nofollow" ' : "";
             $overlay = "";
             $style = "";
             $style .= AviaHelper::style_string($atts, 'overlay_text_color', 'color');
             if ($font_size) {
                 // $style = "style='font-size: {$font_size}px;'";
                 $style .= AviaHelper::style_string($atts, 'font_size', 'font-size', 'px');
             }
             $style = AviaHelper::style_string($style);
             if ($caption == "yes") {
                 $caption_style = "";
                 $caption_style .= AviaHelper::style_string($atts, 'overlay_opacity', 'opacity');
                 $caption_style .= AviaHelper::style_string($atts, 'overlay_color', 'background-color');
                 $caption_style = AviaHelper::style_string($caption_style);
                 $overlay_bg = "<div class='av-caption-image-overlay-bg' {$caption_style}></div>";
                 $content = ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content));
                 $overlay = "<div class='av-image-caption-overlay'>{$overlay_bg}<div class='av-image-caption-overlay-position'><div class='av-image-caption-overlay-center' {$style}>{$content}</div></div></div>";
                 $class .= " noHover ";
                 if (empty($appearance)) {
                     $appearance = "hover-deactivate";
                 }
                 if ($appearance) {
                     $class .= " av-overlay-" . $appearance;
                 }
             }
             $markup_url = avia_markup_helper(array('context' => 'image_url', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
             $markup = avia_markup_helper(array('context' => 'image', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
             $output .= "<div class='avia-image-container {$class} " . $meta['el_class'] . " " . $this->class_by_arguments('align', $atts, true) . "' {$markup} >";
             $output .= "<div class='avia-image-container-inner'>";
             if ($link) {
                 $output .= "<a href='{$link}' class='avia_image suppress-tooltip'  {$blank}>{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' {$markup_url} /></a>";
             } else {
                 $output .= "{$overlay}<img class='avia_image suppress-tooltip' src='{$src}' alt='{$alt}' title='{$title}'  {$markup_url} />";
             }
             $output .= "</div>";
             $output .= "</div>";
             $output .= '<div class="hr hr-default"><span class="hr-inner "><span class="hr-inner-style"></span></span></div>';
         }
     }
     return $output;
 }
开发者ID:robwilde,项目名称:HBQ-ValuVet,代码行数:95,代码来源:valuvet-image.php

示例12: av_tab

 function av_tab($atts, $content = "", $shortcodename = "")
 {
     $icon_el = $this->elements[2]['subelements'][2];
     //last element is the icon container
     $chars = $icon_el['chars'];
     if (!is_array($chars)) {
         include $icon_el['chars'];
     }
     $output = $titleClass = $contentClass = $icon = "";
     $tab_atts = shortcode_atts(array('title' => '', 'icon_select' => 'no', 'icon' => "1", 'custom_id' => ''), $atts);
     $display_char = isset($chars[$tab_atts['icon'] - 1]) ? $chars[$tab_atts['icon'] - 1] : $chars[0];
     if (is_numeric(avia_sc_tab::$initial) && avia_sc_tab::$counter == avia_sc_tab::$initial) {
         $titleClass = "active_tab";
         $contentClass = "active_tab_content";
     }
     if (empty($tab_atts['title'])) {
         $tab_atts['title'] = avia_sc_toggle::$counter;
     }
     if ($tab_atts['icon_select'] == "yes") {
         $icon = "<span class='tab_icon avia-font-" . $icon_el['font'] . "'>{$display_char}</span>";
     }
     if (empty($tab_atts['custom_id'])) {
         $tab_atts['custom_id'] = 'tab-id-' . avia_sc_tab::$tab_id++;
     }
     $output .= '<div data-fake-id="#' . $tab_atts['custom_id'] . '" class="tab ' . $titleClass . '">' . $icon . $tab_atts['title'] . '</div>' . "\n";
     $output .= '<div id="' . $tab_atts['custom_id'] . '-container" class="tab_content ' . $contentClass . '" >' . "\n";
     $output .= '<div class="tab_inner_content invers-color">' . "\n";
     $output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "\n";
     $output .= '</div>' . "\n";
     $output .= '</div>' . "\n";
     avia_sc_tab::$counter++;
     return $output;
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:33,代码来源:tabs.php

示例13: 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'] : "";
     return "<div class='avia_textblock {$custom_class}'>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:13,代码来源:textblock.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 = "")
 {
     global $avia_config;
     $avia_config['layout_container'] = "section";
     avia_sc_section::$section_count++;
     $atts = shortcode_atts(array('src' => '', 'position' => 'top left', 'id' => '', 'myclass' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $output = "";
     $class = "tab-body-content " . $color;
     $background = "";
     if (!empty($attachment) && !empty($attachment_size)) {
         $attachment_entry = get_post($attachment);
         if (!empty($attachment_entry)) {
             if (!empty($attachment_size)) {
                 $src = wp_get_attachment_image_src($attachment_entry->ID, $attachment_size);
                 $src = !empty($src[0]) ? $src[0] : "";
             }
         }
     } else {
         $attachment = false;
     }
     // display class on front end
     if ($myclass != '') {
         $class = "tab-body-content " . $myclass . " " . $attach;
     }
     // end display class
     if (!empty($attachment) && !empty($attachment_size)) {
         $attachment_entry = get_post($attachment);
         if (!empty($attachment_entry)) {
             if (!empty($attachment_size)) {
                 $src = wp_get_attachment_image_src($attachment_entry->ID, $attachment_size);
                 $src = !empty($src[0]) ? $src[0] : "";
             }
         }
     } else {
         $attachment = false;
     }
     // this outputs our start tags
     $output .= "<div id='tab-content-" . avia_sc_section::$section_count . "' class='{$class} container_wrap " . avia_layout_class('main', false) . "'>";
     //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);
     //Sarah these add the paralax section
     // $output .= avia_mynew_section($params);
     $output .= trim($content);
     unset($avia_config['layout_container']);
     $output .= '</div><!--sarahs end to parent tab section-->';
     return $output;
 }
开发者ID:spokehq,项目名称:emprise,代码行数:56,代码来源:tabbodycontent.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 = "")
 {
     avia_sc_button_full::$count++;
     $atts = shortcode_atts(array('label' => 'Click me', 'link' => '', 'link_target' => '', 'color' => 'theme-color', 'color_hover' => 'theme-color-subtle', 'custom_bg' => '#444444', 'custom_bg_hover' => '#444444', 'custom_font' => '#ffffff', 'position' => 'center', 'icon_select' => 'no', 'icon' => '', 'font' => '', 'icon_hover' => '', 'description_pos' => ''), $atts, $this->config['shortcode']);
     $display_char = av_icon($atts['icon'], $atts['font']);
     $style = "color:" . $atts['custom_font'] . "; ";
     $style_hover = "";
     if ($atts['color'] == "custom") {
         $style .= "background-color:" . $atts['custom_bg'] . ";  ";
     }
     if ($atts['color_hover'] == "custom") {
         $style_hover = "style='background-color:" . $atts['custom_bg_hover'] . "; '";
     }
     $extraClass = $atts['icon_hover'] ? "av-icon-on-hover" : "";
     $blank = strpos($atts['link_target'], '_blank') !== false ? ' target="_blank" ' : "";
     $blank .= strpos($atts['link_target'], 'nofollow') !== false ? ' rel="nofollow" ' : "";
     $link = AviaHelper::get_url($atts['link']);
     $link = $link == "http://" ? "" : $link;
     if ($style) {
         $style = "style='{$style}'";
     }
     $content_html = "";
     if ($content && $atts['description_pos'] == 'above') {
         $content_html .= "<div class='av-button-description av-button-description-above'>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     }
     if ('yes-left-icon' == $atts['icon_select']) {
         $content_html .= "<span class='avia_button_icon avia_button_icon_left ' {$display_char}></span>";
     }
     $content_html .= "<span class='avia_iconbox_title' >" . $atts['label'] . "</span>";
     if ('yes-right-icon' == $atts['icon_select']) {
         $content_html .= "<span class='avia_button_icon avia_button_icon_right' {$display_char}></span>";
     }
     if ($content && $atts['description_pos'] == 'below') {
         $content_html .= "<div class='av-button-description av-button-description-below'>" . ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
     }
     $output = "";
     $output .= "<a href='{$link}' class='avia-button avia-button-fullwidth {$extraClass} " . $this->class_by_arguments('icon_select, color', $atts, true) . "' {$blank} {$style} >";
     $output .= $content_html;
     $output .= "<span class='avia_button_background avia-button avia-button-fullwidth avia-color-" . $atts['color_hover'] . "' {$style_hover}></span>";
     $output .= "</a>";
     $output = "<div class='avia-button-wrap avia-button-" . $atts['position'] . " " . $meta['el_class'] . "'>" . $output . "</div>";
     $params['class'] = "main_color av-fullscreen-button avia-no-border-styling " . $meta['el_class'];
     $params['open_structure'] = false;
     $id = AviaHelper::save_string($atts['label'], '-');
     $params['id'] = !empty($id) ? $id : "av-fullwidth-button-" . avia_sc_button_full::$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 ($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 (!ShortcodeHelper::is_top_level()) {
         return $output;
     }
     $button_html = $output;
     $output = avia_new_section($params);
     $output .= $button_html;
     $output .= avia_section_after_element_content($meta, 'after_fullwidth_button');
     return $output;
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:71,代码来源:buttons_fullwidth.php


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