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.../public_h.../clone/wp-conte.../plugins/network-.../componen.../resizer
File: NetsPostsThumbnailResizerClient.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Created by PhpStorm.
[2] Fix | Delete
* User: Andrew
[3] Fix | Delete
* Date: 31.05.2018
[4] Fix | Delete
* Time: 11:25
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
namespace NetworkPosts\Components\Resizer;
[8] Fix | Delete
[9] Fix | Delete
require_once plugin_dir_path(NETSPOSTS_MAIN_PLUGIN_FILE) . '/components/NetsPostsTemplateRenderer.php';
[10] Fix | Delete
use NetworkPosts\Components\NetsPostsTemplateRenderer;
[11] Fix | Delete
[12] Fix | Delete
class NetsPostsThumbnailResizerClient {
[13] Fix | Delete
public function register_hooks() {
[14] Fix | Delete
add_action( 'wp_ajax_get_add_size_form', array( $this, 'print_add_size_form' ) );
[15] Fix | Delete
add_action( 'wp_ajax_get_image_generator_form', array( $this, 'print_image_generator_form' ) );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
public function register_scripts() {
[19] Fix | Delete
[20] Fix | Delete
wp_enqueue_script( 'netsposts_admin_script', netsposts_url( 'dist/main.js' ), false, '1.0.0', true );
[21] Fix | Delete
[22] Fix | Delete
wp_localize_script( 'netsposts_admin_script', 'data', array(
[23] Fix | Delete
[24] Fix | Delete
'loading_gif' => netsposts_url( '/pictures/3.gif'),
[25] Fix | Delete
[26] Fix | Delete
'base_path' => BASE_JS_PATH,
[27] Fix | Delete
[28] Fix | Delete
'empty_table' => 'No entries',
[29] Fix | Delete
[30] Fix | Delete
'error_message' => 'Something went wrong.',
[31] Fix | Delete
[32] Fix | Delete
'create_item_title' => 'Create item',
[33] Fix | Delete
[34] Fix | Delete
'modify_item_title' => 'Modify item',
[35] Fix | Delete
[36] Fix | Delete
'notifier_url' => plugins_url( '/components/action-progress.php', dirname( __FILE__ ) )
[37] Fix | Delete
[38] Fix | Delete
) );
[39] Fix | Delete
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
public function print_image_generator_form() {
[43] Fix | Delete
echo NetsPostsTemplateRenderer::render( '/resizer/image_resizer_form.html' );
[44] Fix | Delete
exit();
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
public function print_add_size_form() {
[48] Fix | Delete
$template = NetsPostsTemplateRenderer::render( '/resizer/add_size_form.html', array(
[49] Fix | Delete
'loader_url' => plugins_url( '/pictures/3.gif', dirname( __FILE__ ) )
[50] Fix | Delete
) );
[51] Fix | Delete
echo $template;
[52] Fix | Delete
exit();
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
public function get_table_html() {
[56] Fix | Delete
return NetsPostsTemplateRenderer::render( '/resizer/table.html' );
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
public function get_blog_options_form_html( $allowed, $is_global ) {
[60] Fix | Delete
return NetsPostsTemplateRenderer::render( '/resizer/blog_resizer_options.html', array(
[61] Fix | Delete
'allowed' => $allowed ? 'checked' : '',
[62] Fix | Delete
'global' => $is_global ? 'checked' : ''
[63] Fix | Delete
) );
[64] Fix | Delete
}
[65] Fix | Delete
}
[66] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function