: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return $next_page <= $max ? get_pagenum_link( $next_page ) : null;
* @param int $paged Current page.
private static function get_previous_link( $paged ) {
$previous_page = $paged - 1;
return $previous_page >= 1 ? get_pagenum_link( $previous_page ) : null;
function render( $attrs, $content = null, $render_slug ) {
$multi_view = et_pb_multi_view_options( $this );
$fullwidth = $this->props['fullwidth'];
$posts_number = $this->props['posts_number'];
$include_categories = $this->props['include_categories'];
$show_title = $this->props['show_title'];
$show_categories = $this->props['show_categories'];
$show_pagination = $this->props['show_pagination'];
$hover_icon = $this->props['hover_icon'];
$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' );
$processed_header_level = et_pb_process_header_level( $header_level, 'h2' );
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', array( 'background-color', 'border-color' ), $render_slug, '', 'color' );
$container_is_closed = false;
$portfolio = self::get_portfolio_item( array(
'posts_number' => $posts_number,
'include_categories' => $include_categories,
'fullwidth' => $fullwidth,
if ( 'on' !== $fullwidth ) {
$data_icon = '' !== $hover_icon
esc_attr( et_pb_process_font_icon( $hover_icon ) )
$overlay = sprintf( '<span class="et_overlay%1$s"%2$s></span>',
( '' !== $hover_icon ? ' et_pb_inline_icon' : '' ),
$portfolio_order = self::_get_index( array( self::INDEX_MODULE_ORDER, $render_slug ) );
if ( $portfolio->have_posts() ) {
while( $portfolio->have_posts() ) {
ET_Post_Stack::replace( $post );
// Get $post data of current loop
array_push( $post->post_class_name, 'et_pb_portfolio_item' );
$item_class = sprintf( 'et_pb_portfolio_item_%1$s_%2$s', $portfolio_order, $items_count );
array_push( $post->post_class_name, $item_class );
if ( 'on' !== $fullwidth ) {
array_push( $post->post_class_name, 'et_pb_grid_item' );
<div id="post-<?php echo esc_attr( $post->ID ); ?>" class="<?php echo esc_attr( join( ' ', $post->post_class_name ) ); ?>">
<?php if ( '' !== $post->post_thumbnail ) { ?>
<a href="<?php echo esc_url( $post->post_permalink ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>">
<?php if ( 'on' === $fullwidth ) { ?>
<span class="et_portfolio_image">
$this->render_image( $post->post_thumbnail, array(
'alt' => get_the_title(),
<span class="et_portfolio_image">
'alt' => get_the_title(),
if ( ! empty( $post->featured_image ) ) {
$image_attrs['srcset'] = $post->featured_image . ' 479w, ' . $post->post_thumbnail . ' 480w';
$image_attrs['sizes'] = '(max-width:479px) 479px, 100vw';
$this->render_image( $post->post_thumbnail, $image_attrs );
<?php echo et_core_esc_previously( $overlay ); ?>
$multi_view->render_element( array(
'tag' => $processed_header_level,
'content' => sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', esc_url( $post->post_permalink ), esc_attr( get_the_title() ) , esc_html( get_the_title() )),
'class' => 'et_pb_module_header',
if ( $multi_view->has_value( 'show_categories', 'on' ) && ! empty( $post->post_categories ) ) :
foreach( $post->post_categories as $category ) {
$separator = $category_index < count( $post->post_categories ) ? ', ' : '';
$categories_links .= '<a href="'. esc_url( $category['permalink'] ) .'" title="' . esc_attr( $category['label'] ) . '">' . esc_html( $category['label'] ) . '</a>' . et_core_intentionally_unescaped( $separator, 'fixed_string' );
$multi_view->render_element( array(
'content' => $categories_links,
'show_categories' => 'on',
'show_categories' => 'on',
</div><!-- .et_pb_portfolio_item -->
if ( $multi_view->has_value( 'show_pagination', 'on' ) && ! is_search() ) {
if ( function_exists( 'wp_pagenavi' ) ) {
$pagination = $multi_view->render_element( array(
'content' => wp_pagenavi( array( 'query' => $portfolio, 'echo' => false ) ),
'show_pagination' => 'on',
'show_pagination' => 'on',
$next_posts_link_html = $prev_posts_link_html = '';
if ( ! empty( $portfolio->posts_next['url'] ) ) {
$next_posts_link_html = sprintf(
esc_url( $portfolio->posts_next['url'] ),
esc_html( $portfolio->posts_next['label'] )
if ( ! empty( $portfolio->posts_prev['url'] ) ) {
$prev_posts_link_html = sprintf(
'<div class="alignright">
esc_url( $portfolio->posts_prev['url'] ),
esc_html( $portfolio->posts_prev['label'] )
'<div class="pagination clearfix"%3$s>
$multi_view->render_attrs( array(
'show_pagination' => 'on',
'show_pagination' => 'on',
if ( ! $posts = ob_get_clean() ) {
$posts = self::get_no_results_template();
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$fullwidth = 'on' === $fullwidth;
// 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'] ) ) {
$this->add_classname( $this->generate_css_filters(
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
$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 );
$this->add_classname( array(
$this->remove_classname( $render_slug );
// Background layout data attributes.
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
'<div%4$s class="%1$s"%10$s>
<div class="et_pb_ajax_pagination_container">
$this->module_classname( $render_slug ),
( ! $container_is_closed ? '</div> <!-- .et_pb_portfolio -->' : '' ),
$parallax_image_background,
$fullwidth ? '' : '<div class="et_pb_portfolio_grid_items">',
$fullwidth ? '' : '</div>',
isset( $pagination ) ? $pagination : '',
et_core_esc_previously( $data_background_layout ) // #10
new ET_Builder_Module_Portfolio;