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/wordpres.../admin/views
File: tool-bulk-editor.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
* @since 1.5.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'WPSEO_VERSION' ) ) {
[8] Fix | Delete
header( 'Status: 403 Forbidden' );
[9] Fix | Delete
header( 'HTTP/1.1 403 Forbidden' );
[10] Fix | Delete
exit();
[11] Fix | Delete
}
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Sanitizes the parameters that have been sent.
[15] Fix | Delete
*
[16] Fix | Delete
* @return array The sanitized fields.
[17] Fix | Delete
*/
[18] Fix | Delete
function yoast_free_bulk_sanitize_input_fields() {
[19] Fix | Delete
$possible_params = [
[20] Fix | Delete
'type',
[21] Fix | Delete
'paged',
[22] Fix | Delete
'post_type_filter',
[23] Fix | Delete
'post_status',
[24] Fix | Delete
'order',
[25] Fix | Delete
'orderby',
[26] Fix | Delete
];
[27] Fix | Delete
[28] Fix | Delete
$input_get = [];
[29] Fix | Delete
foreach ( $possible_params as $param_name ) {
[30] Fix | Delete
if ( isset( $_GET[ $param_name ] ) ) {
[31] Fix | Delete
$input_get[ $param_name ] = sanitize_text_field( wp_unslash( $_GET[ $param_name ] ) );
[32] Fix | Delete
}
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
return $input_get;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
$yoast_free_input_fields = yoast_free_bulk_sanitize_input_fields();
[39] Fix | Delete
[40] Fix | Delete
// Verifies the nonce.
[41] Fix | Delete
if ( ! empty( $yoast_free_input_fields ) ) {
[42] Fix | Delete
check_admin_referer( 'bulk-editor-table', 'nonce' );
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
// If type is empty, fill it with value of first tab (title).
[46] Fix | Delete
if ( ! isset( $yoast_free_input_fields['type'] ) ) {
[47] Fix | Delete
$yoast_free_input_fields['type'] = 'title';
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
$yoast_bulk_editor_arguments = [
[51] Fix | Delete
'input_fields' => $yoast_free_input_fields,
[52] Fix | Delete
'nonce' => wp_create_nonce( 'bulk-editor-table' ),
[53] Fix | Delete
];
[54] Fix | Delete
[55] Fix | Delete
$wpseo_bulk_titles_table = new WPSEO_Bulk_Title_Editor_List_Table( $yoast_bulk_editor_arguments );
[56] Fix | Delete
$wpseo_bulk_description_table = new WPSEO_Bulk_Description_List_Table( $yoast_bulk_editor_arguments );
[57] Fix | Delete
[58] Fix | Delete
$yoast_free_screen_reader_content = [
[59] Fix | Delete
'heading_views' => __( 'Filter posts list', 'wordpress-seo' ),
[60] Fix | Delete
'heading_pagination' => __( 'Posts list navigation', 'wordpress-seo' ),
[61] Fix | Delete
'heading_list' => __( 'Posts list', 'wordpress-seo' ),
[62] Fix | Delete
];
[63] Fix | Delete
get_current_screen()->set_screen_reader_content( $yoast_free_screen_reader_content );
[64] Fix | Delete
[65] Fix | Delete
if ( ! empty( $_REQUEST['_wp_http_referer'] ) && isset( $_SERVER['REQUEST_URI'] ) ) {
[66] Fix | Delete
$request_uri = sanitize_file_name( wp_unslash( $_SERVER['REQUEST_URI'] ) );
[67] Fix | Delete
[68] Fix | Delete
wp_redirect(
[69] Fix | Delete
remove_query_arg(
[70] Fix | Delete
[ '_wp_http_referer', '_wpnonce' ],
[71] Fix | Delete
$request_uri
[72] Fix | Delete
)
[73] Fix | Delete
);
[74] Fix | Delete
exit;
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
/**
[78] Fix | Delete
* Renders a bulk editor tab.
[79] Fix | Delete
*
[80] Fix | Delete
* @param WPSEO_Bulk_List_Table $table The table to render.
[81] Fix | Delete
* @param string $id The id for the tab.
[82] Fix | Delete
*
[83] Fix | Delete
* @return void
[84] Fix | Delete
*/
[85] Fix | Delete
function wpseo_get_rendered_tab( $table, $id ) {
[86] Fix | Delete
?>
[87] Fix | Delete
<div id="<?php echo esc_attr( $id ); ?>" class="wpseotab">
[88] Fix | Delete
<?php
[89] Fix | Delete
$table->show_page();
[90] Fix | Delete
?>
[91] Fix | Delete
</div>
[92] Fix | Delete
<?php
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
?>
[96] Fix | Delete
<script>
[97] Fix | Delete
<?php /* phpcs:ignore WordPress.Security.EscapeOutput -- WPSEO_Utils::format_json_encode is safe. */ ?>
[98] Fix | Delete
var wpseoBulkEditorNonce = <?php echo WPSEO_Utils::format_json_encode( wp_create_nonce( 'wpseo-bulk-editor' ) ); ?>;
[99] Fix | Delete
[100] Fix | Delete
// eslint-disable-next-line
[101] Fix | Delete
var wpseo_bulk_editor_nonce = wpseoBulkEditorNonce;
[102] Fix | Delete
</script>
[103] Fix | Delete
[104] Fix | Delete
<br/><br/>
[105] Fix | Delete
[106] Fix | Delete
<div class="wpseo_table_page">
[107] Fix | Delete
[108] Fix | Delete
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
[109] Fix | Delete
<a class="nav-tab" id="title-tab" href="#top#title"><?php esc_html_e( 'Title', 'wordpress-seo' ); ?></a>
[110] Fix | Delete
<a class="nav-tab" id="description-tab"
[111] Fix | Delete
href="#top#description"><?php esc_html_e( 'Description', 'wordpress-seo' ); ?></a>
[112] Fix | Delete
</h2>
[113] Fix | Delete
[114] Fix | Delete
<div class="tabwrapper">
[115] Fix | Delete
<?php wpseo_get_rendered_tab( $wpseo_bulk_titles_table, 'title' ); ?>
[116] Fix | Delete
<?php wpseo_get_rendered_tab( $wpseo_bulk_description_table, 'description' ); ?>
[117] Fix | Delete
</div>
[118] Fix | Delete
</div>
[119] Fix | Delete
[120] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function