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/sitepres.../inc
File: import-xml.php
<?php
[0] Fix | Delete
[1] Fix | Delete
global $pagenow;
[2] Fix | Delete
$filtered_import = filter_input( INPUT_GET, 'import',FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE );
[3] Fix | Delete
$filtered_step = filter_input( INPUT_GET, 'step',FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE );
[4] Fix | Delete
[5] Fix | Delete
if ($pagenow == 'admin.php' && 0 === strcmp( $filtered_import, 'wordpress' ) && $filtered_step == 1 ) {
[6] Fix | Delete
add_action('admin_head', 'icl_import_xml');
[7] Fix | Delete
}
[8] Fix | Delete
[9] Fix | Delete
function icl_import_xml() {
[10] Fix | Delete
global $sitepress;
[11] Fix | Delete
$langs = $sitepress->get_active_languages();
[12] Fix | Delete
if (empty($langs)) {
[13] Fix | Delete
return;
[14] Fix | Delete
}
[15] Fix | Delete
$default = $sitepress->get_default_language();
[16] Fix | Delete
[17] Fix | Delete
$out = '<h3>' . esc_html__('Select Language', 'sitepress') . '</h3><p><select name="icl_post_language">';
[18] Fix | Delete
foreach ($langs as $lang) {
[19] Fix | Delete
$out .= '<option value="' . esc_attr( $lang['code'] ) . '"';
[20] Fix | Delete
if ($default == $lang['code']) {
[21] Fix | Delete
$out .= ' selected="selected"';
[22] Fix | Delete
}
[23] Fix | Delete
$out .= '>' . esc_html( $lang['native_name'] ) . '<\/option>';
[24] Fix | Delete
}
[25] Fix | Delete
$out .= '<\/select><\/p>';
[26] Fix | Delete
[27] Fix | Delete
echo '
[28] Fix | Delete
<script type="text/javascript">
[29] Fix | Delete
jQuery(document).ready(function(){
[30] Fix | Delete
jQuery("#wpbody-content").find("form .submit").before(\'' . $out . '\');
[31] Fix | Delete
});
[32] Fix | Delete
</script>
[33] Fix | Delete
';
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
add_action('import_start', 'icl_import_xml_start', 0);
[37] Fix | Delete
function icl_import_xml_start() {
[38] Fix | Delete
set_time_limit( 0 );
[39] Fix | Delete
$post_languages = isset( $_POST['icl_post_language'] ) ? $_POST['icl_post_language'] : array();
[40] Fix | Delete
[41] Fix | Delete
$_POST['icl_tax_post_tag_language'] = $_POST['icl_tax_category_language'] = $_POST['icl_tax_language'] = $post_languages;
[42] Fix | Delete
}
[43] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function