本文整理汇总了PHP中avia_markup_helper函数的典型用法代码示例。如果您正苦于以下问题:PHP avia_markup_helper函数的具体用法?PHP avia_markup_helper怎么用?PHP avia_markup_helper使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了avia_markup_helper函数的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('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'];
$subheading_extra = "";
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}'";
$subheading_extra = "av_custom_color";
}
// 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} {$subheading_extra}' 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} >{$heading}</{$tag}>";
$output .= $after;
$output .= "<div class='special-heading-border'><div class='special-heading-inner-border' {$border_styling}></div></div>";
$output .= "</div>";
}
return $output;
}
示例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;
}
示例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 = "")
{
$custom_class = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
$atts = shortcode_atts(array('wrapper_element' => '', 'deactivate_wrapper' => false, 'wrapper_element_attributes' => ''), $atts, $this->config['shortcode']);
$content = ' [avia_codeblock_placeholder uid="' . avia_sc_codeblock::$codeblock_id . '"] ';
if (!empty($atts['wrapper_element'])) {
$content = "<{$atts['wrapper_element']} {$atts['wrapper_element_attributes']}>{$content}</{$atts['wrapper_element']}>";
}
if (empty($atts['deactivate_wrapper'])) {
$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="avia_codeblock_section avia_code_block_' . avia_sc_codeblock::$codeblock_id . '" ' . $markup . '>';
$output .= "<div class='avia_codeblock {$custom_class}' {$markup_text}>" . $content . "</div>";
$output .= '</section>';
$content = $output;
}
avia_sc_codeblock::$codeblock_id++;
return $content;
}
示例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;
}
示例5: html
public function html()
{
global $avia_config;
$output = "";
if (empty($this->entries) || empty($this->entries->posts)) {
return $output;
}
avia_post_slider::$slide++;
extract($this->atts);
if ($preview_mode == 'auto') {
$image_size = 'portfolio';
}
$extraClass = 'first';
$grid = 'one_third';
$post_loop_count = 1;
$loop_counter = 1;
$autoplay = $autoplay == "no" ? false : true;
$total = $columns % 2 ? "odd" : "even";
switch ($columns) {
case "1":
$grid = 'av_fullwidth';
if ($preview_mode == 'auto') {
$image_size = 'large';
}
break;
case "2":
$grid = 'av_one_half';
break;
case "3":
$grid = 'av_one_third';
break;
case "4":
$grid = 'av_one_fourth';
if ($preview_mode == 'auto') {
$image_size = 'portfolio_small';
}
break;
case "5":
$grid = 'av_one_fifth';
if ($preview_mode == 'auto') {
$image_size = 'portfolio_small';
}
break;
}
$data = AviaHelper::create_data_string(array('autoplay' => $autoplay, 'interval' => $interval, 'animation' => $animation, 'show_slide_delay' => 90));
$thumb_fallback = "";
$markup = avia_markup_helper(array('context' => 'blog', 'echo' => false, 'custom_markup' => $custom_markup));
$output .= "<div {$data} class='avia-content-slider avia-content-{$type}-active avia-content-slider" . avia_post_slider::$slide . " avia-content-slider-{$total} {$class}' {$markup}>";
$output .= "<div class='avia-content-slider-inner'>";
foreach ($this->entries->posts as $entry) {
$the_id = $entry->ID;
$parity = $loop_counter % 2 ? 'odd' : 'even';
$last = $this->entries->post_count == $post_loop_count ? " post-entry-last " : "";
$post_class = "post-entry post-entry-{$the_id} slide-entry-overview slide-loop-{$post_loop_count} slide-parity-{$parity} {$last}";
$link = get_permalink($the_id);
$excerpt = "";
$title = '';
$show_meta = !is_post_type_hierarchical($entry->post_type);
$commentCount = get_comments_number($the_id);
$thumbnail = get_the_post_thumbnail($the_id, $image_size);
$format = get_post_format($the_id);
if (empty($format)) {
$format = "standard";
}
if ($thumbnail) {
$thumb_fallback = $thumbnail;
$thumb_class = "real-thumbnail";
} else {
$thumbnail = "<span class=' fallback-post-type-icon' " . av_icon_string($format) . "></span><span class='slider-fallback-image'>{{thumbnail}}</span>";
$thumb_class = "fake-thumbnail";
}
$permalink = '<div class="read-more-link"><a href="' . get_permalink($the_id) . '" class="more-link">' . __('Read more', 'avia_framework') . '<span class="more-link-arrow"> →</span></a></div>';
$prepare_excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters('avf_postgrid_excerpt_length', 60), apply_filters('avf_postgrid_excerpt_delimiter', " "), "…", true, '');
if ($format == 'link') {
$current_post = array();
$current_post['content'] = $entry->post_content;
$current_post['title'] = $entry->post_title;
if (function_exists('avia_link_content_filter')) {
$current_post = avia_link_content_filter($current_post);
}
$link = $current_post['url'];
}
switch ($contents) {
case "excerpt":
$excerpt = $prepare_excerpt;
$title = $entry->post_title;
break;
case "excerpt_read_more":
$excerpt = $prepare_excerpt;
$excerpt .= $permalink;
$title = $entry->post_title;
break;
case "title":
$excerpt = '';
$title = $entry->post_title;
break;
case "title_read_more":
$excerpt = $permalink;
$title = $entry->post_title;
break;
//.........这里部分代码省略.........
示例6: get_query_var
<?php
global $avia_config;
$author_id = get_query_var('author');
if (empty($author_id)) {
$author_id = get_the_author_meta('ID');
}
$name = apply_filters('avf_author_name', get_the_author_meta('display_name', $author_id), $author_id);
$email = apply_filters('avf_author_email', get_the_author_meta('email', $author_id), $author_id);
$gravatar_alt = esc_html($name);
$gravatar = get_avatar($email, '81', '', $gravatar_alt);
$name = "<span class='author-box-name' " . avia_markup_helper(array('context' => 'author_name', 'echo' => false)) . ">" . $name . "</span>";
$heading = __("About", 'avia_framework') . " " . $name;
$description = apply_filters('avf_author_description', get_the_author_meta('description', $author_id), $author_id);
echo '<section class="author-box" ' . avia_markup_helper(array('context' => 'author', 'echo' => false)) . '>';
if (empty($description)) {
$description = __("This author has yet to write their bio.", 'avia_framework');
$description .= '</br>' . sprintf(__('Meanwhile lets just say that we are proud %s contributed a whooping %s entries.', 'avia_framework'), $name, count_user_posts($author_id));
if (current_user_can('edit_users') || get_current_user_id() == $author_id) {
$description .= "</br><a href='" . admin_url('profile.php?user_id=' . $author_id) . "'>" . __('Edit the profile description here.', 'avia_framework') . "</a>";
}
}
echo "<span class='post-author-format-type blog-meta'><span class='rounded-container'>{$gravatar}</span></span>";
echo "<div class='author_description '>\n <h3 class='author-title'>{$heading}</h3>\n <div class='author_description_text'" . avia_markup_helper(array('context' => 'description', 'echo' => false)) . ">" . wpautop($description) . "</div><span class='author-extra-border'></span></div>";
echo '</section>';
示例7: render_entry
function render_entry($entry, $style)
{
$output = "";
$image = get_the_post_thumbnail($entry->ID, $this->atts['image_size'][$style]);
$link = get_permalink($entry->ID);
$titleAttr = "title='" . __('Link to:', 'avia_framework') . " " . the_title_attribute('echo=0') . "'";
$title = "<a href='{$link}' {$titleAttr}>" . get_the_title($entry->ID) . "</a>";
$titleTag = "h3";
$excerpt = "";
$time = get_the_time(get_option('date_format'), $entry->ID);
$separator = "<span class='av-magazine-text-sep text-sep-date'>/</span>";
$author = apply_filters('avf_author_name', get_the_author_meta('display_name', $entry->post_author), $entry->post_author);
$author = "<span class='av-magazine-author meta-color vcard author'><span class='fn'>" . __('by', 'avia_framework') . ' ' . $author . "</span></span>";
$markupEntry = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $entry->ID, 'custom_markup' => $this->atts['custom_markup']));
$markupTitle = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $entry->ID, 'custom_markup' => $this->atts['custom_markup']));
$markupContent = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $entry->ID, 'custom_markup' => $this->atts['custom_markup']));
$markupTime = avia_markup_helper(array('context' => 'entry_time', 'echo' => false, 'id' => $entry->ID, 'custom_markup' => $this->atts['custom_markup']));
$format = get_post_format($entry->ID) ? get_post_format($entry->ID) : 'standard';
$type = get_post_type($entry->ID);
$icontype = $type == 'post' ? $format : $type;
$icon = "<a href='{$link}' {$titleAttr} class='iconfont av-magazine-entry-icon' " . av_icon_string($icontype) . "></a>";
$extraClass = "";
if ($style == 'small') {
if (empty($this->atts['thumbnails'])) {
$image = "";
$extraClass = "av-magazine-no-thumb";
}
} else {
$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters('avf_magazine_excerpt_length', 60), apply_filters('avf_magazine_excerpt_delimiter', " "), "…", true, '');
}
$output .= "<article class='av-magazine-entry av-magazine-entry-id-" . $entry->ID . " av-magazine-format-{$format} av-magazine-type-{$type} av-magazine-entry-" . $entry->loop . " av-magazine-entry-" . $style . " {$extraClass}' {$markupEntry}>";
if ($this->atts['thumbnails'] || $style == 'big' && $image) {
$output .= "<div class='av-magazine-thumbnail'>";
if ($image) {
$output .= "<a href='{$link}' {$titleAttr} class='av-magazine-thumbnail-link '>{$image}</a>";
}
if (!$image) {
$output .= $icon;
}
$output .= "</div>";
}
$output .= "<div class='av-magazine-content-wrap'>";
$output .= "<header class='entry-content-header'>";
$output .= "<time class='av-magazine-time updated' {$markupTime}>" . $time . "</time>";
$output .= $separator . $author;
$output .= "<{$titleTag} class='av-magazine-title entry-title' {$markupTitle}>{$title}</{$titleTag}>";
$output .= "</header>";
if ($excerpt) {
$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}</div>";
}
$output .= "</div>";
$output .= "<footer class='entry-footer'></footer>";
$output .= "</article>";
return $output;
}
示例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 = "")
{
$output = "";
$class = "";
$alt = "";
$title = "";
$src = "";
$markup = avia_markup_helper(array('context' => 'image', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
$markup_url = avia_markup_helper(array('context' => 'image_url', 'echo' => false, 'custom_markup' => $meta['custom_markup']));
$hotspots = ShortcodeHelper::shortcode2array($content, 1);
extract(shortcode_atts(array('animation' => 'no-animation', 'attachment' => '', 'attachment_size' => '', 'hotspot_layout' => 'numbered', 'hotspot_mobile' => '', 'hotspot_tooltip_display' => ''), $atts, $this->config['shortcode']));
if (!empty($attachment)) {
$attachment_entry = get_post($attachment);
if (!empty($attachment_entry)) {
$alt = get_post_meta($attachment_entry->ID, '_wp_attachment_image_alt', true);
$alt = !empty($alt) ? esc_attr($alt) : '';
$title = trim($attachment_entry->post_title) ? esc_attr($attachment_entry->post_title) : "";
if (!empty($attachment_size)) {
$src = wp_get_attachment_image_src($attachment_entry->ID, $attachment_size);
$src = !empty($src[0]) ? $src[0] : "";
}
}
}
//no src? return
if (!empty($src)) {
if (!ShortcodeHelper::is_top_level()) {
$meta['el_class'] .= " av-non-fullwidth-hotspot-image";
}
$hotspot_html = "";
$tooltip_html = "";
$counter = 1;
foreach ($hotspots as $hotspot) {
if (!empty($hotspot_mobile)) {
$tooltip_html .= $this->add_fallback_tooltip($hotspot, $counter);
}
$extraClass = !empty($hotspot_mobile) ? " av-mobile-fallback-active " : "";
$extraClass .= !empty($hotspot_tooltip_display) ? " {$hotspot_tooltip_display}-single " : "";
$hotspot_html .= $this->add_hotspot($hotspot, $counter, $extraClass);
$counter++;
}
//some custom classes
$class .= $animation == "no-animation" ? "" : " avia_animated_image avia_animate_when_almost_visible " . $animation;
$class .= " av-hotspot-" . $hotspot_layout;
$class .= !empty($hotspot_mobile) ? " av-mobile-fallback-active " : "";
$class .= " " . $hotspot_tooltip_display;
$output .= "<div class='av-hotspot-image-container avia_animate_when_almost_visible {$class} " . $meta['el_class'] . " ' {$markup} >";
$output .= "<div class='av-hotspot-container'>";
$output .= "<div class='av-hotspot-container-inner-cell'>";
$output .= "<div class='av-hotspot-container-inner-wrap'>";
$output .= $hotspot_html;
$output .= "<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' {$markup_url} />";
$output .= "</div>";
$output .= "</div>";
$output .= "</div>";
$output .= $tooltip_html;
$output .= "</div>";
}
if (!ShortcodeHelper::is_top_level()) {
return $output;
}
$skipSecond = false;
$params['class'] = "main_color av-fullwidth-hotspots " . $meta['el_class'];
$params['open_structure'] = false;
$params['id'] = !empty($atts['id']) ? AviaHelper::save_string($atts['id'], '-') : "";
$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;
}
$image = $output;
$output = avia_new_section($params);
$output .= $image;
$output .= "</div>";
//close section
//if the next tag is a section dont create a new section from this shortcode
if (!empty($meta['siblings']['next']['tag']) && in_array($meta['siblings']['next']['tag'], AviaBuilder::$full_el)) {
$skipSecond = true;
}
//if there is no next element dont create a new section.
if (empty($meta['siblings']['next']['tag'])) {
$skipSecond = true;
}
if (empty($skipSecond)) {
$output .= avia_new_section(array('close' => false, 'id' => "after_image_hotspots"));
}
return $output;
}
示例9: enfold_action_sidebar_left_open
/**
* Sidebar left open functions.
*
* @since 1.0.0
* @package GeoDirectory
* @param string $type Page type.
* @param string $id The id of the HTML element.
* @param string $class The class of the HTML element.
* @param string $itemtype HTML itemtype 'http://schema.org/WPSideBar'.
*/
function enfold_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
{
$sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">";
echo "<div class='inner_sidebar extralight-border'>";
}
示例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 = "")
{
global $avia_config;
if (empty($atts['categories'])) {
$atts['categories'] = "";
}
if (isset($atts['link']) && isset($atts['blog_type']) && $atts['blog_type'] == 'taxonomy') {
$atts['link'] = explode(',', $atts['link'], 2);
$atts['taxonomy'] = $atts['link'][0];
if (!empty($atts['link'][1])) {
$atts['categories'] = $atts['link'][1];
} else {
if (!empty($atts['taxonomy'])) {
$taxonomy_terms_obj = get_terms($atts['taxonomy']);
foreach ($taxonomy_terms_obj as $taxonomy_term) {
$atts['categories'] .= $taxonomy_term->term_id . ',';
}
}
}
}
$atts = shortcode_atts(array('blog_style' => '', 'columns' => 3, 'blog_type' => 'posts', 'items' => '16', 'paginate' => 'yes', 'categories' => '', 'preview_mode' => 'auto', 'image_size' => 'portfolio', 'taxonomy' => 'category', 'post_type' => get_post_types(), 'contents' => 'excerpt', 'content_length' => 'content', 'offset' => '0'), $atts);
if ($atts['blog_style'] == "blog-grid") {
$atts['class'] = $meta['el_class'];
$atts['type'] = 'grid';
//using the post slider with inactive js will result in displaying a nice post grid
$slider = new avia_post_slider($atts);
$slider->query_entries();
return $slider->html();
}
$this->query_entries($atts);
$avia_config['blog_style'] = $atts['blog_style'];
$avia_config['preview_mode'] = $atts['preview_mode'];
$avia_config['image_size'] = $atts['image_size'];
$avia_config['blog_content'] = $atts['content_length'];
$avia_config['remove_pagination'] = $atts['paginate'] === "yes" ? false : true;
$more = 0;
ob_start();
//start buffering the output instead of echoing it
get_template_part('includes/loop', 'index');
$output = ob_get_clean();
wp_reset_query();
avia_set_layout_array();
if ($output) {
$markup = avia_markup_helper(array('context' => 'blog', 'echo' => false));
$output = "<div class='template-blog' {$markup}>{$output}</div>";
}
return $output;
}
示例11: avia_woocommerce_before_shop_loop
function avia_woocommerce_before_shop_loop()
{
global $avia_config;
if (isset($avia_config['dynamic_template'])) {
return;
}
$markup = avia_markup_helper(array('context' => 'content', 'echo' => false, 'post_type' => 'products'));
echo "<main class='template-shop content " . avia_layout_class('content', false) . " units' {$markup}><div class='entry-content-wrapper'>";
}
示例12: av_tab
function av_tab($atts, $content = "", $shortcodename = "")
{
$output = $titleClass = $contentClass = $icon = "";
$tab_atts = shortcode_atts(array('title' => '', 'icon_select' => 'no', 'icon' => "", 'custom_id' => '', 'font' => '', 'custom_markup' => ''), $atts, 'av_tab');
$display_char = av_icon($tab_atts['icon'], $tab_atts['font']);
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' {$display_char}></span>";
}
if (empty($tab_atts['custom_id'])) {
$tab_atts['custom_id'] = 'tab-id-' . avia_sc_tab::$tab_id++;
}
$markup_tab = avia_markup_helper(array('context' => 'entry', 'echo' => false, 'custom_markup' => $tab_atts['custom_markup']));
$markup_title = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'custom_markup' => $tab_atts['custom_markup']));
$markup_text = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'custom_markup' => $tab_atts['custom_markup']));
$output .= '<section class="av_tab_section" ' . $markup_tab . '>';
$output .= ' <div data-fake-id="#' . $tab_atts['custom_id'] . '" class="tab ' . $titleClass . '" ' . $markup_title . '>' . $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" ' . $markup_text . '>' . "\n";
$output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "\n";
$output .= ' </div>' . "\n";
$output .= ' </div>' . "\n";
$output .= '</section>' . "\n";
avia_sc_tab::$counter++;
return $output;
}
示例13: wp_head
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
<body id="top" <?php
body_class($style . " " . $avia_config['font_stack'] . " " . $blank);
avia_markup_helper(array('context' => 'body'));
?>
>
<div id='wrap_all'>
<?php
if (!$blank) {
//fetch the template file that holds the main menu, located in includes/helper-menu-main.php
get_template_part('includes/helper', 'main-menu');
}
?>
<div id='main' data-scroll-offset='<?php
echo avia_header_setting('header_scroll_offset');
?>
示例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 = "")
{
$output = "";
$class = "";
$alt = "";
$title = "";
$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);
if (!empty($attachment)) {
$attachment_entry = get_post($attachment);
if (!empty($attachment_entry)) {
$alt = get_post_meta($attachment_entry->ID, '_wp_attachment_image_alt', true);
$alt = !empty($alt) ? esc_attr($alt) : '';
$title = trim($attachment_entry->post_title) ? esc_attr($attachment_entry->post_title) : "";
if (!empty($attachment_size)) {
$src = wp_get_attachment_image_src($attachment_entry->ID, $attachment_size);
$src = !empty($src[0]) ? $src[0] : "";
}
}
} 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' {$blank}>{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' {$markup_url} /></a>";
} else {
$output .= "{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' {$markup_url} />";
}
$output .= "</div>";
$output .= "</div>";
}
}
return $output;
}
示例15: filter_quote
function filter_quote($entry)
{
$output = "";
$output .= "<blockquote class='first-quote' " . avia_markup_helper(array('context' => 'entry_title', 'echo' => false)) . ">";
$output .= get_the_title($entry->ID);
$output .= "</blockquote>";
$entry->av_title = $output;
}