',
$this->module_id(),
$this->module_classname( $render_slug ),
esc_attr( $posts_number ),
et_core_esc_previously( $data_background_layout ),
$parallax_image_background,
$video_background,
et_core_esc_previously( $this->background_pattern() ), // #7
et_core_esc_previously( $this->background_mask() ) // #8
);
// Images: Add CSS Filters and Mix Blend Mode rules (if set)
if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
$generate_css_filters_item = $this->generate_css_filters(
$render_slug,
'child_',
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
);
}
// Overlay output.
$overlay_output = 'on' === $fullwidth ? '' : ET_Builder_Module_Helper_Overlay::render(
array(
'icon' => $hover_icon,
'icon_tablet' => $hover_icon_tablet,
'icon_phone' => $hover_icon_phone,
'icon_sticky' => $hover_icon_sticky,
)
);
if ( 'on' !== $fullwidth ) {
// Overlay Icon Styles.
$this->generate_styles(
array(
'hover' => false,
'utility_arg' => 'icon_font_family',
'render_slug' => $render_slug,
'base_attr_name' => 'hover_icon',
'important' => true,
'selector' => '%%order_class%% .et_overlay:before',
'processor' => array(
'ET_Builder_Module_Helper_Style_Processor',
'process_extended_icon',
),
)
);
}
$images_count = 0;
foreach ( $attachments as $id => $attachment ) {
$image_attrs = array(
'alt' => $attachment->image_alt_text,
);
if ( 'on' !== $fullwidth ) {
$image_attrs['srcset'] = $attachment->image_src_full[0] . ' 479w, ' . $attachment->image_src_thumb[0] . ' 480w';
$image_attrs['sizes'] = '(max-width:479px) 479px, 100vw';
}
$image_attachment_class = et_pb_media_options()->get_image_attachment_class( $this->props, '', $attachment->ID );
if ( ! empty( $image_attachment_class ) ) {
$image_attrs['class'] = esc_attr( $image_attachment_class );
}
$image_output = sprintf(
'
%3$s
%4$s
',
esc_url( $attachment->image_src_full[0] ),
esc_attr( $attachment->post_title ),
$this->render_image( $attachment->image_src_thumb[0], $image_attrs, false ),
et_core_esc_previously( $overlay_output )
);
$gallery_order = self::_get_index( array( self::INDEX_MODULE_ORDER, $render_slug ) );
$item_class = sprintf( ' et_pb_gallery_item_%1$s_%2$s', $gallery_order, $images_count );
$output .= sprintf(
'
',
esc_attr( ' ' . implode( ' ', $background_layout_class_names ) ),
( 'on' !== $fullwidth ? ' et_pb_grid_item' : '' ),
$generate_css_filters_item,
$item_class
);
$images_count++;
$output .= sprintf(
'
%2$s
',
esc_attr( $orientation ),
$image_output
);
if ( 'on' !== $fullwidth && $multi_view->has_value( 'show_title_and_caption', 'on' ) ) {
if ( trim( $attachment->post_title ) ) {
$output .= $multi_view->render_element(
array(
'tag' => et_pb_process_header_level( $header_level, 'h3' ),
'content' => wptexturize( $attachment->post_title ),
'attrs' => array(
'class' => 'et_pb_gallery_title',
),
'visibility' => array(
'show_title_and_caption' => 'on',
),
)
);
}
if ( trim( $attachment->post_excerpt ) ) {
$output .= $multi_view->render_element(
array(
'tag' => 'p',
'content' => wptexturize( $attachment->post_excerpt ),
'attrs' => array(
'class' => 'et_pb_gallery_caption',
),
'visibility' => array(
'show_title_and_caption' => 'on',
),
)
);
}
}
$output .= '
';
}
$output .= '
';
if ( 'on' !== $fullwidth && $multi_view->has_value( 'show_pagination', 'on' ) ) {
$pagination_classes = array( 'et_pb_gallery_pagination' );
if ( 'justify' === $pagination_text_align ) {
$pagination_classes[] = 'et_pb_gallery_pagination_justify';
}
$output .= $multi_view->render_element(
array(
'tag' => 'div',
'attrs' => array(
'class' => implode( ' ', $pagination_classes ),
),
'visibility' => array(
'show_pagination' => 'on',
),
)
);
}
$output .= '