: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$auto = $this->props['auto'];
$auto_speed = $this->props['auto_speed'];
$orientation = $this->props['orientation'];
$pagination_text_align = $this->get_pagination_alignment();
$header_level = $this->props['title_level'];
$zoom_icon_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'zoom_icon_color' );
$hover_overlay_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'hover_overlay_color' );
$hover_icon = $this->props['hover_icon'];
$hover_icon_values = et_pb_responsive_options()->get_property_values( $this->props, 'hover_icon' );
$hover_icon_tablet = isset( $hover_icon_values['tablet'] ) ? $hover_icon_values['tablet'] : '';
$hover_icon_phone = isset( $hover_icon_values['phone'] ) ? $hover_icon_values['phone'] : '';
et_pb_responsive_options()->generate_responsive_css( $zoom_icon_color_values, '%%order_class%% .et_overlay:before', 'color', $render_slug, ' !important;', 'color' );
et_pb_responsive_options()->generate_responsive_css( $hover_overlay_color_values, '%%order_class%% .et_overlay', 'background-color', $render_slug, '', 'color' );
et_pb_responsive_options()->generate_responsive_css( $hover_overlay_color_values, '%%order_class%% .et_overlay', 'border-color', $render_slug, '', 'color' );
$attachments = $this->get_attachments( array(
'gallery_ids' => $gallery_ids,
'gallery_orderby' => $gallery_orderby,
'fullwidth' => $fullwidth,
'orientation' => $orientation,
if ( empty( $attachments ) ) {
wp_enqueue_script( 'hashchange' );
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$posts_number = 0 === intval( $posts_number ) ? 4 : intval( $posts_number );
$this->add_classname( array(
$this->get_text_orientation_classname(),
// Background layout class names.
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
$this->add_classname( $background_layout_class_names );
if ( 'on' === $fullwidth ) {
$this->add_classname( array(
'et_pb_gallery_fullwidth',
$this->add_classname( 'et_pb_gallery_grid' );
if ( 'on' === $auto && 'on' === $fullwidth ) {
$this->add_classname( array(
"et_slider_speed_{$auto_speed}",
// Background layout data attributes.
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
'<div%1$s class="%2$s"%4$s>%5$s%6$s
<div class="et_pb_gallery_items et_post_gallery clearfix" data-per_page="%3$d">',
$this->module_classname( $render_slug ),
esc_attr( $posts_number ),
et_core_esc_previously( $data_background_layout ),
$parallax_image_background,
// 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(
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
foreach ( $attachments as $id => $attachment ) {
$data_icon = '' !== $hover_icon
esc_attr( et_pb_process_font_icon( $hover_icon ) )
$data_icon_tablet = '' !== $hover_icon_tablet
' data-icon-tablet="%1$s"',
esc_attr( et_pb_process_font_icon( $hover_icon_tablet ) )
$data_icon_phone = '' !== $hover_icon_phone
' data-icon-phone="%1$s"',
esc_attr( et_pb_process_font_icon( $hover_icon_phone ) )
'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';
'<a href="%1$s" title="%2$s">
<span class="et_overlay%4$s%6$s%8$s"%5$s%7$s%9$s></span>
esc_url( $attachment->image_src_full[0] ),
esc_attr( $attachment->post_title ),
$this->render_image( $attachment->image_src_thumb[0], $image_attrs, false ),
( '' !== $hover_icon ? ' et_pb_inline_icon' : '' ),
( '' !== $hover_icon_tablet ? ' et_pb_inline_icon_tablet' : '' ),
( '' !== $hover_icon_phone ? ' et_pb_inline_icon_phone' : '' ),
$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 );
'<div class="et_pb_gallery_item%2$s%1$s%3$s%4$s">',
esc_attr( ' ' . implode( ' ', $background_layout_class_names ) ),
( 'on' !== $fullwidth ? ' et_pb_grid_item' : '' ),
$generate_css_filters_item,
<div class='et_pb_gallery_image {$orientation}'>
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 ),
'class' => 'et_pb_gallery_title',
'show_title_and_caption' => 'on',
if ( trim( $attachment->post_excerpt ) ) {
$output .= $multi_view->render_element( array(
'content' => wptexturize( $attachment->post_excerpt ),
'class' => 'et_pb_gallery_caption',
'show_title_and_caption' => 'on',
$output .= "</div><!-- .et_pb_gallery_items -->";
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(
'class' => implode( ' ', $pagination_classes ),
'show_pagination' => 'on',
$output .= "</div><!-- .et_pb_gallery -->";
new ET_Builder_Module_Gallery;