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/wp-revie.../admin
File: class-wp-review-importer.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Review importer
[2] Fix | Delete
*
[3] Fix | Delete
* @package WP_Review
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
defined( 'ABSPATH' ) || exit;
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Class WP_Review_Importer
[10] Fix | Delete
*/
[11] Fix | Delete
class WP_Review_Importer {
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* The number of posts to import per request.
[15] Fix | Delete
*
[16] Fix | Delete
* @var int
[17] Fix | Delete
*/
[18] Fix | Delete
private $numposts;
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* WP_Review_Importer constructor.
[22] Fix | Delete
*/
[23] Fix | Delete
public function __construct() {
[24] Fix | Delete
add_action( 'wp_ajax_wp_review_import_options', array( $this, 'import_options' ) );
[25] Fix | Delete
add_action( 'init', array( $this, 'extra_tasks' ) );
[26] Fix | Delete
[27] Fix | Delete
$this->numposts = apply_filters( 'wp_review_import_numposts', 10 );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* AJAX handler for importing options.
[32] Fix | Delete
*/
[33] Fix | Delete
public function import_options() {
[34] Fix | Delete
check_ajax_referer( 'wp-review-import-options' );
[35] Fix | Delete
if ( empty( $_POST['code'] ) ) {
[36] Fix | Delete
wp_send_json_error();
[37] Fix | Delete
}
[38] Fix | Delete
$code = wp_unslash( $_POST['code'] );
[39] Fix | Delete
if ( wp_review_import_options( $code ) ) {
[40] Fix | Delete
wp_send_json_success();
[41] Fix | Delete
}
[42] Fix | Delete
wp_send_json_error();
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
/**
[46] Fix | Delete
* Runs extra tasks.
[47] Fix | Delete
*/
[48] Fix | Delete
public function extra_tasks() {
[49] Fix | Delete
if ( ! function_exists( 'Display_Select_Review' ) ) {
[50] Fix | Delete
add_shortcode( 'select-review', '__return_empty_string' );
[51] Fix | Delete
}
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
$plugin_importer = new WP_Review_Importer();
[56] Fix | Delete
[57] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function