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.../componen.../search
File: search.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
exit;
[2] Fix | Delete
}
[3] Fix | Delete
//main output function
[4] Fix | Delete
function ampforwp_framework_get_search_form() {
[5] Fix | Delete
global $redux_builder_amp;
[6] Fix | Delete
$action_url = '';
[7] Fix | Delete
$amp_query_variable = '';
[8] Fix | Delete
$amp_query_variable_val = '';
[9] Fix | Delete
$label = esc_html__(ampforwp_translation(ampforwp_get_setting('ampforwp-search-label'), 'Type your search query and hit enter'));
[10] Fix | Delete
$action_url = ( get_bloginfo('url') );
[11] Fix | Delete
$action_url = preg_replace('#^http?:#', '', $action_url);
[12] Fix | Delete
$placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
[13] Fix | Delete
if (function_exists('pll__')) {
[14] Fix | Delete
$placeholder = pll__(esc_html__( ampforwp_get_setting('ampforwp-search-placeholder'), 'accelerated-mobile-pages'));
[15] Fix | Delete
}
[16] Fix | Delete
$rand = rand(10,100);
[17] Fix | Delete
$value = get_search_query();
[18] Fix | Delete
$name = 's';
[19] Fix | Delete
$mob_pres_link = false;
[20] Fix | Delete
if(function_exists('ampforwp_mobile_redirect_preseve_link')){
[21] Fix | Delete
$mob_pres_link = ampforwp_mobile_redirect_preseve_link();
[22] Fix | Delete
}
[23] Fix | Delete
if (ampforwp_get_setting('ampforwp-amp-takeover') == false && $mob_pres_link == false) {
[24] Fix | Delete
$amp_query_variable = 'amp';
[25] Fix | Delete
$amp_query_variable_val = '1';
[26] Fix | Delete
}
[27] Fix | Delete
if (ampforwp_get_setting('ampforwp-search-google')) {
[28] Fix | Delete
$action_url = 'https://www.google.com/search';
[29] Fix | Delete
$amp_query_variable = '';
[30] Fix | Delete
$value = 'site:'.get_bloginfo('url').$value;
[31] Fix | Delete
$name = 'q';
[32] Fix | Delete
}
[33] Fix | Delete
$form = '<form role="search" method="get" class="amp-search" target="_top" action="' . esc_url($action_url) .'">
[34] Fix | Delete
<div class="amp-search-wrapper">
[35] Fix | Delete
<label aria-label="Type your query" class="screen-reader-text" for="s">' . esc_html__($label,'accelerated-mobile-pages') . '</label>
[36] Fix | Delete
<input type="text" placeholder="'.esc_attr__('AMP','accelerated-mobile-pages').'" value="'.esc_attr($amp_query_variable_val).'" name="'.esc_attr($amp_query_variable).'" class="hidden"/>
[37] Fix | Delete
<label aria-label="search text" for="search-text-'.esc_attr($rand).'"></label>
[38] Fix | Delete
<input id="search-text-'.esc_attr($rand).'" type="text" placeholder="'.esc_attr__($placeholder,'accelerated-mobile-pages').'" value="' . esc_attr($value).'" name="'.esc_attr($name).'" class="s" />
[39] Fix | Delete
<label aria-label="Submit amp search" for="amp-search-submit" >
[40] Fix | Delete
<input type="submit" class="icon-search" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
[41] Fix | Delete
</label>
[42] Fix | Delete
<div class="overlay-search">
[43] Fix | Delete
</div>
[44] Fix | Delete
</div>
[45] Fix | Delete
</form>';
[46] Fix | Delete
$form = apply_filters( 'ampforwp_search_form_data', $form );
[47] Fix | Delete
echo $form; // XSS OK
[48] Fix | Delete
}
[49] Fix | Delete
ampforwp_add_scripts();
[50] Fix | Delete
function ampforwp_add_scripts(){
[51] Fix | Delete
global $scriptComponent;
[52] Fix | Delete
if ( empty( $scriptComponent['amp-form'] ) ) {
[53] Fix | Delete
$scriptComponent['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
[54] Fix | Delete
}
[55] Fix | Delete
}
[56] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function