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.../includes/features
File: amp_bridge.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
exit;
[2] Fix | Delete
}
[3] Fix | Delete
global $ampforwpMainArray;
[4] Fix | Delete
function amp_basicAlloptions(){
[5] Fix | Delete
global $ampforwpMainArray;
[6] Fix | Delete
ob_start();
[7] Fix | Delete
do_action('ampforwp_after_header');
[8] Fix | Delete
$hookAfterHeader = ob_get_contents();
[9] Fix | Delete
ob_end_clean();
[10] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_after_header'])){
[11] Fix | Delete
$ampforwpMainArray['ampforwp_after_header'] .= $hookAfterHeader;
[12] Fix | Delete
}else{
[13] Fix | Delete
$ampforwpMainArray['ampforwp_after_header'] = $hookAfterHeader;
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
ob_start();
[17] Fix | Delete
do_action('ampforwp_before_post_content');
[18] Fix | Delete
$hookbeforeContent = ob_get_contents();
[19] Fix | Delete
ob_end_clean();
[20] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_before_post_content'])){
[21] Fix | Delete
$ampforwpMainArray['ampforwp_before_post_content'] .= $hookbeforeContent;
[22] Fix | Delete
}else{
[23] Fix | Delete
$ampforwpMainArray['ampforwp_before_post_content'] = $hookbeforeContent;
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
ob_start();
[27] Fix | Delete
do_action('ampforwp_after_post_content');
[28] Fix | Delete
$hookafterContent = ob_get_contents();
[29] Fix | Delete
ob_end_clean();
[30] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_after_post_content'])){
[31] Fix | Delete
$ampforwpMainArray['ampforwp_after_post_content'] .= $hookafterContent;
[32] Fix | Delete
}else{
[33] Fix | Delete
$ampforwpMainArray['ampforwp_after_post_content'] = $hookafterContent;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
ob_start();
[37] Fix | Delete
do_action('ampforwp_below_the_title');
[38] Fix | Delete
$hook_below_the_title = ob_get_contents();
[39] Fix | Delete
ob_end_clean();
[40] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_below_the_title'])){
[41] Fix | Delete
$ampforwpMainArray['ampforwp_below_the_title'] .= $hook_below_the_title;
[42] Fix | Delete
}else{
[43] Fix | Delete
$ampforwpMainArray['ampforwp_below_the_title'] = $hook_below_the_title;
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
//One signal
[47] Fix | Delete
ob_start();
[48] Fix | Delete
do_action('ampforwp_body_beginning');
[49] Fix | Delete
$hook_body_beginning = ob_get_contents();
[50] Fix | Delete
ob_end_clean();
[51] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_body_beginning'])){
[52] Fix | Delete
$ampforwpMainArray['ampforwp_body_beginning'] .= $hook_body_beginning;
[53] Fix | Delete
}else{
[54] Fix | Delete
$ampforwpMainArray['ampforwp_body_beginning'] = $hook_body_beginning;
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
ob_start();
[58] Fix | Delete
do_action('ampforwp_global_after_footer');
[59] Fix | Delete
$hook_global_after_footer = ob_get_contents();
[60] Fix | Delete
ob_end_clean();
[61] Fix | Delete
if(isset($ampforwpMainArray['ampforwp_global_after_footer'])){
[62] Fix | Delete
$ampforwpMainArray['ampforwp_global_after_footer'] .= $hook_global_after_footer;
[63] Fix | Delete
}else{
[64] Fix | Delete
$ampforwpMainArray['ampforwp_global_after_footer'] = $hook_global_after_footer;
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
ob_start();
[68] Fix | Delete
do_action('amp_footer_link');
[69] Fix | Delete
$hook_global_after_footer = ob_get_contents();
[70] Fix | Delete
ob_end_clean();
[71] Fix | Delete
if(isset($ampforwpMainArray['amp_footer_link'])){
[72] Fix | Delete
$ampforwpMainArray['amp_footer_link'] .= $hook_global_after_footer;
[73] Fix | Delete
}else{
[74] Fix | Delete
$ampforwpMainArray['amp_footer_link'] = $hook_global_after_footer;
[75] Fix | Delete
}
[76] Fix | Delete
}
[77] Fix | Delete
add_action("pre_amp_render_post", "amp_basicAlloptions",4);
[78] Fix | Delete
[79] Fix | Delete
add_filter("ampforwp_the_content_last_filter", "ampforwp_add_basic_hooks");
[80] Fix | Delete
function ampforwp_add_basic_hooks($content_buffer){
[81] Fix | Delete
global $ampforwpMainArray;
[82] Fix | Delete
[83] Fix | Delete
// Below Header Global
[84] Fix | Delete
$content_buffer = preg_replace('[<article(.*?)>]', $ampforwpMainArray['ampforwp_after_header']."\n<article$1> " , $content_buffer, 1);
[85] Fix | Delete
if (preg_match("#<article(.+?)>(.+?)<\/header>(.+?)<div(.*?)>#si", $content_buffer, $match)){
[86] Fix | Delete
// Below Title Single
[87] Fix | Delete
$content_buffer = preg_replace('#<article(.+?)>(.+?)<\/header>(.+?)<div(.*?)>#si', "<article$1> $2</header>$3".$ampforwpMainArray['ampforwp_before_post_content']."\n<div$4>" , $content_buffer);
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
$content_buffer = preg_replace('#<article(.+?)>(.+?)<footer(.+?)>#si', "<article$1>$2".$ampforwpMainArray['ampforwp_after_post_content']."<footer$3>" , $content_buffer);
[91] Fix | Delete
[92] Fix | Delete
if (preg_match("#<article(.+?)>(.+?)<\/header>#si", $content_buffer, $match)){
[93] Fix | Delete
$content_buffer = preg_replace('#<article(.+?)>(.+?)<\/header>#si', "<article$1>$2".$ampforwpMainArray['ampforwp_below_the_title']."\n</header>" , $content_buffer);
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
$content_buffer = preg_replace('#<body(.+?)>(.+?)<header(.+?)>#si', "<body$1>".$ampforwpMainArray['ampforwp_body_beginning']."\n$2<header$3>" , $content_buffer);
[97] Fix | Delete
$content_buffer = preg_replace('#<\/article>(.+?)<\/footer>#si', "</article>$1</footer>".$ampforwpMainArray['ampforwp_global_after_footer'] , $content_buffer);
[98] Fix | Delete
[99] Fix | Delete
return $content_buffer;
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
if(!function_exists('ampforwp_is_non_amp')){
[103] Fix | Delete
function ampforwp_is_non_amp() {
[104] Fix | Delete
return false;
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
if(!function_exists('checkAMPforPageBuilderStatus')){
[109] Fix | Delete
function checkAMPforPageBuilderStatus(){
[110] Fix | Delete
return false;
[111] Fix | Delete
}
[112] Fix | Delete
}
[113] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function