X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..e0feb3b2e5b436a06bbb04fbc838d1cd6ec95399:/wp-admin/edit-tags.php diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index e0cd746e..db8319cd 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -20,6 +20,13 @@ if ( ! $tax ) if ( ! current_user_can( $tax->cap->manage_terms ) ) wp_die( __( 'Cheatin’ uh?' ), 403 ); +/** + * $post_type is set when the WP_Terms_List_Table instance is created + * + * @global string $post_type + */ +global $post_type; + $wp_list_table = _get_list_table('WP_Terms_List_Table'); $pagenum = $wp_list_table->get_pagenum(); @@ -28,7 +35,7 @@ $title = $tax->labels->name; if ( 'post' != $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 ) { +} elseif ( 'link_category' == $tax->name ) { $parent_file = 'link-manager.php'; $submenu_file = 'edit-tags.php?taxonomy=link_category'; } else { @@ -36,7 +43,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( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); $location = false; @@ -62,7 +69,7 @@ case 'add-tag': if ( $ret && !is_wp_error( $ret ) ) $location = add_query_arg( 'message', 1, $location ); else - $location = add_query_arg( 'message', 4, $location ); + $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location ); break; @@ -153,7 +160,7 @@ case 'editedtag': if ( $ret && !is_wp_error( $ret ) ) $location = add_query_arg( 'message', 3, $location ); else - $location = add_query_arg( 'message', 5, $location ); + $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location ); break; } @@ -230,11 +237,11 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t $help = '

' . __( 'For more information:' ) . '

'; if ( 'category' == $taxonomy ) - $help .= '

' . __( 'Documentation on Categories' ) . '

'; + $help .= '

' . __( 'Documentation on Categories' ) . '

'; elseif ( 'link_category' == $taxonomy ) - $help .= '

' . __( 'Documentation on Link Categories' ) . '

'; + $help .= '

' . __( 'Documentation on Link Categories' ) . '

'; else - $help .= '

' . __( 'Documentation on Tags' ) . '

'; + $help .= '

' . __( 'Documentation on Tags' ) . '

'; $help .= '

' . __('Support Forums') . '

'; @@ -294,21 +301,29 @@ if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) { $message = $messages['_item'][ $msg ]; } +$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated'; + +if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) { + $import_link = admin_url( 'admin.php?import=wpcat2tag' ); +} else { + $import_link = admin_url( 'import.php' ); +} + ?>
-

' . __('Search results for “%s”') . '', esc_html( wp_unslash($_REQUEST['s']) ) ); ?> -

+ -

- notice is-dismissible">

+
-
+ @@ -321,7 +336,7 @@ endif; ?>
- + @@ -339,12 +354,12 @@ endif; ?> ?>

-

category to tag converter.'), 'import.php') ?>

+

category to tag converter.' ), esc_url( $import_link ) ) ?>

-

tag to category converter.'), 'import.php') ;?>

+

tag to category converter.' ), esc_url( $import_link ) ) ;?>

@@ -520,7 +538,7 @@ if ( ! is_taxonomy_hierarchical( $taxonomy ) ) { } /** - * Fires after the Add Term form fields for hierarchical taxonomies. + * Fires after the Add Term form fields. * * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. *