Edit File by line
/home/barbar84/www/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 = (string) filter_input( INPUT_GET, 'tool' );
[13] Fix | Delete
[14] Fix | Delete
$yform = Yoast_Form::get_instance();
[15] Fix | Delete
$yform->admin_header( false );
[16] Fix | Delete
[17] Fix | Delete
if ( $tool_page === '' ) {
[18] Fix | Delete
[19] Fix | Delete
$tools = [];
[20] Fix | Delete
[21] Fix | Delete
$tools['import-export'] = [
[22] Fix | Delete
'title' => __( 'Import and Export', 'wordpress-seo' ),
[23] Fix | Delete
'desc' => __( 'Import settings from other SEO plugins and export your settings for re-use on (another) blog.', 'wordpress-seo' ),
[24] Fix | Delete
];
[25] Fix | Delete
[26] Fix | Delete
if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) {
[27] Fix | Delete
$tools['file-editor'] = [
[28] Fix | Delete
'title' => __( 'File editor', 'wordpress-seo' ),
[29] 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' ),
[30] Fix | Delete
];
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
$tools['bulk-editor'] = [
[34] Fix | Delete
'title' => __( 'Bulk editor', 'wordpress-seo' ),
[35] 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' ),
[36] Fix | Delete
];
[37] Fix | Delete
[38] Fix | Delete
echo '<p>';
[39] Fix | Delete
printf(
[40] Fix | Delete
/* translators: %1$s expands to Yoast SEO */
[41] Fix | Delete
esc_html__( '%1$s comes with some very powerful built-in tools:', 'wordpress-seo' ),
[42] Fix | Delete
'Yoast SEO'
[43] Fix | Delete
);
[44] Fix | Delete
echo '</p>';
[45] Fix | Delete
[46] Fix | Delete
echo '<ul class="ul-disc">';
[47] Fix | Delete
[48] Fix | Delete
$admin_url = admin_url( 'admin.php?page=wpseo_tools' );
[49] Fix | Delete
[50] Fix | Delete
foreach ( $tools as $slug => $tool ) {
[51] Fix | Delete
$href = ( ! empty( $tool['href'] ) ) ? $admin_url . $tool['href'] : add_query_arg( [ 'tool' => $slug ], $admin_url );
[52] Fix | Delete
$attr = ( ! empty( $tool['attr'] ) ) ? $tool['attr'] : '';
[53] Fix | Delete
[54] Fix | Delete
echo '<li>';
[55] Fix | Delete
echo '<strong><a href="', esc_url( $href ), '" ', esc_attr( $attr ), '>', esc_html( $tool['title'] ), '</a></strong><br/>';
[56] Fix | Delete
echo esc_html( $tool['desc'] );
[57] Fix | Delete
echo '</li>';
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
/**
[61] Fix | Delete
* Action: 'wpseo_tools_overview_list_items' - Hook to add additional tools to the overview.
[62] Fix | Delete
*/
[63] Fix | Delete
do_action( 'wpseo_tools_overview_list_items' );
[64] Fix | Delete
[65] Fix | Delete
echo '</ul>';
[66] Fix | Delete
}
[67] Fix | Delete
else {
[68] Fix | Delete
echo '<a href="', esc_url( admin_url( 'admin.php?page=wpseo_tools' ) ), '">', esc_html__( '&laquo; Back to Tools page', 'wordpress-seo' ), '</a>';
[69] Fix | Delete
[70] Fix | Delete
$tool_pages = [ 'bulk-editor', 'import-export' ];
[71] Fix | Delete
[72] Fix | Delete
if ( WPSEO_Utils::allow_system_file_edit() === true && ! is_multisite() ) {
[73] Fix | Delete
$tool_pages[] = 'file-editor';
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
if ( in_array( $tool_page, $tool_pages, true ) ) {
[77] Fix | Delete
require_once WPSEO_PATH . 'admin/views/tool-' . $tool_page . '.php';
[78] Fix | Delete
}
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
$yform->admin_footer( false );
[82] Fix | Delete
[83] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function