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.../plugins/accelera.../pagebuil.../modules
File: contents-module.php
$rawhtml = str_replace(array(
[500] Fix | Delete
"{{ampforwp_post_url}}",
[501] Fix | Delete
"{{image}}",
[502] Fix | Delete
"{{image_srcset}}",
[503] Fix | Delete
"{{width}}",
[504] Fix | Delete
"{{height}}",
[505] Fix | Delete
"{{title}}",
[506] Fix | Delete
"{{excerptContent}}",
[507] Fix | Delete
"{{readMore}}",
[508] Fix | Delete
"{{loopdate}}",
[509] Fix | Delete
"{{authorname}}",
[510] Fix | Delete
"{{postdate}}",
[511] Fix | Delete
"{{image_alt}}",
[512] Fix | Delete
"{{tags}}"
[513] Fix | Delete
),
[514] Fix | Delete
array(
[515] Fix | Delete
$ampforwp_post_url,
[516] Fix | Delete
$image,
[517] Fix | Delete
$image_srcset,
[518] Fix | Delete
$width,
[519] Fix | Delete
$height,
[520] Fix | Delete
$title,
[521] Fix | Delete
$excerptContent,
[522] Fix | Delete
$readMore,
[523] Fix | Delete
$loopdate,
[524] Fix | Delete
$author,
[525] Fix | Delete
$postdate,
[526] Fix | Delete
$image_alt,
[527] Fix | Delete
$tags,
[528] Fix | Delete
),
[529] Fix | Delete
$loopHtml);
[530] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("ampforwp_post_url", $ampforwp_post_url, $rawhtml);
[531] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("image", $image, $rawhtml);
[532] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("image_srcset", $image_srcset, $rawhtml);
[533] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("width", $width, $rawhtml);
[534] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
[535] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
[536] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("excerptContent", $excerptContent, $rawhtml);
[537] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("readMore", $readMore, $rawhtml);
[538] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("loopdate", $loopdate, $rawhtml);
[539] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("authorname", $author, $rawhtml);
[540] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("postdate", $postdate, $rawhtml);
[541] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("image_alt", $image_alt, $rawhtml);
[542] Fix | Delete
$rawhtml = ampforwp_replaceIfContentConditional("tags", $tags, $rawhtml);
[543] Fix | Delete
$rawhtml = apply_filters( 'ampforwp_pb_cntmod_rawhtml', $rawhtml );
[544] Fix | Delete
$contenthtml .= $rawhtml;
[545] Fix | Delete
[546] Fix | Delete
}
[547] Fix | Delete
[548] Fix | Delete
}
[549] Fix | Delete
[550] Fix | Delete
/* Restore original Post Data */
[551] Fix | Delete
wp_reset_postdata();
[552] Fix | Delete
$pagination_links = ampforwp_cat_pagination_links($the_query,$fieldValues);
[553] Fix | Delete
//echo $contenthtml;
[554] Fix | Delete
//die;
[555] Fix | Delete
[556] Fix | Delete
return array('contents'=>$contenthtml,'pagination_links' => $pagination_links);
[557] Fix | Delete
}
[558] Fix | Delete
[559] Fix | Delete
function ampforwp_cat_pagination_links($the_query,$fieldValues){
[560] Fix | Delete
$pagination_links = '';
[561] Fix | Delete
$pagination_text = 'pageno';
[562] Fix | Delete
if( ampforwp_is_front_page()){
[563] Fix | Delete
$queryUrl = esc_url( ampforwp_url_controller(home_url()) );
[564] Fix | Delete
}else{
[565] Fix | Delete
$queryUrl = esc_url(ampforwp_url_controller(get_permalink(ampforwp_get_the_ID())));
[566] Fix | Delete
}
[567] Fix | Delete
if( isset($fieldValues['pagination']) && $fieldValues['pagination'] == 1){
[568] Fix | Delete
[569] Fix | Delete
/*Pagination Sart*/
[570] Fix | Delete
$offset = $fieldValues['posts_offset'];
[571] Fix | Delete
$per_page = $the_query->query['posts_per_page'];
[572] Fix | Delete
$offset_num = ceil($offset/$per_page);
[573] Fix | Delete
[574] Fix | Delete
if( $the_query->max_num_pages == $offset_num ){
[575] Fix | Delete
$total_num_pages = $the_query->max_num_pages;
[576] Fix | Delete
}else{
[577] Fix | Delete
$total_num_pages = $the_query->max_num_pages - $offset_num;
[578] Fix | Delete
}
[579] Fix | Delete
if(isset($_GET[$pagination_text]) && $_GET[$pagination_text]!='' ){
[580] Fix | Delete
$paged = intval($_GET[$pagination_text]);
[581] Fix | Delete
}else{
[582] Fix | Delete
$paged = 1;
[583] Fix | Delete
}
[584] Fix | Delete
$pagination_links .= '<div class="cmp">';
[585] Fix | Delete
if( $paged > 1){
[586] Fix | Delete
[587] Fix | Delete
$first_page = add_query_arg( array( $pagination_text => 1 ), $queryUrl );
[588] Fix | Delete
$first_page .= '#cat-jump'. esc_html($fieldValues['id']);
[589] Fix | Delete
$prev_page = add_query_arg( array( $pagination_text => $paged - 1 ), $queryUrl );
[590] Fix | Delete
$nextLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_next']) && !empty($fieldValues['ampforwp_pb_cat_pagination_next'])) ? $fieldValues['ampforwp_pb_cat_pagination_next'] : "Next";
[591] Fix | Delete
[592] Fix | Delete
$pagination_links .= "<a class='pagi-first' href = ".esc_url($first_page)."> ".esc_html__($nextLabel,'accelerated-mobile-pages')."</a>";
[593] Fix | Delete
//$pagination_links .= "<a href = ".$prev_page."> Prev </a>";
[594] Fix | Delete
}
[595] Fix | Delete
[596] Fix | Delete
$count = (integer) $fieldValues['show_no_page_links'];
[597] Fix | Delete
if( !$count ){
[598] Fix | Delete
$count = 3;
[599] Fix | Delete
}
[600] Fix | Delete
$startPage = max( 1, $paged - $count);
[601] Fix | Delete
$endPage = min( $total_num_pages, $paged + $count);
[602] Fix | Delete
for($i = $startPage ; $i <= $endPage ; $i++){
[603] Fix | Delete
if( $paged == $i && $startPage!=$endPage){
[604] Fix | Delete
$pagination_links .= "<a class='active' href='#/' >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
[605] Fix | Delete
}else{
[606] Fix | Delete
$allPages = add_query_arg( array( $pagination_text => $i ), $queryUrl ) . '#cat-jump'.esc_html($fieldValues['id']);
[607] Fix | Delete
if($startPage!=$endPage){
[608] Fix | Delete
$pagination_links .= "<a href =".esc_url($allPages)." >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
[609] Fix | Delete
}
[610] Fix | Delete
}
[611] Fix | Delete
[612] Fix | Delete
}
[613] Fix | Delete
[614] Fix | Delete
if( $total_num_pages != 1 && $paged < $total_num_pages ){
[615] Fix | Delete
$next_page = add_query_arg( array( $pagination_text => $paged + 1 ), $queryUrl );
[616] Fix | Delete
//$pagination_links .= "<a href =".$next_page." '> Next </a>";
[617] Fix | Delete
}
[618] Fix | Delete
if( $total_num_pages != $paged ){
[619] Fix | Delete
$lastLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_last']) && !empty($fieldValues['ampforwp_pb_cat_pagination_last'])) ? $fieldValues['ampforwp_pb_cat_pagination_last'] : "Last";
[620] Fix | Delete
$next_page = add_query_arg( array( $pagination_text => $total_num_pages ), $queryUrl );
[621] Fix | Delete
$next_page .= '#cat-jump'. esc_html($fieldValues['id']);
[622] Fix | Delete
$pagination_links .= "<a class='pagi-last' href =".esc_url($next_page)." >".esc_html__($lastLabel, 'accelerated-mobile-pages')."</a>";
[623] Fix | Delete
}
[624] Fix | Delete
$pagination_links .= '</div>';
[625] Fix | Delete
[626] Fix | Delete
/*Pagination End*/
[627] Fix | Delete
}
[628] Fix | Delete
return $pagination_links;
[629] Fix | Delete
}
[630] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function