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
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../pagebuil.../modules
File: comments-module.php
<?php
[0] Fix | Delete
// Exit if accessed directly.
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) exit;
[2] Fix | Delete
function ampforwp_get_pb_comment_list($moduleFrontHtml, $moduleTemplate, $contentArray){
[3] Fix | Delete
$output = '';
[4] Fix | Delete
if($moduleTemplate['name']!="comments"){return $moduleFrontHtml; }
[5] Fix | Delete
if (ampforwp_get_setting('wordpress-comments-support')) {
[6] Fix | Delete
global $post;
[7] Fix | Delete
$comments = $max_page = "";
[8] Fix | Delete
$postID = $post->ID;
[9] Fix | Delete
$output = '<div class="pb-comments">';
[10] Fix | Delete
$order = get_option( 'comment_order');
[11] Fix | Delete
$comments = get_comments(array(
[12] Fix | Delete
'post_id' => intval($postID),
[13] Fix | Delete
'status' => 'approve',
[14] Fix | Delete
'order' =>esc_attr($order)
[15] Fix | Delete
));
[16] Fix | Delete
[17] Fix | Delete
if ( $comments ) {
[18] Fix | Delete
$output .= '<div {{if_id}}id="{{id}}"{{ifend_id}} class="pb-comments-wrapper {{if_user_class}}{{user_class}}{{ifend_user_class}}">
[19] Fix | Delete
<h3><span>'.ampforwp_get_setting('amp-translator-view-comments-text').'</span></h3>
[20] Fix | Delete
<ul>';
[21] Fix | Delete
foreach ($comments as $key => $value) {
[22] Fix | Delete
$avatar = get_avatar_url( $value->comment_author_email);
[23] Fix | Delete
$output .='<li>';
[24] Fix | Delete
if(ampforwp_get_setting('ampforwp-display-avatar')){
[25] Fix | Delete
$output .='<div class="fn"><img src="'.esc_url($avatar).'" height="50" width="50"/></div>';
[26] Fix | Delete
}
[27] Fix | Delete
$output .='<div class="pbc-auth-info"><div class="pbc-auth-name"><b class="fn">'.esc_attr($value->comment_author).'</b></div>';
[28] Fix | Delete
$output .='<span>'.esc_attr(date('F d, Y H:i:s', strtotime($value->comment_date))).'</span></div>';
[29] Fix | Delete
$output .='<p class="pbc-comment">'.wp_kses_post($value->comment_content).'</p>';
[30] Fix | Delete
$output .='</li>';
[31] Fix | Delete
}
[32] Fix | Delete
$output .='</ul>';
[33] Fix | Delete
$output .='</div>';
[34] Fix | Delete
}
[35] Fix | Delete
$output .='</div>';
[36] Fix | Delete
}
[37] Fix | Delete
return $output;
[38] Fix | Delete
}
[39] Fix | Delete
add_filter("ampforwp_extension_pagebuilder_module_template",'ampforwp_get_pb_comment_list' ,10,3);
[40] Fix | Delete
$output_html = "{{Comment_HTML}}";
[41] Fix | Delete
$css = '.pb-comments-wrapper ul li{list-style-type:none;position:relative;} .pbc-auth-info{position:absolute;top:2px;left:56px;} .pbc-auth-name{margin-bottom:5px}.pbc-comment{margin-top:10px;margin-bottom:10px;} .pb-comments-wrapper h3{margin-bottom: 16px;line-height:35px;border-bottom: 1px solid #d7d7d7;}';
[42] Fix | Delete
return array(
[43] Fix | Delete
'label' =>'Comments',
[44] Fix | Delete
'name' =>'comments',
[45] Fix | Delete
'default_tab'=> 'advanced',
[46] Fix | Delete
'tabs' => array(
[47] Fix | Delete
'advanced' => 'Advanced'
[48] Fix | Delete
),
[49] Fix | Delete
[50] Fix | Delete
'fields' => array(
[51] Fix | Delete
array(
[52] Fix | Delete
'type' =>'text',
[53] Fix | Delete
'name' =>"id",
[54] Fix | Delete
'label' =>'ID',
[55] Fix | Delete
'tab' =>'advanced',
[56] Fix | Delete
'default' =>'',
[57] Fix | Delete
'content_type'=>'html'
[58] Fix | Delete
),
[59] Fix | Delete
array(
[60] Fix | Delete
'type' =>'text',
[61] Fix | Delete
'name' =>"user_class",
[62] Fix | Delete
'label' =>'Class',
[63] Fix | Delete
'tab' =>'advanced',
[64] Fix | Delete
'default' =>'',
[65] Fix | Delete
'content_type'=>'html'
[66] Fix | Delete
),
[67] Fix | Delete
),
[68] Fix | Delete
'front_template'=> $output_html,
[69] Fix | Delete
'front_css'=> '',
[70] Fix | Delete
'front_common_css'=>$css,
[71] Fix | Delete
);
[72] Fix | Delete
?>
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function