WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (2 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r42228 r42343  
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( ! $taxnow )
     12if ( ! $taxnow ) {
    1313    wp_die( __( 'Invalid taxonomy.' ) );
     14}
    1415
    1516$tax = get_taxonomy( $taxnow );
    1617
    17 if ( ! $tax )
     18if ( ! $tax ) {
    1819    wp_die( __( 'Invalid taxonomy.' ) );
     20}
    1921
    2022if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
     
    3739global $post_type;
    3840
    39 $wp_list_table = _get_list_table('WP_Terms_List_Table');
    40 $pagenum = $wp_list_table->get_pagenum();
     41$wp_list_table = _get_list_table( 'WP_Terms_List_Table' );
     42$pagenum       = $wp_list_table->get_pagenum();
    4143
    4244$title = $tax->labels->name;
    4345
    4446if ( 'post' != $post_type ) {
    45     $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
     47    $parent_file  = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
    4648    $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type";
    4749} elseif ( 'link_category' == $tax->name ) {
    48     $parent_file = 'link-manager.php';
     50    $parent_file  = 'link-manager.php';
    4951    $submenu_file = 'edit-tags.php?taxonomy=link_category';
    5052} else {
    51     $parent_file = 'edit.php';
     53    $parent_file  = 'edit.php';
    5254    $submenu_file = "edit-tags.php?taxonomy=$taxonomy";
    5355}
    5456
    55 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
    56 
    57 get_current_screen()->set_screen_reader_content( array(
    58     'heading_pagination' => $tax->labels->items_list_navigation,
    59     'heading_list'       => $tax->labels->items_list,
    60 ) );
     57add_screen_option(
     58    'per_page', array(
     59        'default' => 20,
     60        'option'  => 'edit_' . $tax->name . '_per_page',
     61    )
     62);
     63
     64get_current_screen()->set_screen_reader_content(
     65    array(
     66        'heading_pagination' => $tax->labels->items_list_navigation,
     67        'heading_list'       => $tax->labels->items_list,
     68    )
     69);
    6170
    6271$location = false;
    63 $referer = wp_get_referer();
     72$referer  = wp_get_referer();
    6473if ( ! $referer ) { // For POST requests.
    6574    $referer = wp_unslash( $_SERVER['REQUEST_URI'] );
     
    6877switch ( $wp_list_table->current_action() ) {
    6978
    70 case 'add-tag':
    71     check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
    72 
    73     if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    74         wp_die(
    75             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    76             '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
    77             403
    78         );
    79     }
    80 
    81     $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
    82     if ( $ret && !is_wp_error( $ret ) )
    83         $location = add_query_arg( 'message', 1, $referer );
    84     else
    85         $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer );
    86 
    87     break;
    88 
    89 case 'delete':
    90     if ( ! isset( $_REQUEST['tag_ID'] ) ) {
     79    case 'add-tag':
     80        check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
     81
     82        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
     83            wp_die(
     84                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     85                '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
     86                403
     87            );
     88        }
     89
     90        $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
     91        if ( $ret && ! is_wp_error( $ret ) ) {
     92            $location = add_query_arg( 'message', 1, $referer );
     93        } else {
     94            $location = add_query_arg(
     95                array(
     96                    'error'   => true,
     97                    'message' => 4,
     98                ), $referer
     99            );
     100        }
     101
    91102        break;
    92     }
    93 
    94     $tag_ID = (int) $_REQUEST['tag_ID'];
    95     check_admin_referer( 'delete-tag_' . $tag_ID );
    96 
    97     if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
    98         wp_die(
    99             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    100             '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    101             403
    102         );
    103     }
    104 
    105     wp_delete_term( $tag_ID, $taxonomy );
    106 
    107     $location = add_query_arg( 'message', 2, $referer );
    108 
    109     // When deleting a term, prevent the action from redirecting back to a term that no longer exists.
    110     $location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
    111 
    112     break;
    113 
    114 case 'bulk-delete':
    115     check_admin_referer( 'bulk-tags' );
    116 
    117     if ( ! current_user_can( $tax->cap->delete_terms ) ) {
    118         wp_die(
    119             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    120             '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    121             403
    122         );
    123     }
    124 
    125     $tags = (array) $_REQUEST['delete_tags'];
    126     foreach ( $tags as $tag_ID ) {
     103
     104    case 'delete':
     105        if ( ! isset( $_REQUEST['tag_ID'] ) ) {
     106            break;
     107        }
     108
     109        $tag_ID = (int) $_REQUEST['tag_ID'];
     110        check_admin_referer( 'delete-tag_' . $tag_ID );
     111
     112        if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
     113            wp_die(
     114                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     115                '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
     116                403
     117            );
     118        }
     119
    127120        wp_delete_term( $tag_ID, $taxonomy );
    128     }
    129 
    130     $location = add_query_arg( 'message', 6, $referer );
    131 
    132     break;
    133 
    134 case 'edit':
    135     if ( ! isset( $_REQUEST['tag_ID'] ) ) {
     121
     122        $location = add_query_arg( 'message', 2, $referer );
     123
     124        // When deleting a term, prevent the action from redirecting back to a term that no longer exists.
     125        $location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
     126
    136127        break;
    137     }
    138 
    139     $term_id = (int) $_REQUEST['tag_ID'];
    140     $term    = get_term( $term_id );
    141 
    142     if ( ! $term instanceof WP_Term ) {
    143         wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
    144     }
    145 
    146     wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
    147     exit;
    148 
    149 case 'editedtag':
    150     $tag_ID = (int) $_POST['tag_ID'];
    151     check_admin_referer( 'update-tag_' . $tag_ID );
    152 
    153     if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
    154         wp_die(
    155             '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    156             '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    157             403
    158         );
    159     }
    160 
    161     $tag = get_term( $tag_ID, $taxonomy );
    162     if ( ! $tag )
    163         wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
    164 
    165     $ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
    166 
    167     if ( $ret && ! is_wp_error( $ret ) ) {
    168         $location = add_query_arg( 'message', 3, $referer );
    169     } else {
    170         $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $referer );
    171     }
    172     break;
    173 default:
    174     if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
     128
     129    case 'bulk-delete':
     130        check_admin_referer( 'bulk-tags' );
     131
     132        if ( ! current_user_can( $tax->cap->delete_terms ) ) {
     133            wp_die(
     134                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     135                '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
     136                403
     137            );
     138        }
     139
     140        $tags = (array) $_REQUEST['delete_tags'];
     141        foreach ( $tags as $tag_ID ) {
     142            wp_delete_term( $tag_ID, $taxonomy );
     143        }
     144
     145        $location = add_query_arg( 'message', 6, $referer );
     146
    175147        break;
    176     }
    177     check_admin_referer( 'bulk-tags' );
    178     $tags = (array) $_REQUEST['delete_tags'];
    179     /** This action is documented in wp-admin/edit-comments.php */
    180     $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags );
    181     break;
     148
     149    case 'edit':
     150        if ( ! isset( $_REQUEST['tag_ID'] ) ) {
     151            break;
     152        }
     153
     154        $term_id = (int) $_REQUEST['tag_ID'];
     155        $term    = get_term( $term_id );
     156
     157        if ( ! $term instanceof WP_Term ) {
     158            wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
     159        }
     160
     161        wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
     162        exit;
     163
     164    case 'editedtag':
     165        $tag_ID = (int) $_POST['tag_ID'];
     166        check_admin_referer( 'update-tag_' . $tag_ID );
     167
     168        if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
     169            wp_die(
     170                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     171                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
     172                403
     173            );
     174        }
     175
     176        $tag = get_term( $tag_ID, $taxonomy );
     177        if ( ! $tag ) {
     178            wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
     179        }
     180
     181        $ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
     182
     183        if ( $ret && ! is_wp_error( $ret ) ) {
     184            $location = add_query_arg( 'message', 3, $referer );
     185        } else {
     186            $location = add_query_arg(
     187                array(
     188                    'error'   => true,
     189                    'message' => 5,
     190                ), $referer
     191            );
     192        }
     193        break;
     194    default:
     195        if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
     196            break;
     197        }
     198        check_admin_referer( 'bulk-tags' );
     199        $tags = (array) $_REQUEST['delete_tags'];
     200        /** This action is documented in wp-admin/edit-comments.php */
     201        $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags );
     202        break;
    182203}
    183204
     
    211232}
    212233
    213 wp_enqueue_script('admin-tags');
    214 if ( current_user_can($tax->cap->edit_terms) )
    215     wp_enqueue_script('inline-edit-tax');
    216 
    217 if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy  ) {
    218     $help ='';
    219     if ( 'category' == $taxonomy )
    220         $help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
    221     elseif ( 'link_category' == $taxonomy )
     234wp_enqueue_script( 'admin-tags' );
     235if ( current_user_can( $tax->cap->edit_terms ) ) {
     236    wp_enqueue_script( 'inline-edit-tax' );
     237}
     238
     239if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) {
     240    $help = '';
     241    if ( 'category' == $taxonomy ) {
     242        $help = '<p>' . sprintf( __( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ), 'options-writing.php' ) . '</p>';
     243    } elseif ( 'link_category' == $taxonomy ) {
    222244        $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
    223     else
     245    } else {
    224246        $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
    225 
    226     if ( 'link_category' == $taxonomy )
     247    }
     248
     249    if ( 'link_category' == $taxonomy ) {
    227250        $help .= '<p>' . __( '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.' ) . '</p>';
    228     else
    229         $help .='<p>' . __( 'What&#8217;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.' ) . '</p>';
    230 
    231     get_current_screen()->add_help_tab( array(
    232         'id'      => 'overview',
    233         'title'   => __('Overview'),
    234         'content' => $help,
    235     ) );
     251    } else {
     252        $help .= '<p>' . __( 'What&#8217;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.' ) . '</p>';
     253    }
     254
     255    get_current_screen()->add_help_tab(
     256        array(
     257            'id'      => 'overview',
     258            'title'   => __( 'Overview' ),
     259            'content' => $help,
     260        )
     261    );
    236262
    237263    if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) {
    238         if ( 'category' == $taxonomy )
     264        if ( 'category' == $taxonomy ) {
    239265            $help = '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
    240         else
     266        } else {
    241267            $help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
     268        }
    242269
    243270        $help .= '<ul>' .
    244271        '<li>' . __( '<strong>Name</strong> &mdash; The name is how it appears on your site.' ) . '</li>';
    245272
    246         if ( ! global_terms_enabled() )
     273        if ( ! global_terms_enabled() ) {
    247274            $help .= '<li>' . __( '<strong>Slug</strong> &mdash; The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
    248 
    249         if ( 'category' == $taxonomy )
     275        }
     276
     277        if ( 'category' == $taxonomy ) {
    250278            $help .= '<li>' . __( '<strong>Parent</strong> &mdash; Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
     279        }
    251280
    252281        $help .= '<li>' . __( '<strong>Description</strong> &mdash; The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
     
    254283        '<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>';
    255284
    256         get_current_screen()->add_help_tab( array(
    257             'id'      => 'adding-terms',
    258             'title'   => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
    259             'content' => $help,
    260         ) );
     285        get_current_screen()->add_help_tab(
     286            array(
     287                'id'      => 'adding-terms',
     288                'title'   => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
     289                'content' => $help,
     290            )
     291        );
    261292    }
    262293
    263294    $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
    264295
    265     if ( 'category' == $taxonomy )
     296    if ( 'category' == $taxonomy ) {
    266297        $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen">Documentation on Categories</a>' ) . '</p>';
    267     elseif ( 'link_category' == $taxonomy )
     298    } elseif ( 'link_category' == $taxonomy ) {
    268299        $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>';
    269     else
     300    } else {
    270301        $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen">Documentation on Tags</a>' ) . '</p>';
    271 
    272     $help .= '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>';
     302    }
     303
     304    $help .= '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>';
    273305
    274306    get_current_screen()->set_help_sidebar( $help );
     
    306338<?php if ( $message ) : ?>
    307339<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
    308 <?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
    309 endif; ?>
     340<?php
     341$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
     342endif;
     343?>
    310344<div id="ajax-response"></div>
    311345
    312346<form class="search-form wp-clearfix" method="get">
    313 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    314 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
     347<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
     348<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
    315349
    316350<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
     
    325359<?php
    326360
    327 if ( current_user_can($tax->cap->edit_terms) ) {
     361if ( current_user_can( $tax->cap->edit_terms ) ) {
    328362    if ( 'category' == $taxonomy ) {
    329363        /**
    330          * Fires before the Add Category form.
     364         * Fires before the Add Category form.
    331365         *
    332366         * @since 2.1.0
     
    372406<div class="form-wrap">
    373407<h2><?php echo $tax->labels->add_new_item; ?></h2>
    374 <form id="addtag" method="post" action="edit-tags.php" class="validate"<?php
     408<form id="addtag" method="post" action="edit-tags.php" class="validate"
     409<?php
    375410/**
    376411 * Fires inside the Add Tag form tag.
     
    381416 */
    382417do_action( "{$taxonomy}_term_new_form_tag" );
    383 ?>>
     418?>
     419>
    384420<input type="hidden" name="action" value="add-tag" />
    385 <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
    386 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    387 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
    388 <?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?>
     421<input type="hidden" name="screen" value="<?php echo esc_attr( $current_screen->id ); ?>" />
     422<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
     423<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
     424<?php wp_nonce_field( 'add-tag', '_wpnonce_add-tag' ); ?>
    389425
    390426<div class="form-field form-required term-name-wrap">
    391427    <label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
    392428    <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
    393     <p><?php _e('The name is how it appears on your site.'); ?></p>
     429    <p><?php _e( 'The name is how it appears on your site.' ); ?></p>
    394430</div>
    395431<?php if ( ! global_terms_enabled() ) : ?>
     
    397433    <label for="tag-slug"><?php _e( 'Slug' ); ?></label>
    398434    <input name="slug" id="tag-slug" type="text" value="" size="40" />
    399     <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
     435    <p><?php _e( 'The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p>
    400436</div>
    401437<?php endif; // global_terms_enabled() ?>
    402 <?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
     438<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
    403439<div class="form-field term-parent-wrap">
    404440    <label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label>
     
    449485    <label for="tag-description"><?php _e( 'Description' ); ?></label>
    450486    <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
    451     <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
     487    <p><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p>
    452488</div>
    453489
     
    548584        __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
    549585        /** This filter is documented in wp-includes/category-template.php */
    550         '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ), '', '' ) . '</strong>'
     586        '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category' ) ), '', '' ) . '</strong>'
    551587    );
    552588    ?>
    553589</p>
    554590<?php if ( current_user_can( 'import' ) ) : ?>
    555 <p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
     591<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ); ?></p>
    556592<?php endif; ?>
    557593</div>
    558594<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
    559595<div class="form-wrap edit-term-notes">
    560 <p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
    561 </div>
    562 <?php endif;
     596<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ); ?></p>
     597</div>
     598<?php
     599endif;
    563600
    564601/**
Note: See TracChangeset for help on using the changeset viewer.