X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/80b7979fccf09a75af3f4c111fa27060ae6dbf85..refs/tags/wordpress-3.7-scripts:/wp-admin/edit-tags.php diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 44b2aa57..0a046370 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! $taxnow ) wp_die( __( 'Invalid taxonomy' ) ); @@ -26,7 +26,7 @@ $pagenum = $wp_list_table->get_pagenum(); $title = $tax->labels->name; if ( 'post' != $post_type ) { - $parent_file = "edit.php?post_type=$post_type"; + $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type"; $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; } else if ( 'link_category' == $tax->name ) { $parent_file = 'link-manager.php'; @@ -36,7 +36,7 @@ if ( 'post' != $post_type ) { $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; } -add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') ); +add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); switch ( $wp_list_table->current_action() ) { @@ -126,8 +126,8 @@ case 'edit': $tag = get_term( $tag_ID, $taxonomy, OBJECT, 'edit' ); if ( ! $tag ) wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); - require_once ( 'admin-header.php' ); - include( './edit-tag-form.php' ); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); + include( ABSPATH . 'wp-admin/edit-tag-form.php' ); break; @@ -164,7 +164,7 @@ break; default: if ( ! empty($_REQUEST['_wp_http_referer']) ) { - $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ); + $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ); if ( ! empty( $_REQUEST['paged'] ) ) $location = add_query_arg( 'paged', (int) $_REQUEST['paged'] ); @@ -195,7 +195,7 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t $help = '
' . __( 'You can assign keywords to your posts using tags. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.' ) . '
'; if ( 'link_category' == $taxonomy ) - $help .= '' . __( 'You can delete Link Categories in the Bulk Action pulldown, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '
'; + $help .= '' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '
'; else $help .='' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '
'; @@ -218,7 +218,7 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t $help .= 'tag to category converter'), 'import.php') ;?>.
+tag to category converter.'), 'import.php') ;?>