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/clone/wp-conte.../plugins/wordpres.../admin/pages
File: tools.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
if ( ! defined( 'WPSEO_VERSION' ) ) {
[7] Fix | Delete
header( 'Status: 403 Forbidden' );
[8] Fix | Delete
header( 'HTTP/1.1 403 Forbidden' );
[9] Fix | Delete
exit();
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
$tool_page = '';
[13] Fix | Delete
[14] Fix | Delete
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
[15] Fix | Delete
if ( isset( $_GET['tool'] ) && is_string( $_GET['tool'] ) ) {
[16] Fix | Delete
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
[17] Fix | Delete
$tool_page = sanitize_text_field( wp_unslash( $_GET['tool'] ) );
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
$yform = Yoast_Form::get_instance();
[21] Fix | Delete
$yform->admin_header( false );
[22] Fix | Delete
[23] Fix | Delete
if ( $tool_page === '' ) {
[24] Fix | Delete
[25] Fix | Delete
$tools = [];
[26] Fix | Delete
[27] Fix | Delete
$tools['import-export'] = [
[28] Fix | Delete
'title' => __( 'Import and Export', 'wordpress-seo' ),
[29] Fix | Delete
'desc' => __( 'Import settings from other SEO plugins and export your settings for re-use on (another) site.', 'wordpress-seo' ),
[30] Fix | Delete
];
[31] Fix | Delete
[32] Fix | Delete
if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) {
[33] Fix | Delete
$tools['file-editor'] = [
[34] Fix | Delete
'title' => __( 'File editor', 'wordpress-seo' ),
[35] Fix | Delete
'desc' => __( 'This tool allows you to quickly change important files for your SEO, like your robots.txt and, if you have one, your .htaccess file.', 'wordpress-seo' ),
[36] Fix | Delete
];
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
$tools['bulk-editor'] = [
[40] Fix | Delete
'title' => __( 'Bulk editor', 'wordpress-seo' ),
[41] Fix | Delete
'desc' => __( 'This tool allows you to quickly change titles and descriptions of your posts and pages without having to go into the editor for each page.', 'wordpress-seo' ),
[42] Fix | Delete
];
[43] Fix | Delete
[44] Fix | Delete
echo '<p>';
[45] Fix | Delete
printf(
[46] Fix | Delete
/* translators: %1$s expands to Yoast SEO */
[47] Fix | Delete
esc_html__( '%1$s comes with some very powerful built-in tools:', 'wordpress-seo' ),
[48] Fix | Delete
'Yoast SEO'
[49] Fix | Delete
);
[50] Fix | Delete
echo '</p>';
[51] Fix | Delete
[52] Fix | Delete
echo '<ul class="ul-disc">';
[53] Fix | Delete
[54] Fix | Delete
$admin_url = admin_url( 'admin.php?page=wpseo_tools' );
[55] Fix | Delete
[56] Fix | Delete
foreach ( $tools as $slug => $tool ) {
[57] Fix | Delete
$href = ( ! empty( $tool['href'] ) ) ? $admin_url . $tool['href'] : add_query_arg( [ 'tool' => $slug ], $admin_url );
[58] Fix | Delete
$attr = ( ! empty( $tool['attr'] ) ) ? $tool['attr'] : '';
[59] Fix | Delete
[60] Fix | Delete
echo '<li>';
[61] Fix | Delete
echo '<strong><a href="', esc_url( $href ), '" ', esc_attr( $attr ), '>', esc_html( $tool['title'] ), '</a></strong><br/>';
[62] Fix | Delete
echo esc_html( $tool['desc'] );
[63] Fix | Delete
echo '</li>';
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* WARNING: This hook is intended for internal use only.
[68] Fix | Delete
* Don't use it in your code as it will be removed shortly.
[69] Fix | Delete
*/
[70] Fix | Delete
do_action( 'wpseo_tools_overview_list_items_internal' );
[71] Fix | Delete
[72] Fix | Delete
echo '</ul>';
[73] Fix | Delete
}
[74] Fix | Delete
else {
[75] Fix | Delete
echo '<a href="', esc_url( admin_url( 'admin.php?page=wpseo_tools' ) ), '">', esc_html__( '&laquo; Back to Tools page', 'wordpress-seo' ), '</a>';
[76] Fix | Delete
[77] Fix | Delete
$tool_pages = [ 'bulk-editor', 'import-export' ];
[78] Fix | Delete
[79] Fix | Delete
if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) {
[80] Fix | Delete
$tool_pages[] = 'file-editor';
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
if ( in_array( $tool_page, $tool_pages, true ) ) {
[84] Fix | Delete
require_once WPSEO_PATH . 'admin/views/tool-' . $tool_page . '.php';
[85] Fix | Delete
}
[86] Fix | Delete
}
[87] Fix | Delete
[88] Fix | Delete
$yform->admin_footer( false );
[89] Fix | Delete
[90] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function