function build_icon($icon) { global $avia_config; //special cases switch ($icon['social_icon']) { case 'rss': if (empty($icon['social_icon_link'])) { $icon['social_icon_link'] = get_bloginfo('rss2_url'); } break; case 'twitter': case 'dribbble': case 'vimeo': case 'behance': if (strpos($icon['social_icon_link'], 'http') === false && !empty($icon['social_icon_link'])) { $icon['social_icon_link'] = "http://" . $icon['social_icon'] . ".com/" . $icon['social_icon_link'] . "/"; } break; } if (empty($icon['social_icon_link'])) { $icon['social_icon_link'] = "#"; } $blank = "target='_blank'"; //dont add target blank to relative urls or urls to the same dmoain if (strpos($icon['social_icon_link'], 'http') === false || strpos($icon['social_icon_link'], home_url()) !== false) { $blank = ""; } $html = ""; $html .= "<" . $this->args['inside'] . " class='" . $this->args['class'] . "_" . $icon['social_icon'] . " social_icon_" . $this->counter . "'>"; $html .= "<a {$blank} href='" . $icon['social_icon_link'] . "' " . av_icon_string($icon['social_icon']) . " title='" . ucfirst($icon['social_icon']) . "'></a>"; $html .= "</" . $this->args['inside'] . ">"; return $html; }
protected function slide_navigation_arrows() { global $avia_config; $html = ""; $html .= "<div class='avia-slideshow-arrows avia-slideshow-controls'>"; $html .= "<a href='#prev' class='prev-slide' " . av_icon_string('prev_big') . ">" . __('Previous', 'avia_framework') . "</a>"; $html .= "<a href='#next' class='next-slide' " . av_icon_string('next_big') . ">" . __('Next', 'avia_framework') . "</a>"; $html .= "</div>"; return $html; }
} </style> <![endif]--> <?php echo "<div class='bg_container' style='background-image:url(" . $avia_config['fullscreen_image'] . ");'></div>"; } ?> <?php /* Always have wp_footer() just before the closing </body> * tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */ wp_footer(); ?> <a href='#top' title='<?php _e('Scroll to top', 'avia_framework'); ?> ' id='scroll-top-link' <?php echo av_icon_string('scrolltop'); ?> ><span class="avia_hidden_link_text"><?php _e('Scroll to top', 'avia_framework'); ?> </span></a> <div id="fb-root"></div> </body> </html>
function avia_woocommerce_cart_dropdown() { global $woocommerce, $avia_config; $cart_subtotal = $woocommerce->cart->get_cart_subtotal(); $link = $woocommerce->cart->get_cart_url(); $output = ""; $output .= "<ul class = 'cart_dropdown' data-success='" . __('was added to the cart', 'avia_framework') . "'><li class='cart_dropdown_first'>"; $output .= "<a class='cart_dropdown_link' href='" . $link . "'><span " . av_icon_string('cart') . "></span></a><!--<span class='cart_subtotal'>" . $cart_subtotal . "</span>-->"; $output .= "<div class='dropdown_widget dropdown_widget_cart'><div class='avia-arrow'></div>"; $output .= '<div class="widget_shopping_cart_content"></div>'; $output .= "</div>"; $output .= "</li></ul>"; echo $output; }
function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; //dont display if a fullscreen slider is available since they overlap if (class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count) || class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count)) { $settings['is_fullwidth'] = true; } $settings['type'] = get_post_type(); $settings['taxonomy'] = $settings['type'] == 'portfolio' ? 'portfolio_entries' : $taxonomy; if (!is_singular() || is_post_type_hierarchical($settings['type'])) { $settings['is_hierarchical'] = true; } if ($settings['type'] === 'topic' || $settings['type'] === 'reply') { $settings['is_bbpress'] = true; } $settings = apply_filters('avia_post_nav_settings', $settings); if (!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) { return; } if (version_compare($settings['wpversion'], '3.8', '>=')) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if (empty($entry)) { continue; } $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID), 75, " "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' " . av_icon_string($key) . "></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if ($image) { $tc2 = " <span class='entry-image'>{$image}</span>"; } $output .= $key == 'prev' ? $tc1 . $tc2 : $tc2 . $tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; }
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; }
function html() { global $avia_config; if ($this->counter == 0) { return; } $this->html .= "<div class='av-share-box'>"; $this->html .= "<h5 class='av-share-link-description'>"; $this->html .= apply_filters('avia_social_share_title', __("Share this entry", 'avia_framework'), $this->args); $this->html .= "</h5>"; $this->html .= "<ul class='av-share-box-list noLightbox'>"; foreach ($this->args as $key => $share) { if (empty($share['url'])) { continue; } $icon = isset($share['icon']) ? $share['icon'] : $key; $name = isset($share['label']) ? $share['label'] : __("Share on", 'avia_framework') . " " . ucfirst($key); $blank = strpos($share['url'], 'mailto') !== false ? "" : "target='_blank'"; $this->html .= "<li class='av-share-link av-social-link-{$key}' >"; $this->html .= "<a {$blank} href='" . $share['url'] . "' " . av_icon_string($icon) . " title='' data-avia-related-tooltip='{$name}'><span class='avia_hidden_link_text'>{$name}</span></a>"; $this->html .= "</li>"; } $this->html .= "</ul>"; $this->html .= "</div>"; return $this->html; }
function avia_woocommerce_cart_dropdown() { global $woocommerce, $avia_config; $cart_subtotal = $woocommerce->cart->get_cart_subtotal(); $link = $woocommerce->cart->get_cart_url(); $id = ""; $added = wc_get_notices('success'); $trigger = !empty($added) ? "av-display-cart-on-load" : ""; if (avia_get_option('cart_icon') == "always_display_menu") { $id = 'id="menu-item-shop"'; } $output = ""; $output .= "<ul {$id} class = 'cart_dropdown {$trigger}' data-success='" . __('was added to the cart', 'avia_framework') . "'><li class='cart_dropdown_first'>"; $output .= "<a class='cart_dropdown_link' href='" . $link . "'><span " . av_icon_string('cart') . "></span><span class='av-cart-counter'>0</span><span class='avia_hidden_link_text'>" . __('Shopping Cart', 'avia_framework') . "</span></a><!--<span class='cart_subtotal'>" . $cart_subtotal . "</span>-->"; $output .= "<div class='dropdown_widget dropdown_widget_cart'><div class='avia-arrow'></div>"; $output .= '<div class="widget_shopping_cart_content"></div>'; $output .= "</div>"; $output .= "</li></ul>"; echo $output; }
} //echo preview image if (strpos($blog_style, 'big') !== false) { if ($slider) { $slider = '<a href="' . $link . '" title="' . $featured_img_desc . '">' . $slider . '</a>'; } if ($slider) { echo '<div class="big-preview ' . $blog_style . '">' . $slider . '</div>'; } } if (!empty($before_content)) { echo '<div class="big-preview ' . $blog_style . '">' . $before_content . '</div>'; } echo "<div class='blog-meta'>"; $blog_meta_output = ""; $icon = '<span class="iconfont" ' . av_icon_string($post_format) . '></span>'; if (strpos($blog_style, 'multi') !== false) { $gravatar = ""; $link = get_post_format_link($post_format); if ($post_format == 'standard') { $author_name = apply_filters('avf_author_name', get_the_author_meta('display_name', $post->post_author), $post->post_author); $author_email = apply_filters('avf_author_email', get_the_author_meta('email', $post->post_author), $post->post_author); $gravatar_alt = esc_html($author_name); $gravatar = get_avatar($author_email, '81', "blank", $gravatar_alt); $link = get_author_posts_url($post->post_author); } $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>" . $gravatar . $icon . "</span></a>"; } else { if (strpos($blog_style, 'small') !== false) { $blog_meta_output = "<a href='{$link}' class='small-preview' title='{$featured_img_desc}'>" . $slider . $icon . "</a>"; }
/** * 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_sc_section::$section_count++; $atts = shortcode_atts(array('src' => '', 'position' => 'top left', 'repeat' => 'no-repeat', 'attach' => 'scroll', 'color' => 'main_color', 'custom_bg' => '', 'padding' => 'default', 'shadow' => 'shadow', 'id' => '', 'min_height' => '', 'min_height_px' => '', 'video' => '', 'video_ratio' => '16:9', 'video_mobile_disabled' => '', 'custom_markup' => '', 'attachment' => '', 'attachment_size' => '', 'bottom_border' => '', 'overlay_enable' => '', 'overlay_opacity' => '', 'overlay_color' => '', 'overlay_pattern' => '', 'overlay_custom_pattern' => '', 'scroll_down' => ''), $atts, $this->config['shortcode']); extract($atts); $output = ""; $class = "avia-section " . $color . " avia-section-" . $padding . " avia-" . $shadow; $background = ""; $params['id'] = !empty($id) ? AviaHelper::save_string($id, '-') : "av_section_" . avia_sc_section::$section_count; $params['custom_markup'] = $meta['custom_markup']; $params['attach'] = ""; 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; } if ($custom_bg != "") { $background .= "background-color: {$custom_bg}; "; } /*set background image*/ if ($src != "") { if ($repeat == 'stretch') { $background .= "background-repeat: no-repeat; "; $class .= " avia-full-stretch"; } else { $background .= "background-repeat: {$repeat}; "; } $background .= "background-image: url({$src}); "; $background .= $attach == 'parallax' ? "background-attachment: scroll; " : "background-attachment: {$attach}; "; $background .= "background-position: {$position}; "; if ($attach == 'parallax') { $attachment_class = ""; if ($repeat == 'stretch' || $repeat == 'no-repeat') { $attachment_class .= " avia-full-stretch"; } $class .= " av-parallax-section"; $speed = apply_filters('avf_parallax_speed', "0.3", $params['id']); $params['attach'] .= "<div class='av-parallax' data-avia-parallax-ratio='{$speed}' >"; $params['attach'] .= "<div class='av-parallax-inner {$color} {$attachment_class}' style = '{$background}' >"; $params['attach'] .= "</div>"; $params['attach'] .= "</div>"; $background = ""; } $params['data'] = "data-section-bg-repeat='{$repeat}'"; } else { $attach = "scroll"; } if ($custom_bg != "") { $background .= "background-color: {$custom_bg}; "; } if ($background) { $background = "style = '{$background}'"; } /*check/create overlay*/ $overlay = ""; $pre_wrap = "<div class='av-section-color-overlay-wrap'>"; if (!empty($overlay_enable)) { $overlay_src = ""; $overlay = "opacity: {$overlay_opacity}; "; if (!empty($overlay_color)) { $overlay .= "background-color: {$overlay_color}; "; } if (!empty($overlay_pattern)) { if ($overlay_pattern == "custom") { $overlay_src = $overlay_custom_pattern; } else { $overlay_src = str_replace('{{AVIA_BASE_URL}}', AVIA_BASE_URL, $overlay_pattern); } } if (!empty($overlay_src)) { $overlay .= "background-image: url({$overlay_src}); background-repeat: repeat;"; } $overlay = "<div class='av-section-color-overlay' style='{$overlay}'></div>"; $class .= " av-section-color-overlay-active"; $params['attach'] .= $pre_wrap . $overlay; } if (!empty($scroll_down)) { if (!$overlay) { $params['attach'] .= $pre_wrap; } $params['attach'] .= "<a href='#next-section' title='' class='scroll-down-link' " . av_icon_string('scrolldown') . "></a>"; } $class .= " avia-bg-style-" . $attach; $params['class'] = $class . " " . $meta['el_class']; $params['bg'] = $background; $params['min_height'] = $min_height; $params['min_height_px'] = $min_height_px; $params['video'] = $video; $params['video_ratio'] = $video_ratio; $params['video_mobile_disabled'] = $video_mobile_disabled; if (isset($meta['index'])) { if ($meta['index'] == 0) { $params['main_container'] = true; } if ($meta['index'] == 0 || isset($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) { $params['close'] = false; } } $avia_config['layout_container'] = "section"; $output .= avia_new_section($params); $output .= ShortcodeHelper::avia_remove_autop($content, true); /*set extra arrow element*/ if (strpos($bottom_border, 'border-extra') !== false) { $backgroundEl = ""; $backgroundElColor = !empty($custom_bg) ? $custom_bg : $avia_config['backend_colors']['color_set'][$color]['bg']; if ($backgroundElColor) { $backgroundEl = " style='background-color:{$backgroundElColor};' "; } avia_sc_section::$add_to_closing = "<div class='av-extra-border-element {$bottom_border}'><div class='av-extra-border-outer'><div class='av-extra-border-inner' {$backgroundEl}></div></div></div>"; } else { avia_sc_section::$add_to_closing = ""; } //next section needs an extra closing tag if overlay with wrapper was added: if ($overlay || !empty($scroll_down)) { avia_sc_section::$close_overlay = "</div>"; } else { avia_sc_section::$close_overlay = ""; } //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 we got a sidebar always create a next section at the bottom if (empty($meta['siblings']['next']['tag']) && !avia_has_sidebar()) { $skipSecond = true; } if (empty($skipSecond)) { $new_params['id'] = "after_section_" . avia_sc_section::$section_count; $output .= avia_new_section($new_params); } unset($avia_config['layout_container']); return $output; }
public function html() { if (empty($this->entries) || empty($this->entries->posts)) { return; } avia_post_grid::$grid++; extract($this->atts); $container_id = avia_post_grid::$grid; $extraClass = 'first'; $grid = 'one_fourth'; if ($preview_mode == 'auto') { $image_size = 'portfolio'; } $post_loop_count = 1; $loop_counter = 1; $output = ""; $style_class = empty($style) ? 'no_margin' : $style; $total = $this->entries->post_count % 2 ? "odd" : "even"; if ($set_breadcrumb && is_page()) { $_SESSION["avia_{$post_type}"] = get_the_ID(); } switch ($columns) { case "1": $grid = 'av_fullwidth'; if ($preview_mode == 'auto') { $image_size = 'featured'; } 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; case "6": $grid = 'av_one_sixth'; if ($preview_mode == 'auto') { $image_size = 'portfolio_small'; } break; } if ($fullscreen && $preview_mode == 'auto' && $image_size == "portfolio_small") { $image_size = 'portfolio'; } $output .= $sort == "yes" ? $this->sort_buttons($this->entries->posts, $this->atts) : ""; if ($linking == "ajax") { global $avia_config; $container_class = $fullscreen ? "container" : ""; $output .= "<div class='portfolio_preview_container {$container_class}' data-portfolio-id='{$container_id}'>\n\t\t\t\t\t\t\t\t<div class='ajax_controlls iconfont'>\n\t\t\t\t\t\t\t\t\t<a href='#prev' class='ajax_previous' \t" . av_icon_string('prev') . "></a>\n\t\t\t\t\t\t\t\t\t<a href='#next' class='ajax_next'\t\t" . av_icon_string('next') . "></a>\n\t\t\t\t\t\t\t\t\t<a class='avia_close' href='#close'\t\t" . av_icon_string('close') . "></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='portfolio-details-inner'></div>\n\t\t\t\t\t\t\t</div>"; } $output .= "<div class='{$class} grid-sort-container isotope {$style_class}-container with-{$contents}-container grid-total-{$total} grid-col-{$columns} grid-links-{$linking}' data-portfolio-id='{$container_id}'>"; foreach ($this->entries->posts as $entry) { $the_id = $entry->ID; $parity = $post_loop_count % 2 ? 'odd' : 'even'; $last = $this->entries->post_count == $post_loop_count ? " post-entry-last " : ""; $post_class = "post-entry post-entry-{$the_id} grid-entry-overview grid-loop-{$post_loop_count} grid-parity-{$parity} {$last}"; $sort_class = $this->sort_cat_string($the_id, $this->atts); switch ($linking) { case "lightbox": $link = wp_get_attachment_image_src(get_post_thumbnail_id($the_id), 'large'); $link = $link[0]; break; default: $link = get_permalink($the_id); break; } $title_link = get_permalink($the_id); $custom_link = get_post_meta($the_id, '_portfolio_custom_link', true) != "" ? get_post_meta($the_id, '_portfolio_custom_link_url', true) : false; if ($custom_link) { $title_link = $link = $custom_link; } $excerpt = ''; $title = ''; switch ($contents) { case "excerpt": $excerpt = $entry->post_excerpt; $title = $entry->post_title; break; case "title": $excerpt = ''; $title = $entry->post_title; break; case "only_excerpt": $excerpt = $entry->post_excerpt; $title = ''; break; case "no": $excerpt = ''; $title = ''; break; } $custom_overlay = apply_filters('avf_portfolio_custom_overlay', "", $entry); $link_markup = apply_filters('avf_portfolio_custom_image_container', array("a href='{$link}' title='" . esc_attr(strip_tags($title)) . "' ", 'a'), $entry); $title = apply_filters('avf_portfolio_title', $title, $entry); $title_link = apply_filters('avf_portfolio_title_link', $title_link, $entry); if ($columns == "1" && $one_column_template == 'special') { $extraClass .= ' special_av_fullwidth '; $output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>"; $output .= "<article class='main_color inner-entry' " . avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">"; $output .= apply_filters('avf_portfolio_extra', "", $entry); $output .= "<div class='av_table_col first portfolio-entry grid-content'>"; if (!empty($title)) { $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)); $output .= '<header class="entry-content-header">'; $output .= "<h2 class='portfolio-grid-title entry-title' {$markup}><a href='{$title_link}'>" . $title . "</a></h2>"; $output .= '</header>'; } if (!empty($excerpt)) { $markup = avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)); $output .= "<div class='entry-content-wrapper'>"; $output .= "<div class='grid-entry-excerpt entry-content' {$markup}>" . $excerpt . "</div>"; $output .= "</div>"; } $output .= '<div class="avia-arrow"></div>'; $output .= "</div>"; $image = get_the_post_thumbnail($the_id, $image_size); if (!empty($image)) { $output .= "<div class='av_table_col portfolio-grid-image'>"; $output .= "<" . $link_markup[0] . " data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>" . $custom_overlay . $image . "</" . $link_markup[1] . ">"; $output .= "</div>"; } $output .= '<footer class="entry-footer"></footer>'; $output .= "</article>"; $output .= "</div>"; } else { $extraClass .= ' default_av_fullwidth '; $output .= "<div data-ajax-id='{$the_id}' class=' grid-entry flex_column isotope-item all_sort {$style_class} {$post_class} {$sort_class} {$grid} {$extraClass}'>"; $output .= "<article class='main_color inner-entry' " . avia_markup_helper(array('context' => 'entry', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">"; $output .= apply_filters('avf_portfolio_extra', "", $entry); $output .= "<" . $link_markup[0] . " data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>" . $custom_overlay . get_the_post_thumbnail($the_id, $image_size) . "</" . $link_markup[1] . ">"; $output .= !empty($title) || !empty($excerpt) ? "<div class='grid-content'><div class='avia-arrow'></div>" : ''; if (!empty($title)) { $markup = avia_markup_helper(array('context' => 'entry_title', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)); $output .= '<header class="entry-content-header">'; $output .= "<h3 class='grid-entry-title entry-title' {$markup}><a href='{$title_link}' title='" . esc_attr(strip_tags($title)) . "'>" . $title . "</a></h3>"; $output .= '</header>'; } $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' " . avia_markup_helper(array('context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup)) . ">" . $excerpt . "</div>" : ''; $output .= !empty($title) || !empty($excerpt) ? "</div>" : ''; $output .= '<footer class="entry-footer"></footer>'; $output .= "</article>"; $output .= "</div>"; } $loop_counter++; $post_loop_count++; $extraClass = ""; if ($loop_counter > $columns) { $loop_counter = 1; $extraClass = 'first'; } } $output .= "</div>"; //append pagination if ($paginate == "yes" && ($avia_pagination = avia_pagination($this->entries->max_num_pages, 'nav'))) { $output .= "<div class='pagination-wrap pagination-{$post_type}'>{$avia_pagination}</div>"; } return $output; }
function slide_navigation_arrows() { $html = ""; $html .= "<div class='avia-slideshow-arrows avia-slideshow-controls' {$this->content_styling}>"; $html .= "<a href='#prev' class='prev-slide' " . av_icon_string('prev_big') . ">" . __('Previous', 'avia_framework') . "</a>"; $html .= "<a href='#next' class='next-slide' " . av_icon_string('next_big') . ">" . __('Next', 'avia_framework') . "</a>"; $html .= "</div>"; return $html; }
/** * 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; }
function av_icon_display($char, $extra_class = "") { return "<span class='av-icon-display {$extra_class}' " . av_icon_string($char) . "></span>"; }
} if (!$format) { $format = 'standard'; } $post_thumbnail_id = get_post_thumbnail_id($related_post->ID); $post_thumb = get_the_post_thumbnail($related_post->ID, $image_size, array('title' => esc_attr(get_the_title($post_thumbnail_id)))); $image = $post_thumb ? $post_thumb : "<span class='related_posts_default_image'>{image}</span>"; $fake_image = $post_thumb ? $post_thumb : $fake_image; $extra_class = $post_thumb ? "" : "related-format-visible"; $parity = $slidecount % 2 ? 'Odd' : 'Even'; $insert_tooltip = $tooltip == true ? "data-avia-related-tooltip=\"" . htmlspecialchars($related_post->post_title) . "\"" : ""; $output .= "<div class='{$post_class} {$extra} relThumb relThumb{$count} relThumb{$parity} post-format-{$format} related_column'>\n"; $output .= "\t<a href='" . get_permalink($related_post->ID) . "' class='relThumWrap noLightbox'>\n"; $output .= "\t<span class='related_image_wrap' {$insert_tooltip}>"; $output .= $image; $output .= "\t<span class='related-format-icon {$extra_class}'><span class='related-format-icon-inner' " . av_icon_string($format) . "></span></span>"; $output .= "\t</span>"; $output .= apply_filters('avf_related_post_loop', "", $related_post); $output .= "\t</a>"; $output .= "</div>"; $count++; $extra = ""; if ($count == count($my_query)) { $extra = 'omega'; } } $output .= "</div></div>"; $output = str_replace("{image}", $fake_image, $output); if ($related_posts) { echo $output; }
} ?> <header id='header' class=' header_color <?php avia_is_dark_bg('header_color'); echo " " . $headerS['header_class']; ?> ' <?php avia_markup_helper(array('context' => 'header', 'post_type' => 'forum')); ?> > <?php if ($responsive) { echo '<a id="advanced_menu_toggle" href="#" ' . av_icon_string('mobile_menu') . '></a>'; echo '<a id="advanced_menu_hide" href="#" ' . av_icon_string('close') . '></a>'; } //subheader, only display when the user chooses a social header if ($headerS['header_topbar'] == true) { ?> <div id='header_meta' class='container_wrap container_wrap_meta <?php echo avia_header_class_string(array('header_social', 'header_secondary_menu', 'header_phone_active'), 'av_'); ?> '> <div class='container'> <?php /* * display the themes social media icons, defined in the wordpress backend * the avia_social_media_icons function is located in includes/helper-social-media-php */