Edit File by line
/home/barbar84/www/wp-admin
File: term.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Edit Term Administration Screen.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
* @since 4.5.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
/** WordPress Administration Bootstrap */
[9] Fix | Delete
require_once __DIR__ . '/admin.php';
[10] Fix | Delete
[11] Fix | Delete
if ( empty( $_REQUEST['tag_ID'] ) ) {
[12] Fix | Delete
$sendback = admin_url( 'edit-tags.php' );
[13] Fix | Delete
if ( ! empty( $taxnow ) ) {
[14] Fix | Delete
$sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
if ( 'post' !== get_current_screen()->post_type ) {
[18] Fix | Delete
$sendback = add_query_arg( 'post_type', get_current_screen()->post_type, $sendback );
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
wp_redirect( esc_url_raw( $sendback ) );
[22] Fix | Delete
exit;
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
$tag_ID = absint( $_REQUEST['tag_ID'] );
[26] Fix | Delete
$tag = get_term( $tag_ID, $taxnow, OBJECT, 'edit' );
[27] Fix | Delete
[28] Fix | Delete
if ( ! $tag instanceof WP_Term ) {
[29] Fix | Delete
wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
$tax = get_taxonomy( $tag->taxonomy );
[33] Fix | Delete
$taxonomy = $tax->name;
[34] Fix | Delete
$title = $tax->labels->edit_item;
[35] Fix | Delete
[36] Fix | Delete
if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ), true )
[37] Fix | Delete
|| ! current_user_can( 'edit_term', $tag->term_id )
[38] Fix | Delete
) {
[39] Fix | Delete
wp_die(
[40] Fix | Delete
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
[41] Fix | Delete
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
[42] Fix | Delete
403
[43] Fix | Delete
);
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
$post_type = get_current_screen()->post_type;
[47] Fix | Delete
[48] Fix | Delete
// Default to the first object_type associated with the taxonomy if no post type was passed.
[49] Fix | Delete
if ( empty( $post_type ) ) {
[50] Fix | Delete
$post_type = reset( $tax->object_type );
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
if ( 'post' !== $post_type ) {
[54] Fix | Delete
$parent_file = ( 'attachment' === $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
[55] Fix | Delete
$submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
[56] Fix | Delete
} elseif ( 'link_category' === $taxonomy ) {
[57] Fix | Delete
$parent_file = 'link-manager.php';
[58] Fix | Delete
$submenu_file = 'edit-tags.php?taxonomy=link_category';
[59] Fix | Delete
} else {
[60] Fix | Delete
$parent_file = 'edit.php';
[61] Fix | Delete
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
get_current_screen()->set_screen_reader_content(
[65] Fix | Delete
array(
[66] Fix | Delete
'heading_pagination' => $tax->labels->items_list_navigation,
[67] Fix | Delete
'heading_list' => $tax->labels->items_list,
[68] Fix | Delete
)
[69] Fix | Delete
);
[70] Fix | Delete
wp_enqueue_script( 'admin-tags' );
[71] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-header.php';
[72] Fix | Delete
require ABSPATH . 'wp-admin/edit-tag-form.php';
[73] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-footer.php';
[74] Fix | Delete
[75] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function