Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/module
File: Portfolio.php
[500] Fix | Delete
return $next_page <= $max ? get_pagenum_link( $next_page ) : null;
[501] Fix | Delete
}
[502] Fix | Delete
[503] Fix | Delete
/**
[504] Fix | Delete
* Get the previous link
[505] Fix | Delete
*
[506] Fix | Delete
* @param int $paged Current page.
[507] Fix | Delete
*
[508] Fix | Delete
* @return string|null
[509] Fix | Delete
*/
[510] Fix | Delete
private static function get_previous_link( $paged ) {
[511] Fix | Delete
$previous_page = $paged - 1;
[512] Fix | Delete
[513] Fix | Delete
return $previous_page >= 1 ? get_pagenum_link( $previous_page ) : null;
[514] Fix | Delete
}
[515] Fix | Delete
[516] Fix | Delete
function render( $attrs, $content = null, $render_slug ) {
[517] Fix | Delete
global $post;
[518] Fix | Delete
[519] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[520] Fix | Delete
$fullwidth = $this->props['fullwidth'];
[521] Fix | Delete
$posts_number = $this->props['posts_number'];
[522] Fix | Delete
$include_categories = $this->props['include_categories'];
[523] Fix | Delete
$show_title = $this->props['show_title'];
[524] Fix | Delete
$show_categories = $this->props['show_categories'];
[525] Fix | Delete
$show_pagination = $this->props['show_pagination'];
[526] Fix | Delete
$hover_icon = $this->props['hover_icon'];
[527] Fix | Delete
$header_level = $this->props['title_level'];
[528] Fix | Delete
$zoom_icon_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'zoom_icon_color' );
[529] Fix | Delete
$hover_overlay_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'hover_overlay_color' );
[530] Fix | Delete
[531] Fix | Delete
global $paged;
[532] Fix | Delete
[533] Fix | Delete
$processed_header_level = et_pb_process_header_level( $header_level, 'h2' );
[534] Fix | Delete
[535] Fix | Delete
// Set inline style
[536] Fix | Delete
[537] Fix | Delete
// Zoom Icon color.
[538] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $zoom_icon_color_values, '%%order_class%% .et_overlay:before', 'color', $render_slug, ' !important;', 'color' );
[539] Fix | Delete
[540] Fix | Delete
// Hover Overlay color.
[541] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $hover_overlay_color_values, '%%order_class%% .et_overlay', array( 'background-color', 'border-color' ), $render_slug, '', 'color' );
[542] Fix | Delete
[543] Fix | Delete
$container_is_closed = false;
[544] Fix | Delete
[545] Fix | Delete
// Get loop data
[546] Fix | Delete
$portfolio = self::get_portfolio_item( array(
[547] Fix | Delete
'posts_number' => $posts_number,
[548] Fix | Delete
'include_categories' => $include_categories,
[549] Fix | Delete
'fullwidth' => $fullwidth,
[550] Fix | Delete
) );
[551] Fix | Delete
[552] Fix | Delete
// setup overlay
[553] Fix | Delete
$overlay = '';
[554] Fix | Delete
if ( 'on' !== $fullwidth ) {
[555] Fix | Delete
$data_icon = '' !== $hover_icon
[556] Fix | Delete
? sprintf(
[557] Fix | Delete
' data-icon="%1$s"',
[558] Fix | Delete
esc_attr( et_pb_process_font_icon( $hover_icon ) )
[559] Fix | Delete
)
[560] Fix | Delete
: '';
[561] Fix | Delete
[562] Fix | Delete
$overlay = sprintf( '<span class="et_overlay%1$s"%2$s></span>',
[563] Fix | Delete
( '' !== $hover_icon ? ' et_pb_inline_icon' : '' ),
[564] Fix | Delete
$data_icon
[565] Fix | Delete
);
[566] Fix | Delete
}
[567] Fix | Delete
[568] Fix | Delete
ob_start();
[569] Fix | Delete
[570] Fix | Delete
$portfolio_order = self::_get_index( array( self::INDEX_MODULE_ORDER, $render_slug ) );
[571] Fix | Delete
$items_count = 0;
[572] Fix | Delete
[573] Fix | Delete
if ( $portfolio->have_posts() ) {
[574] Fix | Delete
while( $portfolio->have_posts() ) {
[575] Fix | Delete
$portfolio->the_post();
[576] Fix | Delete
ET_Post_Stack::replace( $post );
[577] Fix | Delete
[578] Fix | Delete
// Get $post data of current loop
[579] Fix | Delete
global $post;
[580] Fix | Delete
[581] Fix | Delete
array_push( $post->post_class_name, 'et_pb_portfolio_item' );
[582] Fix | Delete
[583] Fix | Delete
$item_class = sprintf( 'et_pb_portfolio_item_%1$s_%2$s', $portfolio_order, $items_count );
[584] Fix | Delete
[585] Fix | Delete
array_push( $post->post_class_name, $item_class );
[586] Fix | Delete
[587] Fix | Delete
$items_count++;
[588] Fix | Delete
[589] Fix | Delete
if ( 'on' !== $fullwidth ) {
[590] Fix | Delete
array_push( $post->post_class_name, 'et_pb_grid_item' );
[591] Fix | Delete
}
[592] Fix | Delete
[593] Fix | Delete
?>
[594] Fix | Delete
<div id="post-<?php echo esc_attr( $post->ID ); ?>" class="<?php echo esc_attr( join( ' ', $post->post_class_name ) ); ?>">
[595] Fix | Delete
[596] Fix | Delete
<?php if ( '' !== $post->post_thumbnail ) { ?>
[597] Fix | Delete
<a href="<?php echo esc_url( $post->post_permalink ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>">
[598] Fix | Delete
<?php if ( 'on' === $fullwidth ) { ?>
[599] Fix | Delete
<span class="et_portfolio_image">
[600] Fix | Delete
<?php
[601] Fix | Delete
$this->render_image( $post->post_thumbnail, array(
[602] Fix | Delete
'alt' => get_the_title(),
[603] Fix | Delete
'width' => '1080',
[604] Fix | Delete
'height' => '9999',
[605] Fix | Delete
) );
[606] Fix | Delete
?>
[607] Fix | Delete
</span>
[608] Fix | Delete
<?php } else { ?>
[609] Fix | Delete
<span class="et_portfolio_image">
[610] Fix | Delete
<?php
[611] Fix | Delete
$image_attrs = array(
[612] Fix | Delete
'alt' => get_the_title(),
[613] Fix | Delete
'width' => '400',
[614] Fix | Delete
'height' => '284',
[615] Fix | Delete
);
[616] Fix | Delete
[617] Fix | Delete
if ( ! empty( $post->featured_image ) ) {
[618] Fix | Delete
$image_attrs['srcset'] = $post->featured_image . ' 479w, ' . $post->post_thumbnail . ' 480w';
[619] Fix | Delete
$image_attrs['sizes'] = '(max-width:479px) 479px, 100vw';
[620] Fix | Delete
}
[621] Fix | Delete
[622] Fix | Delete
$this->render_image( $post->post_thumbnail, $image_attrs );
[623] Fix | Delete
?>
[624] Fix | Delete
<?php echo et_core_esc_previously( $overlay ); ?>
[625] Fix | Delete
</span>
[626] Fix | Delete
<?php } ?>
[627] Fix | Delete
</a>
[628] Fix | Delete
<?php } ?>
[629] Fix | Delete
[630] Fix | Delete
<?php
[631] Fix | Delete
$multi_view->render_element( array(
[632] Fix | Delete
'tag' => $processed_header_level,
[633] Fix | Delete
'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() )),
[634] Fix | Delete
'attrs' => array(
[635] Fix | Delete
'class' => 'et_pb_module_header',
[636] Fix | Delete
),
[637] Fix | Delete
'visibility' => array(
[638] Fix | Delete
'show_title' => 'on',
[639] Fix | Delete
),
[640] Fix | Delete
'required' => array(
[641] Fix | Delete
'show_title' => 'on',
[642] Fix | Delete
),
[643] Fix | Delete
), true );
[644] Fix | Delete
[645] Fix | Delete
if ( $multi_view->has_value( 'show_categories', 'on' ) && ! empty( $post->post_categories ) ) :
[646] Fix | Delete
$categories_links = '';
[647] Fix | Delete
$category_index = 0;
[648] Fix | Delete
[649] Fix | Delete
foreach( $post->post_categories as $category ) {
[650] Fix | Delete
$category_index++;
[651] Fix | Delete
$separator = $category_index < count( $post->post_categories ) ? ', ' : '';
[652] Fix | Delete
$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' );
[653] Fix | Delete
}
[654] Fix | Delete
[655] Fix | Delete
$multi_view->render_element( array(
[656] Fix | Delete
'tag' => 'p',
[657] Fix | Delete
'content' => $categories_links,
[658] Fix | Delete
'attrs' => array(
[659] Fix | Delete
'class' => 'post-meta',
[660] Fix | Delete
),
[661] Fix | Delete
'visibility' => array(
[662] Fix | Delete
'show_categories' => 'on',
[663] Fix | Delete
),
[664] Fix | Delete
'required' => array(
[665] Fix | Delete
'show_categories' => 'on',
[666] Fix | Delete
),
[667] Fix | Delete
), true );
[668] Fix | Delete
endif;
[669] Fix | Delete
?>
[670] Fix | Delete
[671] Fix | Delete
</div><!-- .et_pb_portfolio_item -->
[672] Fix | Delete
<?php
[673] Fix | Delete
ET_Post_Stack::pop();
[674] Fix | Delete
}
[675] Fix | Delete
ET_Post_Stack::reset();
[676] Fix | Delete
[677] Fix | Delete
if ( $multi_view->has_value( 'show_pagination', 'on' ) && ! is_search() ) {
[678] Fix | Delete
if ( function_exists( 'wp_pagenavi' ) ) {
[679] Fix | Delete
$pagination = $multi_view->render_element( array(
[680] Fix | Delete
'tag' => 'div',
[681] Fix | Delete
'content' => wp_pagenavi( array( 'query' => $portfolio, 'echo' => false ) ),
[682] Fix | Delete
'visibility' => array(
[683] Fix | Delete
'show_pagination' => 'on',
[684] Fix | Delete
),
[685] Fix | Delete
'required' => array(
[686] Fix | Delete
'show_pagination' => 'on',
[687] Fix | Delete
),
[688] Fix | Delete
) );
[689] Fix | Delete
} else {
[690] Fix | Delete
$next_posts_link_html = $prev_posts_link_html = '';
[691] Fix | Delete
[692] Fix | Delete
if ( ! empty( $portfolio->posts_next['url'] ) ) {
[693] Fix | Delete
$next_posts_link_html = sprintf(
[694] Fix | Delete
'<div class="alignleft">
[695] Fix | Delete
<a href="%1$s">%2$s</a>
[696] Fix | Delete
</div>',
[697] Fix | Delete
esc_url( $portfolio->posts_next['url'] ),
[698] Fix | Delete
esc_html( $portfolio->posts_next['label'] )
[699] Fix | Delete
);
[700] Fix | Delete
}
[701] Fix | Delete
[702] Fix | Delete
if ( ! empty( $portfolio->posts_prev['url'] ) ) {
[703] Fix | Delete
$prev_posts_link_html = sprintf(
[704] Fix | Delete
'<div class="alignright">
[705] Fix | Delete
<a href="%1$s">%2$s</a>
[706] Fix | Delete
</div>',
[707] Fix | Delete
esc_url( $portfolio->posts_prev['url'] ),
[708] Fix | Delete
esc_html( $portfolio->posts_prev['label'] )
[709] Fix | Delete
);
[710] Fix | Delete
}
[711] Fix | Delete
[712] Fix | Delete
$pagination = sprintf(
[713] Fix | Delete
'<div class="pagination clearfix"%3$s>
[714] Fix | Delete
%1$s
[715] Fix | Delete
%2$s
[716] Fix | Delete
</div>',
[717] Fix | Delete
$next_posts_link_html,
[718] Fix | Delete
$prev_posts_link_html,
[719] Fix | Delete
$multi_view->render_attrs( array(
[720] Fix | Delete
'visibility' => array(
[721] Fix | Delete
'show_pagination' => 'on',
[722] Fix | Delete
),
[723] Fix | Delete
'required' => array(
[724] Fix | Delete
'show_pagination' => 'on',
[725] Fix | Delete
),
[726] Fix | Delete
) )
[727] Fix | Delete
);
[728] Fix | Delete
}
[729] Fix | Delete
}
[730] Fix | Delete
}
[731] Fix | Delete
[732] Fix | Delete
if ( ! $posts = ob_get_clean() ) {
[733] Fix | Delete
$posts = self::get_no_results_template();
[734] Fix | Delete
}
[735] Fix | Delete
[736] Fix | Delete
$video_background = $this->video_background();
[737] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[738] Fix | Delete
[739] Fix | Delete
$fullwidth = 'on' === $fullwidth;
[740] Fix | Delete
[741] Fix | Delete
// Images: Add CSS Filters and Mix Blend Mode rules (if set)
[742] Fix | Delete
if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
[743] Fix | Delete
$this->add_classname( $this->generate_css_filters(
[744] Fix | Delete
$render_slug,
[745] Fix | Delete
'child_',
[746] Fix | Delete
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
[747] Fix | Delete
) );
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
// Module classnames
[751] Fix | Delete
$this->add_classname( array(
[752] Fix | Delete
$this->get_text_orientation_classname(),
[753] Fix | Delete
) );
[754] Fix | Delete
[755] Fix | Delete
// Background layout class names.
[756] Fix | Delete
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
[757] Fix | Delete
$this->add_classname( $background_layout_class_names );
[758] Fix | Delete
[759] Fix | Delete
if ( ! $fullwidth ) {
[760] Fix | Delete
$this->add_classname( array(
[761] Fix | Delete
'et_pb_portfolio_grid',
[762] Fix | Delete
'clearfix',
[763] Fix | Delete
) );
[764] Fix | Delete
[765] Fix | Delete
$this->remove_classname( $render_slug );
[766] Fix | Delete
}
[767] Fix | Delete
[768] Fix | Delete
// Background layout data attributes.
[769] Fix | Delete
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
[770] Fix | Delete
[771] Fix | Delete
$output = sprintf(
[772] Fix | Delete
'<div%4$s class="%1$s"%10$s>
[773] Fix | Delete
<div class="et_pb_ajax_pagination_container">
[774] Fix | Delete
%6$s
[775] Fix | Delete
%5$s
[776] Fix | Delete
%7$s
[777] Fix | Delete
%2$s
[778] Fix | Delete
%8$s
[779] Fix | Delete
%9$s
[780] Fix | Delete
</div>
[781] Fix | Delete
%3$s',
[782] Fix | Delete
$this->module_classname( $render_slug ),
[783] Fix | Delete
$posts,
[784] Fix | Delete
( ! $container_is_closed ? '</div> <!-- .et_pb_portfolio -->' : '' ),
[785] Fix | Delete
$this->module_id(),
[786] Fix | Delete
$video_background, // #5
[787] Fix | Delete
$parallax_image_background,
[788] Fix | Delete
$fullwidth ? '' : '<div class="et_pb_portfolio_grid_items">',
[789] Fix | Delete
$fullwidth ? '' : '</div>',
[790] Fix | Delete
isset( $pagination ) ? $pagination : '',
[791] Fix | Delete
et_core_esc_previously( $data_background_layout ) // #10
[792] Fix | Delete
);
[793] Fix | Delete
[794] Fix | Delete
return $output;
[795] Fix | Delete
}
[796] Fix | Delete
}
[797] Fix | Delete
[798] Fix | Delete
new ET_Builder_Module_Portfolio;
[799] Fix | Delete
[800] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function