'divider',
'1/6' => 'one-sixth',
'1/5' => 'one-fifth',
'1/4' => 'one-fourth',
'1/3' => 'one-third',
'2/5' => 'two-fifth',
'1/2' => 'one-second',
'3/5' => 'three-fifth',
'2/3' => 'two-third',
'3/4' => 'three-fourth',
'4/5' => 'four-fifth',
'5/6' => 'five-sixth',
'1/1' => 'one'
);
public $tablet_classes = array(
'divider' => '',
'1/6' => 'tablet-one-sixth',
'1/5' => 'tablet-one-fifth',
'1/4' => 'tablet-one-fourth',
'1/3' => 'tablet-one-third',
'2/5' => 'tablet-two-fifth',
'1/2' => 'tablet-one-second',
'3/5' => 'tablet-three-fifth',
'2/3' => 'tablet-two-third',
'3/4' => 'tablet-three-fourth',
'4/5' => 'tablet-four-fifth',
'5/6' => 'tablet-five-sixth',
'1/1' => 'tablet-one'
);
public $laptop_classes = array(
'divider' => '',
'1/6' => 'laptop-one-sixth',
'1/5' => 'laptop-one-fifth',
'1/4' => 'laptop-one-fourth',
'1/3' => 'laptop-one-third',
'2/5' => 'laptop-two-fifth',
'1/2' => 'laptop-one-second',
'3/5' => 'laptop-three-fifth',
'2/3' => 'laptop-two-third',
'3/4' => 'laptop-three-fourth',
'4/5' => 'laptop-four-fifth',
'5/6' => 'laptop-five-sixth',
'1/1' => 'laptop-one'
);
public $mobile_classes = array(
'divider' => '',
'1/6' => 'mobile-one-sixth',
'1/5' => 'mobile-one-fifth',
'1/4' => 'mobile-one-fourth',
'1/3' => 'mobile-one-third',
'2/5' => 'mobile-two-fifth',
'1/2' => 'mobile-one-second',
'3/5' => 'mobile-three-fifth',
'2/3' => 'mobile-two-third',
'3/4' => 'mobile-three-fourth',
'4/5' => 'mobile-four-fifth',
'5/6' => 'mobile-five-sixth',
'1/1' => 'mobile-one'
);
/**
* Constructor
*/
public function __construct($post_id, $content_field = false) {
if( mfn_is_blocks() ){
$this->blocks_fields = new Mfn_Builder_Fields( null, 'items' );
}
$this->post_id = $post_id;
self::$post_id2 = $post_id;
$this->content_field = $content_field;
if( get_post_type($post_id) == 'template' ) $this->template_type = get_post_meta($post_id, 'mfn_template_type', true);
self::$is_bebuilder = apply_filters('bebuilder_preview', true);
if( wp_doing_ajax() ) self::$is_bebuilder = true;
}
/**
* Show WordPress Editor Content
*/
public function the_content(){
// FIX: Elementor - prevent showing first post content on blog page
if( ( 'post' == get_post_type() ) && ( ! is_singular() ) ){
return false;
}
// single product - hide wp editor content
if( function_exists('is_product') && is_product() && mfn_opts_get('shop-hide-content') ){
return false;
}
// check if editor content exists
$content = get_post_field( 'post_content', $this->post_id );
$class = $content ? 'has_content' : 'no_content' ;
$is_elementor = mfn_is_elementor( $this->post_id ) ? 'is-elementor' : false;
// output -----
echo '
'; // print_r( $mfn_items ); // echo ''; // } // exit; // CSS local styles if( $vbtoolsoff || ( empty( $_GET['visual'] ) && ( !mfn_opts_get('local-styles-location') || ( $this->template_type && in_array($this->template_type, array('megamenu', 'footer', 'popup', 'sidemenu')) ) ) ) ) { if( $this->template_type != 'header' ) { $this->enqueue_local_style(); } } // WordPress Editor | before builder if ( 1 == mfn_opts_get('display-order') && ( !isset($items) || get_post_type( $this->post_id ) != 'template' ) ) { $this->the_content(); } // Muffin Builder $main_div_classes = array('mfn-builder-content'); if( !$items ) { if( $this->template_type ) { $main_div_classes[] = 'mfn-'.$this->template_type.'-tmpl-builder'; if( $this->template_type == 'cart' ) { $main_div_classes[] = 'woocommerce'; if ( function_exists('is_woocommerce') && is_cart() && WC()->cart->is_empty() ) {$main_div_classes[] = 'mfn-cart-tmpl-empty';}else{$main_div_classes[] = 'mfn-cart-tmpl-not-empty';} echo '
'; print_r($refresh_content); echo '';*/ if( !empty( $refresh_content[0]['attr']['conditions'] ) ) { if( !self::$is_bebuilder ){ $mfnConditions = new MfnConditionalLogic(); if( !$mfnConditions->verify( $refresh_content[0]['attr']['conditions'] ) ){ continue; } }else{ $section_class[] = 'mfn-conditional-logic'; } } } //refresh content $section['attr'] = $refresh_content[0]['attr']; $section['wraps'] = $refresh_content[0]['wraps']; $section_class[] = 'mfn-global-section'; $global_section_id = ' data-mfn-global="' . $section['mfn_global_section_id'] .'"'; //styles if( !mfn_is_blocks() ){ $path = wp_upload_dir()['baseurl'] .'/betheme/css/post-'. $section['mfn_global_section_id'] .'.css'; wp_enqueue_style('mfn-global-section-styles-'. Mfn_Builder_Helper::unique_ID(), $path, false, time(), 'all'); } } $section_id = false; $parallax = false; $closeable = false; // hidden sections if ( ! empty( $section['attr']['hide'] ) ) { // visual builder if( wp_doing_ajax() || self::$is_bebuilder ){ $section_class[] = 'hide'; } else { continue; } } //if( empty($_GET['visual']) && isset($_COOKIE['mfn_closed_section']) && $_COOKIE['mfn_closed_section'] == $section['uid'] ) continue; // closeable section // section attributes // classes --- if( !empty($section['ver']) ){ $section_class[] = 'mfn-'.$section['ver'].'-section'; }else{ $section_class[] = 'mfn-default-section'; } // unique ID if( empty( $section['uid'] ) ) { $section['uid'] = Mfn_Builder_Helper::unique_ID(); } if( !empty($section['mfn_global_section_id']) && is_numeric($section['mfn_global_section_id']) && get_post_status($section['mfn_global_section_id']) == 'publish') { //set the original uid of the section. global sections $section_class[] = 'mcb-section-'. $refresh_content[0]['uid']; $inner_section_class_uid = 'mcb-section-inner-'.$refresh_content[0]['uid']; } else { $section_class[] = 'mcb-section-'. $section['uid']; } if( $this->template_type && $this->template_type == 'header' ) $section_class[] = 'mcb-header-section'; // custom style & class // if( empty( $section['attr'] ) ) continue; if( ! empty($section['attr']['style']) ) { $style_ex = explode(' ', $section['attr']['style']); if( in_array('full-width', $style_ex) ){ $style_key = array_search('full-width', $style_ex); $style_ex[$style_key] = 'full-width full-width-deprecated'; //$section['attr']['style'] = str_replace('full-width', 'full-width full-width-deprecated', $section['attr']['style']); // old full width class } $section_class[] = implode(' ', $style_ex); } if( ! empty($section['attr']['class']) ) { $section_class[] = $section['attr']['class']; } if( ! empty($section['attr']['classes']) ) { $section_class[] = $section['attr']['classes']; } // visibility $hide_label = 'Hide section'; if( ! empty($section['attr']['visibility']) ) { $section_class[] = $section['attr']['visibility']; $hide_label = 'Show section'; } if( ! empty($section['attr']['query_slider_arrows_visibility']) ) { $section_class[] = $section['attr']['query_slider_arrows_visibility']; } if( ! empty($section['attr']['query_slider_dots_visibility']) ) { $section_class[] = $section['attr']['query_slider_dots_visibility']; } // background video if( ! empty($section['attr']['bg_video_mp4']) ) { $section_class[] = 'has-video'; } // query loop if( isset($section['attr']['type']) && $section['attr']['type'] == 'query' ){ $section_class[] = 'mfn-looped-items'; if( !empty($section['attr']['query_display']) && $section['attr']['query_display'] == 'slider' ){ $section_class[] = 'mfn-looped-items-slider-wrapper'; if( !empty($section['attr']['query_slider_arrows']) ){ if( !empty($section['attr']['query_slider_arrows_style']) ){ $section_class[] = 'mfn-arrows-'.$section['attr']['query_slider_arrows_style']; }else{ $section_class[] = 'mfn-arrows-standard'; } }else{ $section_class[] = 'mfn-arrows-hidden'; } if( !empty( $section['attr']['query_slider_dots_count'] ) ){ $section_class[] = 'mfn-dots-count-dynamic'; } if( !empty($section['attr']['query_slider_dots']) ){ if( !empty($section['attr']['query_slider_dots_style']) ){ $section_class[] = 'mfn-dots-'.$section['attr']['query_slider_dots_style']; }else{ $section_class[] = 'mfn-dots-standard'; } }else{ $section_class[] = 'mfn-dots-hidden'; } if( !empty($section['attr']['query_slider_centered']) && $section['attr']['query_slider_centered'] == '2' ){ $section_class[] = 'mfn-ql-slider-wrapper-offset'; } } if( !empty($section['attr']['query_display_style']) && $section['attr']['query_display_style'] == 'masonry' ){ $section_class[] = 'mfn-looped-items-masonry'; } } // navigation arrows if( ! empty($section['attr']['navigation']) ) { $section_class[] = 'has-navi'; } if( ! empty($section['attr']['height_switcher']) && $section['attr']['height_switcher'] == 'full-screen' ){ $section_class[] = 'full-screen'; } if( $this->template_type && $this->template_type == 'header' && ! empty($section['attr']['closeable-x']) ) { $section_class[] = 'close-button-'.$section['attr']['closeable-x']; } if( $this->template_type && $this->template_type == 'header' && ! empty($section['attr']['closeable']) ) { $section_class[] = 'closeable-active'; } if( ! empty($section['attr']['width_switcher']) ) { $section_class[] = $section['attr']['width_switcher'].'-width'; } if( $this->template_type && $this->template_type == 'header' && ! empty($section['attr']['scroll-visibility']) ) { $section_class[] = $section['attr']['scroll-visibility'].'-on-scroll'; } // reverse order on mobile if( ! empty($section['attr']['reverse_order']) ) { if( $section['attr']['reverse_order'] == 1 ){ $section_class[] = 'wrap-reverse'; }elseif( $section['attr']['reverse_order'] == 2 ){ $section_class[] = 'wrap-reverse-rows'; } } // background size if( isset($section['attr']['bg_size']) && ($section['attr']['bg_size'] != 'auto') ) { $section_class[] = 'bg-'. $section['attr']['bg_size']; } $section_class = implode(' ', $section_class); // styles --- $section_style = $section_bg = array(); // ACM new input name if( ! empty($section['attr']['custom_css']) ) { $section_style[] = $section['attr']['custom_css']; } if( ! empty($section['attr']['padding_top']) ) { $section_style[] = 'padding-top:'. intval($section['attr']['padding_top']) .'px'; } if( ! empty($section['attr']['padding_bottom']) ) { $section_style[] = 'padding-bottom:'. intval($section['attr']['padding_bottom']) .'px'; } if( ! empty($section['attr']['padding_horizontal']) ) { if( is_numeric($section['attr']['padding_horizontal']) ){ $section['attr']['padding_horizontal'] .= 'px'; } $section_style[] = 'padding-left:'. esc_attr($section['attr']['padding_horizontal']); $section_style[] = 'padding-right:'. esc_attr($section['attr']['padding_horizontal']); } if( ! empty($section['attr']['bg_color']) ) { $section_style[] = 'background-color:'. $section['attr']['bg_color']; } // background image attributes if( ! empty( $section['attr']['bg_image'] ) ) { $section_bg['image'] = 'background-image:url('. $section['attr']['bg_image'] .')'; if( !empty($section['attr']['bg_position']) && empty($_GET['visual']) ){ $section_bg_attr = explode(';', $section['attr']['bg_position']); if( isset($section_bg_attr[0]) ) { $section_bg['repeat'] = 'background-repeat:'. $section_bg_attr[0]; } if( isset($section_bg_attr[1]) ) { $section_bg['position'] = 'background-position:'. $section_bg_attr[1]; } if( isset($section_bg_attr[2]) ) { $section_bg['attachment'] = 'background-attachment:'. $section_bg_attr[2]; } if( isset($section_bg_attr[3]) ) { $section_bg['size'] = 'background-size:'. $section_bg_attr[3]; } } } if( empty( $_GET['visual'] ) || ! isset( $items ) ){ // parallax for Muffin Builder if ( ! empty( $section['attr']['bg_image'] ) && !empty($section_bg_attr[2]) && $section_bg_attr[2] == 'fixed' ) { if ( empty( $section_bg_attr[4] ) || $section_bg_attr[4] != 'still') { $parallax = mfn_parallax_data(); $parallax_bg_image = be_dynamic_data($section['attr']['bg_image']); if( is_numeric($parallax_bg_image) ) $parallax_bg_image = wp_get_attachment_image_url($parallax_bg_image, 'full'); if ( mfn_parallax_plugin() == 'translate3d' ) { if ( mfn_is_mobile() ) { $section_bg['attachment'] = 'background-attachment:scroll'; } else { $section_bg = array(); } } } else { // cover $section_class .= ' bg-cover'; } } // parallax for BeBuilder if ( empty( $_GET['visual'] ) && ! empty( $section['attr']['style:.mcb-section-mfnuidelement:background-image'] ) && ! empty( $section['attr']['style:.mcb-section-mfnuidelement:background-attachment'] ) && ( $section['attr']['style:.mcb-section-mfnuidelement:background-attachment'] == 'parallax' ) ) { $parallax = mfn_parallax_data(); $parallax_bg_image = be_dynamic_data($section['attr']['style:.mcb-section-mfnuidelement:background-image']); if( is_numeric($parallax_bg_image) ) $parallax_bg_image = wp_get_attachment_image_url($parallax_bg_image, 'full'); if ( mfn_parallax_plugin() == 'translate3d' ) { if ( mfn_is_mobile() ) { $section_bg['attachment'] = 'background-attachment:scroll'; } else { $section_bg = array(); } } } if ( empty( $_GET['visual'] ) && ! empty( $section['attr']['css_advanced_background_image']['val'] ) && ! empty( $section['attr']['css_advanced_background_attachment']['val'] ) && ( $section['attr']['css_advanced_background_attachment']['val'] == 'parallax' ) ) { $parallax = mfn_parallax_data(); $parallax_bg_image = be_dynamic_data($section['attr']['css_advanced_background_image']['val']); if( is_numeric($parallax_bg_image) ) $parallax_bg_image = wp_get_attachment_image_url($parallax_bg_image, 'full'); if ( mfn_parallax_plugin() == 'translate3d' ) { if ( mfn_is_mobile() ) { $section_bg['attachment'] = 'background-attachment:scroll'; } else { $section_bg = array(); } } } } // visual builder if( isset( $items ) && is_array( $items ) ){ $section_class .= ' blink'; } $section_style = array_merge($section_style, $section_bg); $section_style = implode(';', $section_style); // custom section ID if( ! empty($section['attr']['section_id']) && $section['attr']['section_id'] ) { $section_id = 'id="'. $section['attr']['section_id'] .'"'; } elseif( ! empty($section['attr']['custom_id']) && $section['attr']['custom_id']) { $section_id = 'id="'. $section['attr']['custom_id'] .'"'; } if( !empty($section['attr']['style:.mcb-section-mfnuidelement:background-size']) && $section['attr']['style:.mcb-section-mfnuidelement:background-size'] == 'cover-ultrawide' ){ $section_class .= ' bg-cover-ultrawide'; } // output SECTION ----- if( mfn_is_blocks() ){ $section_style = ''; $parallax = ''; } if( !$vbtoolsoff && ( self::$is_bebuilder || ( isset( $items ) && is_array( $items ) ) ) ){ if ( $this->template_type && $this->template_type == 'header' && isset( $section['wraps'] ) && is_array($section['wraps']) && count($section['wraps']) >= 3 ) $section_class .= ' mfn-new-wraps-disabled'; echo '
';
print_r($section);
echo '';
}*/
if(isset($section['wraps']) && key_exists('wraps', $section) && is_array($section['wraps'])) {
// visual builder
ksort( $section['wraps'] );
/**
*
* QUERY loop
*
* */
if( /*!self::$is_bebuilder &&*/ isset($section['attr']['type']) && $section['attr']['type'] == 'query' ){
$s_wrapper_params = false;
if( !self::$is_bebuilder && !empty($section['attr']['query_display']) && $section['attr']['query_display'] == 'slider' ){
wp_enqueue_script('mfn-swiper', get_theme_file_uri('/js/swiper.js'), array('jquery'), MFN_THEME_VERSION, ['in_footer' => true, 'strategy' => 'defer']);
wp_enqueue_style('mfn-swiper', get_theme_file_uri('/css/scripts/swiper.css'), false, MFN_THEME_VERSION, false);
$s_desktop_columns = !empty($section['attr']['query_slider_columns']) ? $section['attr']['query_slider_columns'] : 1;
$s_laptop_columns = !empty($section['attr']['query_slider_columns_laptop']) ? $section['attr']['query_slider_columns_laptop'] : $s_desktop_columns;
$s_tablet_columns = !empty($section['attr']['query_slider_columns_tablet']) ? $section['attr']['query_slider_columns_tablet'] : $s_laptop_columns;
$s_mobile_columns = !empty($section['attr']['query_slider_columns_mobile']) ? $section['attr']['query_slider_columns_mobile'] : 1;
$s_wrapper_params = 'data-columns="'.$s_desktop_columns.'"';
$s_wrapper_params .= 'data-columns-tablet="'.$s_tablet_columns.'"';
$s_wrapper_params .= 'data-columns-laptop="'.$s_laptop_columns.'"';
$s_wrapper_params .= 'data-columns-mobile="'.$s_mobile_columns.'"';
$s_wrapper_params .= ' data-animationtype="'.(!empty($section['attr']['query_slider_animation']) ? $section['attr']['query_slider_animation'] : 'slide').'"';
$s_wrapper_params .= ' data-dots="'.(!empty($section['attr']['query_slider_dots']) ? $section['attr']['query_slider_dots'] : '0').'"';
$s_wrapper_params .= ' data-dots-count="'.(!empty($section['attr']['query_slider_dots_count']) ? $section['attr']['query_slider_dots_count'] : '0').'"';
$s_wrapper_params .= ' data-arrows="'.(!empty($section['attr']['query_slider_arrows']) ? $section['attr']['query_slider_arrows'] : '0').'"';
$s_wrapper_params .= ' data-autoplay="'.(!empty($section['attr']['query_slider_autoplay']) ? $section['attr']['query_slider_autoplay'] : '0').'"';
$s_wrapper_params .= ' data-speed="'.(!empty($section['attr']['query_slider_speed']) ? $section['attr']['query_slider_speed'] : '300').'"';
$s_wrapper_params .= ' data-mousewheel="'.(!empty($section['attr']['query_slider_mousewheel']) ? $section['attr']['query_slider_mousewheel'] : '0').'"';
$s_wrapper_params .= ' data-centered="'.(!empty($section['attr']['query_slider_centered']) ? $section['attr']['query_slider_centered'] : '0').'"';
$s_wrapper_params .= ' data-infinity="'.(!empty($section['attr']['query_slider_infinity']) ? $section['attr']['query_slider_infinity'] : '0').'"';
$s_wrapper_params .= ' data-arrownext="'.(!empty($section['attr']['query_display_slider_arrow_next']) ? $section['attr']['query_display_slider_arrow_next'] : 'icon-right-open-big').'"';
$s_wrapper_params .= ' data-arrowprev="'.(!empty($section['attr']['query_display_slider_arrow_prev']) ? $section['attr']['query_display_slider_arrow_prev'] : 'icon-left-open-big').'"';
$qlslm_left = 12;
$qlslm_right = 12;
if( !empty($section['attr']['style:.mcb-section-mfnuidelement .mcb-section-inner .mfn-queryloop-item-wrapper:margin']['left']) ) $qlslm_left = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['style:.mcb-section-mfnuidelement .mcb-section-inner .mfn-queryloop-item-wrapper:margin']['left']);
if( !empty($section['attr']['style:.mcb-section-mfnuidelement .mcb-section-inner .mfn-queryloop-item-wrapper:margin']['right']) ) $qlslm_right = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['style:.mcb-section-mfnuidelement .mcb-section-inner .mfn-queryloop-item-wrapper:margin']['right']);
if( !empty($section['attr']['css_queryloop_item_margin']['val']['left']) ) $qlslm_left = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['css_queryloop_item_margin']['val']['left']);
if( !empty($section['attr']['css_queryloop_item_margin']['val']['right']) ) $qlslm_right = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['css_queryloop_item_margin']['val']['right']);
$qlslm_left_mobile = $qlslm_left;
$qlslm_right_mobile = $qlslm_right;
if( !empty($section['attr']['css_queryloop_item_margin_mobile']['val']['left']) ) $qlslm_left_mobile = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['css_queryloop_item_margin_mobile']['val']['left']);
if( !empty($section['attr']['css_queryloop_item_margin_mobile']['val']['right']) ) $qlslm_right_mobile = str_replace(array('px', '%', 'em', 'rem', 'vw'), '', $section['attr']['css_queryloop_item_margin_mobile']['val']['right']);
$s_wrapper_params .= ' data-space_desktop="'.($qlslm_left + $qlslm_right).'"';
$s_wrapper_params .= ' data-space_mobile="'.($qlslm_left_mobile + $qlslm_right_mobile).'"';
$s_wrapper_classes = array('swiper', 'mfn-looped-items-slider');
if( !empty($section['attr']['query_slider_linear']) ) $s_wrapper_classes[] = 'mfn-slider-linear';
echo ''; print_r($item); echo '';*/ if( function_exists('is_woocommerce') && !empty($item['jsclass']) && $item['jsclass'] == 'woo_alert' && !$vb && wc_notice_count() == 0 ){ return; } $inner_class = array(); $item_class = array(); if( !empty($item['item_is_wrap']) ) { $this->show_wraps($item, $i, $vb); return; } if( !empty( $item['attr']['conditions'] ) ) { if( !self::$is_bebuilder ){ $mfnConditions = new MfnConditionalLogic(); if( !$mfnConditions->verify( $item['attr']['conditions'] ) ){ return; } }else{ $inner_class[] = 'mfn-conditional-logic'; } } if( empty($item['laptop_size']) ){ $item['laptop_size'] = !empty($item['size']) ? $item['size'] : '1/1'; } if( empty($item['tablet_size']) ){ $item['tablet_size'] = !empty($item['size']) ? $item['size'] : '1/1'; $item['mobile_size'] = '1/1'; } $type = 'item_'. $item['type']; if ( method_exists( 'Mfn_Builder_Items', $type ) ) { $animate = ''; // FIX: LUK empty wrap created in error if( empty( $item['size'] ) ){ return; } if( ! isset( $item['attr'] ) ){ $item['attr'] = isset( $item['fields'] ) && is_array($item['fields']) ? $item['fields'] : array(); } // unique ID if( empty( $item['uid'] ) ) { $item['uid'] = Mfn_Builder_Helper::unique_ID(); } $item_class[] = 'mcb-item-'. $item['uid']; /*echo '
'; print_r($item); echo '';*/ // WPML Workaround for compsupp-7547 if( ! empty($item['attr']['content']) ){ $item['attr']['content'] = apply_filters( 'wpml_translate_link_targets', $item['attr']['content'] ); } if( empty(self::$item_id) && !empty($item['attr']['vb_postid']) ){ self::$item_id = $item['attr']['vb_postid']; } // size if( isset( $this->classes[$item['size']] ) ){ $item_class[] = $this->classes[$item['size']]; } if( isset( $item['laptop_size'] ) ){ $item_class[] = $this->laptop_classes[$item['laptop_size']]; }else{ $item_class[] = $this->laptop_classes[$item['size']]; } if( isset( $item['tablet_size'] ) ){ $item_class[] = $this->tablet_classes[$item['tablet_size']]; }else{ $item_class[] = $this->tablet_classes[$item['size']]; } if( isset( $item['mobile_size'] ) ){ $item_class[] = $this->mobile_classes[$item['mobile_size']]; }else{ $item_class[] = '1/1'; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .title:-webkit-line-clamp']) || !empty($item['attr']['css_line_clamp']) ){ $item_class[] = 'mfn-line-clamp'; } // type $item_class[] = 'column_'. $item['type']; // animate if ( ! empty( $item['attr']['animate'] ) ) { $item_class[] = 'animate'; $animate = 'data-anim-type="'. $item['attr']['animate'] .'"'; } // custom classes if ( ! empty($item['attr']['classes']) ) { $item_class[] = $item['attr']['classes']; } if ( ! empty($item['attr']['width_switcher']) ) { if( $item['attr']['width_switcher'] == 'inline' ){ $item_class[] = 'mfn-item-inline'; }else if( $item['attr']['width_switcher'] == 'custom' ){ $item_class[] = 'mfn-item-custom-width'; } } if ( ! empty($item['attr']['visibility']) ) { $item_class[] = $item['attr']['visibility']; } // margin bottom if ($item['type'] == 'column' && (! empty($item['attr']['margin_bottom']))) { $item_class[] = 'column-margin-'. $item['attr']['margin_bottom']; } // pricing item if( 'pricing_item' == $item['type'] && ! empty($item['attr']['style']) ) { $item_class[] = 'pricing_item-style-'. $item['attr']['style']; } // position absolute if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:position']) && $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:position'] == 'absolute' ){ $item_class[] = 'mfn-column-absolute'; } if( !empty($item['attr']['css_advanced_position']) && $item['attr']['css_advanced_position']['val'] == 'absolute' ){ $item_class[] = 'mfn-column-absolute'; } // custom id if(key_exists('custom_id', $item['attr']) && $item['attr']['custom_id']) { $item_id = 'id="'. $item['attr']['custom_id'] .'"'; } else { $item_id = false; } $item_style = ''; $item_inline_style = false; // ACM new input name if( ! empty( $item['attr']['custom_css'] ) ){ $item_style .= $item['attr']['custom_css']; } if ( !empty( $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:background-image'] ) && strpos($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:background-image'], '{featured_image') !== false ){ $item_bg_dd = be_dynamic_data($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:background-image']); if( is_numeric($item_bg_dd) ) $item_bg_dd = wp_get_attachment_image_src( $item_bg_dd, 'full' )[0]; $item_inline_style = 'style="background-image: url('.$item_bg_dd.')"'; } if ( !empty( $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner|hover:background-image'] ) && strpos($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner|hover:background-image'], '{featured_image') !== false ){ $item_bg_dd = be_dynamic_data($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner|hover:background-image']); if( is_numeric($item_bg_dd) ) $item_bg_dd = wp_get_attachment_image_src( $item_bg_dd, 'full' )[0]; echo ''; } if ( !empty( $item['attr']['css_advanced_background_image'] ) && strpos($item['attr']['css_advanced_background_image']['val'], '{featured_image') !== false ){ $item_bg_dd = be_dynamic_data($item['attr']['css_advanced_background_image']['val']); if( is_numeric($item_bg_dd) ) $item_bg_dd = wp_get_attachment_image_src( $item_bg_dd, 'full' )[0]; $item_inline_style = 'style="background-image: url('.$item_bg_dd.')"'; } if ( !empty( $item['attr']['css_advanced_background_image_hover'] ) && strpos($item['attr']['css_advanced_background_image_hover']['val'], '{featured_image') !== false ){ $item_bg_dd = be_dynamic_data($item['attr']['css_advanced_background_image_hover']['val']); if( is_numeric($item_bg_dd) ) $item_bg_dd = wp_get_attachment_image_src( $item_bg_dd, 'full' )[0]; echo ''; } $desktop_size = $item['size']; $laptop_size = !empty($item['laptop_size']) ? $item['laptop_size'] : $desktop_size; $tablet_size = !empty($item['tablet_size']) ? $item['tablet_size'] : $desktop_size; $mobile_size = !empty($item['mobile_size']) ? $item['mobile_size'] : '1/1'; if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex']) ){ $desktop_size = $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex']; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_laptop']) ){ $laptop_size = $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_laptop']; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_tablet']) ){ $tablet_size = $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_tablet']; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_mobile']) ){ $mobile_size = $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:flex_mobile']; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:background-size']) && $item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:background-size'] == 'cover-ultrawide' ){ $item_class[] = 'bg-cover-ultrawide'; } if (!empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner:transform']) || !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement .mcb-column-inner|hover:transform'])) { $item_class[] = 'mfn-transformed'; } if (!empty($item['attr']['css_advanced_transform']) || !empty($item['attr']['css_advanced_transform_hover'])) { $item_class[] = 'mfn-transformed'; } if( $item['type'] == 'shop_products' && !empty($item['attr']['equal_heights']) && $item['attr']['equal_heights'] != '0' ) { if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement ul.products li.product:text-align']) ){ echo ''; } } if( $item['type'] == 'product_images' && !empty($item['attr']['thumbnail_arrows']) ){ $item_class[] = 'mfn-thumbnails-arrows-active'; } $inner_class[] = 'mcb-column-inner mfn-module-wrapper mcb-column-inner-'.$item['uid'].' mcb-item-'.$item['type'].'-inner'; $item_class = implode(' ', $item_class); // output ----- if( mfn_is_blocks() ){ $item_style = ''; $parallax = ''; } if( $vb && !$w_iterate ){ $tooltip = false; if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:hide_under_custom']) ){ $tooltip = 'data-position="bottom" data-tooltip="Hide under '.$item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:hide_under_custom'].'"'; } if( !empty($item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:show_under_custom']) ){ $tooltip = 'data-position="bottom" data-tooltip="Show under '.$item['attr']['style:.mcb-section .mcb-wrap .mcb-item-mfnuidelement:show_under_custom'].'"'; } echo '