本文整理汇总了PHP中ShortcodeHelper类的典型用法代码示例。如果您正苦于以下问题:PHP ShortcodeHelper类的具体用法?PHP ShortcodeHelper怎么用?PHP ShortcodeHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ShortcodeHelper类的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 = "")
{
$atts = shortcode_atts(array('email' => get_option('admin_email'), 'button' => __("Submit", 'avia_framework'), 'autorespond' => '', 'captcha' => '', 'subject' => '', 'sent' => __("Your message has been sent!", 'avia_framework'), 'title' => __("Send us mail", 'avia_framework')), $atts);
extract($atts);
$post_id = function_exists('avia_get_the_id') ? avia_get_the_id() : get_the_ID();
$form_args = array("heading" => $title ? "<h3>" . $title . "</h3>" : "", "success" => "<h3 class='avia-form-success'>" . $sent . "</h3>", "submit" => $button, "myemail" => $email, "action" => get_permalink($post_id), "myblogname" => get_option('blogname'), "autoresponder" => $autorespond, "autoresponder_subject" => __('Thank you for your Message!', 'avia_framework'), "autoresponder_email" => $email, "subject" => $subject, "form_class" => $meta['el_class'], "multiform" => true, "label_first" => true);
if (trim($form_args['myemail']) == '') {
$form_args['myemail'] = get_option('admin_email');
}
//form fields passed by the user
$form_fields = $this->helper_array2form_fields(ShortcodeHelper::shortcode2array($content));
//fake username field that is not visible. if the field has a value a spam bot tried to send the form
$elements['avia_username'] = array('type' => 'decoy', 'label' => '', 'check' => 'must_empty');
//captcha field for the user to verify that he is real
if ($captcha) {
$elements['avia_age'] = array('type' => 'captcha', 'check' => 'captcha', 'label' => __('Please prove that you are human by solving the equation', 'avia_framework'));
}
//merge all fields
$form_fields = apply_filters('avia_contact_form_elements', array_merge($form_fields, $elements));
$form_args = apply_filters('avia_contact_form_args', $form_args);
$contact_form = new avia_form($form_args);
$contact_form->create_elements($form_fields);
$output = $contact_form->display_form(true);
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 = "")
{
extract(shortcode_atts(array('position' => 'left'), $atts));
$icon_el = $this->elements[0]['subelements'][4];
$chars = $icon_el['chars'];
if (!is_array($chars)) {
include $icon_el['chars'];
}
$bars = ShortcodeHelper::shortcode2array($content);
$output = "";
if (!empty($bars)) {
$output .= "<div class='avia-progress-bar-container avia_animate_when_almost_visible " . $meta['el_class'] . "'>";
$defaults = array('color' => 'theme-color', 'progress' => "100", 'title' => "", 'icon' => 1, "icon_select" => "no");
foreach ($bars as $bar) {
$bar['attr'] = array_merge($defaults, $bar['attr']);
$display_char = isset($chars[$bar['attr']['icon'] - 1]) ? $chars[$bar['attr']['icon'] - 1] : $chars[0];
$output .= "<div class='avia-progress-bar " . $bar['attr']['color'] . "-bar icon-bar-" . $bar['attr']['icon_select'] . "'>";
if ($bar['attr']['icon_select'] == "yes" || $bar['attr']['title']) {
$output .= "<div class='progressbar-title-wrap'>";
$output .= "<div class='progressbar-icon avia-font-" . $icon_el['font'] . "'><span class='progressbar-char'>{$display_char}</span></div>";
$output .= "<div class='progressbar-title'>" . $bar['attr']['title'] . "</div>";
$output .= "</div>";
}
$output .= "<div class='progress'><div class='bar-outer'><div class='bar' style='width: " . $bar['attr']['progress'] . "%' data-progress='" . $bar['attr']['progress'] . "'></div></div></div>";
$output .= "</div>";
}
$output .= "</div>";
}
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 = "")
{
extract(shortcode_atts(array('position' => 'left', 'bar_styling' => 'av-striped-bar', 'bar_animation' => 'av-animated-bar'), $atts, $this->config['shortcode']));
$bars = ShortcodeHelper::shortcode2array($content);
$extraClass = $bar_styling . " " . $bar_animation;
$output = "";
if (!empty($bars)) {
$output .= "<div class='avia-progress-bar-container avia_animate_when_almost_visible " . $meta['el_class'] . " {$extraClass}'>";
$defaults = array('color' => 'theme-color', 'progress' => "100", 'title' => "", 'icon' => '', 'font' => '', "icon_select" => "no");
foreach ($bars as $bar) {
$bar['attr'] = array_merge($defaults, $bar['attr']);
$display_char = av_icon($bar['attr']['icon'], $bar['attr']['font']);
$output .= "<div class='avia-progress-bar " . $bar['attr']['color'] . "-bar icon-bar-" . $bar['attr']['icon_select'] . "'>";
if ($bar['attr']['icon_select'] == "yes" || $bar['attr']['title']) {
$output .= "<div class='progressbar-title-wrap'>";
$output .= "<div class='progressbar-icon'><span class='progressbar-char' {$display_char}></span></div>";
$output .= "<div class='progressbar-title'>" . $bar['attr']['title'] . "</div>";
$output .= "</div>";
}
$output .= "<div class='progress'><div class='bar-outer'><div class='bar' style='width: " . $bar['attr']['progress'] . "%' data-progress='" . $bar['attr']['progress'] . "'></div></div></div>";
$output .= "</div>";
}
$output .= "</div>";
}
return $output;
}
示例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('title' => ''), $atts, $this->config['shortcode']));
$output = "";
$output .= "<div class='av-catalogue-container " . $meta['el_class'] . "'>";
$output .= "<ul class='av-catalogue-list'>";
$output .= ShortcodeHelper::avia_remove_autop($content, true);
$output .= "</ul>";
$output .= "</div>";
return $output;
}
示例5: 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;
}
示例6: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'src' => '', 'position' => 'top left', 'repeat' => 'no-repeat', 'attach' => 'scroll', 'stretch' => '', 'content' => ShortcodeHelper::shortcode2array($content)), $atts);
extract($atts);
$output = "";
$background = "";
$class = "";
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 .= "background-attachment: {$attach}; ";
$background .= "background-position: {$position}; ";
}
if ($background) {
$params['bg'] = "style = '{$background}'";
}
$skipSecond = false;
avia_sc_slider_full::$slide_count++;
$params['class'] = "avia-fullwidth-slider main_color avia-shadow " . $meta['el_class'] . $class;
$params['open_structure'] = false;
if ($meta['index'] == 0) {
$params['close'] = false;
}
if ($meta['index'] != 0) {
$params['class'] .= " slider-not-first";
}
if ($meta['index'] == 0 && get_post_meta(get_the_ID(), 'header', true) != "no") {
$params['class'] .= " slider-not-first";
}
$params['id'] = "full_slider_" . avia_sc_slider_full::$slide_count;
$output .= avia_new_section($params);
$slider = new avia_slideshow($atts);
$slider->set_extra_class($stretch);
$output .= $slider->html();
$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'], array('av_layerslider', 'av_section', 'av_slideshow_full', 'av_fullscreen'))) {
$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_full_slider_" . avia_sc_slider_full::$slide_count));
}
return $output;
}
示例7: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$output = "";
if (!isset($atts['widget_area'])) {
return $output;
}
if (is_dynamic_sidebar($atts['widget_area'])) {
ob_start();
dynamic_sidebar($atts['widget_area']);
$output = ShortcodeHelper::avia_remove_autop(ob_get_clean(), true);
if ($output) {
$output = "<div class='avia-builder-widget-area clearfix " . $meta['el_class'] . "'>" . $output . "</div>";
}
}
return $output;
}
示例8: build_pattern
/**
*creates the shortcode pattern that only matches Avia Builder Shortcodes
**/
static function build_pattern($predefined_tags = false)
{
global $shortcode_tags;
//save the "real" shortcode array
$old_sc = $shortcode_tags;
//if we got allowed shortcodes build the pattern. nested shortcodes are also considered but within a separate array
if (!empty(ShortcodeHelper::$allowed_shortcodes)) {
$shortcode_tags = array_flip(array_merge(ShortcodeHelper::$allowed_shortcodes, ShortcodeHelper::$nested_shortcodes));
}
//filter out all elements that are not in the predefined tags array. this is necessary for nested shortcode modal to work properly
if (is_array($predefined_tags)) {
$predefined_tags = array_flip($predefined_tags);
$shortcode_tags = shortcode_atts($predefined_tags, $shortcode_tags);
}
//create the pattern and store it
ShortcodeHelper::$pattern = get_shortcode_regex();
//restore original shortcode tags
$shortcode_tags = $old_sc;
return ShortcodeHelper::$pattern;
}
示例9: pre_compile
function pre_compile($content)
{
global $shortcode_tags;
//in case we got none/more than one postcontent elements make sure that replacement doesnt get executed/onle gets executed once
if (strpos($content, 'av_postcontent') === false) {
return $content;
}
//save the "real" shortcode array
$old_sc = $shortcode_tags;
//execute only this single shortcode and return the result
$shortcode_tags = array($this->config['shortcode'] => array($this, 'shortcode_handler'));
$content = do_shortcode($content);
//re create the old shortcode pattern
$shortcode_tags = $old_sc;
//$content = preg_replace("!\[av_postcontent.*?\]!","",$content);
//now we need to re calculate the shortcode tree so that all elements that are pulled from different posts also get the correct location
$pattern = str_replace('av_postcontent', 'av_psprocessed', ShortcodeHelper::get_fake_pattern());
preg_match_all("/" . $pattern . "/s", $content, $matches);
ShortcodeHelper::$tree = ShortcodeHelper::build_shortcode_tree($matches);
return $content;
}
示例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 = "")
{
$atts = shortcode_atts(array('size' => 'featured', 'animation' => 'slide', 'ids' => '', 'autoplay' => 'false', 'interval' => 5, 'handle' => $shortcodename, 'stretch' => '', 'bg_slider' => 'true', 'slide_height' => "100", 'content' => ShortcodeHelper::shortcode2array($content)), $atts);
extract($atts);
$output = "";
$class = "";
$skipSecond = false;
avia_sc_slider_full::$slide_count++;
$params['class'] = "avia-fullscreen-slider main_color " . $meta['el_class'] . $class;
$params['open_structure'] = false;
if ($meta['index'] == 0) {
$params['close'] = false;
}
if ($meta['index'] != 0) {
$params['class'] .= " slider-not-first";
}
if ($meta['index'] == 0 && get_post_meta(get_the_ID(), 'header', true) != "no") {
$params['class'] .= " slider-not-first";
}
$params['id'] = "fullscreen_slider_" . avia_sc_slider_fullscreen::$slide_count;
$output .= avia_new_section($params);
$slider = new avia_slideshow($atts);
$slider->set_extra_class($stretch);
$output .= $slider->html();
$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'], array('av_layerslider', 'av_section', 'av_slideshow_full', 'av_fullscreen'))) {
$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_full_slider_" . avia_sc_slider_fullscreen::$slide_count));
}
return $output;
}
示例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 = "")
{
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;
}
示例12: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
avia_sc_grid_row::$count++;
$atts = shortcode_atts(array('color' => 'main_color', 'border' => '', 'min_height' => '0', 'mobile' => 'av-flex-cells', 'id' => ''), $atts, $this->config['shortcode']);
extract($atts);
$output = "";
$params['class'] = "av-layout-grid-container {$color} {$mobile} {$border}" . $meta['el_class'];
$params['open_structure'] = false;
$params['id'] = !empty($id) ? $id : "av-layout-grid-" . avia_sc_grid_row::$count;
$params['custom_markup'] = $meta['custom_markup'];
//we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
if (isset($meta['index']) && $meta['index'] == 0) {
$params['close'] = false;
}
if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
$params['close'] = false;
}
if (isset($meta['index']) && $meta['index'] != 0) {
$params['class'] .= " submenu-not-first";
}
avia_sc_cell::$attr = $atts;
$output .= avia_new_section($params);
$output .= ShortcodeHelper::avia_remove_autop($content, true);
$output .= avia_section_after_element_content($meta, 'after_submenu', false);
return $output;
}
示例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 = "")
{
$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;
}
示例14: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$atts = shortcode_atts(array('title' => '', 'color' => 'green', 'border' => '', 'custom_bg' => '#444444', 'custom_font' => '#ffffff', 'size' => 'large', 'icon_select' => 'yes', 'icon' => '', 'font' => ''), $atts, $this->config['shortcode']);
$display_char = av_icon($atts['icon'], $atts['font']);
$output = "";
$style = "";
if ($atts['color'] == "custom") {
$style .= "style='background-color:" . $atts['custom_bg'] . "; color:" . $atts['custom_font'] . "; '";
}
$output .= "<div {$style} class='avia_message_box " . $this->class_by_arguments('color, size, icon_select, border', $atts, true) . $meta['el_class'] . "'>";
if ($atts['title']) {
$output .= "<span class='avia_message_box_title' >" . $atts['title'] . "</span>";
}
$output .= "<div class='avia_message_box_content' >";
if ($atts['icon_select'] == 'yes') {
$output .= "<span class='avia_message_box_icon' {$display_char}></span>";
}
$output .= ShortcodeHelper::avia_apply_autop(ShortcodeHelper::avia_remove_autop($content)) . "</div>";
$output .= "</div>";
return $output;
}
示例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 = "")
{
$output = "";
$params['class'] = "main_color " . $meta['el_class'];
$params['open_structure'] = false;
$params['id'] = !empty($atts['id']) ? AviaHelper::save_string($atts['id'], '-') : "";
$params['custom_markup'] = $meta['custom_markup'];
if ($atts['gap'] == 'no' && $atts['sort'] == "no" || $meta['index'] == 0) {
$params['class'] .= " avia-no-border-styling";
}
//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 ($meta['index'] != 0) {
$params['class'] .= " masonry-not-first";
}
if ($meta['index'] == 0 && get_post_meta(get_the_ID(), 'header', true) != "no") {
$params['class'] .= " masonry-not-first";
}
$masonry = new avia_masonry($atts);
$masonry->extract_terms();
$masonry->query_entries();
$masonry_html = $masonry->html();
if (!ShortcodeHelper::is_top_level()) {
return $masonry_html;
}
$output .= avia_new_section($params);
$output .= $masonry_html;
$output .= avia_section_after_element_content($meta, 'after_masonry');
return $output;
}