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/wp-conte.../plugins/accelera.../template.../template...
File: admin-settings.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
exit;
[2] Fix | Delete
}
[3] Fix | Delete
add_filter('ampforwp_enabled_setting_options', 'add_theme_mode_support');
[4] Fix | Delete
add_filter("redux/options/redux_builder_amp/sections", 'ampforwp_settings_to_cache');
[5] Fix | Delete
add_action( 'admin_footer', 'ampforwp_enqueue_template_mode_scripts' );
[6] Fix | Delete
function add_theme_mode_support($modesArray){
[7] Fix | Delete
$modesArray[] ='template-mode-amp';
[8] Fix | Delete
return $modesArray;
[9] Fix | Delete
}
[10] Fix | Delete
if ( ! function_exists( 'ampforwp_settings_to_cache' ) ) {
[11] Fix | Delete
function ampforwp_settings_to_cache($sections){
[12] Fix | Delete
$seoSection = array();
[13] Fix | Delete
$unsetArray = array('basic','design', 'opt-structured-data', 'amp-notifications', 'ampforwp-push-notifications', 'disqus-comments', 'fb-instant-article', 'hide-amp-section', 'amp-advance', 'amp-translator', 'amp-theme-settings', 'amp-theme-global-subsection', 'amp-theme-header-settings', 'amp-theme-homepage-settings', 'amp-single', 'amp-theme-footer-settings', 'amp-theme-page-settings', 'amp-social', 'ampforwp-date-section', 'amp-design', 'opt-text-subsection', 'amp-content-builder', 'amp-contact', 'amp-e-commerce', 'opt-choose', 'opt-plugins-manager','ampforwp-new-ux');
[14] Fix | Delete
$unsetArray = apply_filters('amp_template_mode_hide_opt_array',$unsetArray);
[15] Fix | Delete
$backupArray = array( 'amp-ads', 'analytics', 'pwa-for-wp', 'amp-performance', 'amp-seo');
[16] Fix | Delete
$backupArray = apply_filters('amp_template_mode_show_opt_array',$backupArray);
[17] Fix | Delete
[18] Fix | Delete
$pwaField = array();
[19] Fix | Delete
foreach($sections as $key => $sec){
[20] Fix | Delete
if( in_array($sec['id'], $backupArray) ){
[21] Fix | Delete
if($sec['id']=='pwa-for-wp'){
[22] Fix | Delete
$pwaField = $sec['fields'];
[23] Fix | Delete
unset($sections[$key]);
[24] Fix | Delete
}
[25] Fix | Delete
if($sec['id']=='amp-performance'){
[26] Fix | Delete
$sec['fields'] = array_merge($sec['fields'], $pwaField);
[27] Fix | Delete
}
[28] Fix | Delete
$seoSection[] = $sec;
[29] Fix | Delete
unset($sections[$key]);
[30] Fix | Delete
}
[31] Fix | Delete
if( in_array($sec['id'], $unsetArray) ){
[32] Fix | Delete
$sections[$key]['class'] = 'hidden';
[33] Fix | Delete
}
[34] Fix | Delete
}
[35] Fix | Delete
$template_mode = array(array(
[36] Fix | Delete
'id' => 'template-mode-amp',
[37] Fix | Delete
'title' => 'Settings',
[38] Fix | Delete
'icon' => 'el el-cogs',
[39] Fix | Delete
'priority' => 1,
[40] Fix | Delete
'fields' => array()
[41] Fix | Delete
)
[42] Fix | Delete
);
[43] Fix | Delete
$template_mode = array_merge($template_mode, $seoSection);
[44] Fix | Delete
$sections = array_merge($template_mode, $sections);
[45] Fix | Delete
[46] Fix | Delete
return $sections;
[47] Fix | Delete
}
[48] Fix | Delete
}
[49] Fix | Delete
function ampforwp_enqueue_template_mode_scripts(){
[50] Fix | Delete
?> <script>
[51] Fix | Delete
jQuery('a[href*="admin.php?page=amp_options&tab=0"]').parents('li').find('li').each(
[52] Fix | Delete
function(i,k){
[53] Fix | Delete
if(i>1){
[54] Fix | Delete
$(this).hide();
[55] Fix | Delete
}
[56] Fix | Delete
});
[57] Fix | Delete
</script>
[58] Fix | Delete
<?php
[59] Fix | Delete
}
[60] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function