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/network-.../componen.../settings
File: NetsPostsBlogSettingsPage.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Created by PhpStorm.
[2] Fix | Delete
* User: Andrew
[3] Fix | Delete
* Date: 01.06.2018
[4] Fix | Delete
* Time: 10:22
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
namespace NetworkPosts\Components\Settings;
[8] Fix | Delete
[9] Fix | Delete
use NetworkPosts\Components\Resizer\NetsPostsThumbnailBlogSettings;
[10] Fix | Delete
use NetworkPosts\Components\Resizer\NetsPostsThumbnailResizerClient;
[11] Fix | Delete
use NetworkPosts\Components\Resizer\NetsPostsThumbnailsResizer;
[12] Fix | Delete
[13] Fix | Delete
class NetsPostsBlogSettingsPage {
[14] Fix | Delete
[15] Fix | Delete
################### TOOL PAGE #########################
[16] Fix | Delete
[17] Fix | Delete
public static function print_page() {
[18] Fix | Delete
$client = new NetsPostsThumbnailResizerClient();
[19] Fix | Delete
$blog_id = get_current_blog_id();
[20] Fix | Delete
$allowed = NetsPostsThumbnailBlogSettings::is_allowed_for_blog( $blog_id );
[21] Fix | Delete
[22] Fix | Delete
$data = [];
[23] Fix | Delete
$strip_excerpt_tags = NetsPostsNetworkSettings::is_excerpt_tags_denied( $blog_id );
[24] Fix | Delete
$data['strip_excerpt_tags'] = checked( $strip_excerpt_tags, 1, false );
[25] Fix | Delete
[26] Fix | Delete
if( is_super_admin() ){
[27] Fix | Delete
$global = NetsPostsThumbnailBlogSettings::is_global( $blog_id );
[28] Fix | Delete
$data['options_form'] = $client->get_blog_options_form_html( $allowed, $global );
[29] Fix | Delete
}
[30] Fix | Delete
else{
[31] Fix | Delete
$data['options_form'] = '';
[32] Fix | Delete
}
[33] Fix | Delete
if( $allowed ) {
[34] Fix | Delete
$data['resizer_table'] = $client->get_table_html();
[35] Fix | Delete
}
[36] Fix | Delete
else{
[37] Fix | Delete
$data['resizer_table'] = '';
[38] Fix | Delete
}
[39] Fix | Delete
$data['nonce'] = wp_create_nonce( 'netsposts_page-options' );
[40] Fix | Delete
$data['pages'] = get_option( 'hide_readmore_link_pages' );
[41] Fix | Delete
$data['hide_all_readmore_links'] = checked( get_option( 'hide_all_readmore_links' ), 1, false);
[42] Fix | Delete
$data['use_single_images_folder'] = checked( get_option( 'use_single_images_folder' ), 1, false);
[43] Fix | Delete
$data['use_compressed_images'] = checked(get_option( 'use_compressed_images' ), 1, false);
[44] Fix | Delete
$data['load_plugin_styles'] = checked( get_option( 'load_plugin_styles', 1 ), 1, false );
[45] Fix | Delete
[46] Fix | Delete
echo \NetworkPosts\Components\NetsPostsTemplateRenderer::render( '/settings.html', $data);
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
public static function plugin_settings_link( $links ) {
[50] Fix | Delete
$settings_link = '<a href="options-general.php?page=netsposts_page">Settings</a>';
[51] Fix | Delete
[52] Fix | Delete
array_unshift( $links, $settings_link );
[53] Fix | Delete
[54] Fix | Delete
return $links;
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
public static function add_toolpage() {
[58] Fix | Delete
add_options_page( 'Network Posts Ext', 'Network Posts Ext', 'manage_options', 'netsposts_page', array( self::class, 'print_page') );
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
public static function register_settings(){
[62] Fix | Delete
add_allowed_options( [
[63] Fix | Delete
'netsposts_page' => [
[64] Fix | Delete
'hide_readmore_link_pages', 'hide_all_readmore_links',
[65] Fix | Delete
'use_single_images_folder', 'use_compressed_images',
[66] Fix | Delete
'load_plugin_styles'
[67] Fix | Delete
]]);
[68] Fix | Delete
register_setting( 'netsposts_page', 'hide_readmore_link_pages' );
[69] Fix | Delete
register_setting( 'netsposts_page', 'hide_all_readmore_links' );
[70] Fix | Delete
register_setting( 'netsposts_page', 'use_single_images_folder' );
[71] Fix | Delete
register_setting( 'netsposts_page', 'use_compressed_images' );
[72] Fix | Delete
register_setting( 'netsposts_page', 'load_plugin_styles' );
[73] Fix | Delete
}
[74] Fix | Delete
}
[75] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function