WordPress.org

Make WordPress Core

Ticket #15346: edit-tags.patch

File edit-tags.patch, 5.7 KB (added by dougwrites, 4 years ago)
  • wp-admin/edit-tags.php

     
    158158if ( current_user_can($tax->cap->edit_terms) ) 
    159159        wp_enqueue_script('inline-edit-tax'); 
    160160 
    161 if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) { 
     161if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) { 
    162162        if ( 'category' == $taxonomy ) 
    163163                $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>'; 
     164        elseif ( 'link_category' == $taxonomy )  
     165                $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>'; 
    164166        else 
    165                 $help = '<p>' . __('You can assign keywords to your posts using Post Tags. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.') . '</p>'; 
     167                $help = '<p>' . __('You can assign keywords to your posts using Post Tags. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.') . '</p>';                 
    166168 
    167         $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>'; 
     169        if ( 'category' == $taxonomy ) 
     170                $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>'; 
     171        elseif ( 'link_category' == $taxonomy )  
     172                $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. 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.') . '</p>'; 
     173        else 
     174                $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>'; 
    168175 
    169176        if ( 'category' == $taxonomy ) 
    170177                $help .= '<p>' . __('When adding a new category on this screen, you&#8217;ll fill in the following fields:') . '</p>'; 
    171         else 
     178        elseif ( 'post_tag' == $taxonomy )  
    172179                $help .= '<p>' . __('When adding a new tag on this screen, you&#8217;ll fill in the following fields:') . '</p>'; 
    173180 
    174         $help .= '<ul>' . 
     181        if ( 'category' == $taxonomy || 'post_tag' == $taxonomy  ) 
     182 
     183                $help .= '<ul>' . 
    175184                '<li>' . __('<strong>Name</strong> - The name is how it appears on your site.') . '</li>'; 
    176         if ( ! global_terms_enabled() ) 
     185         
     186        if ( ! global_terms_enabled()  ) 
     187        if ( 'category' == $taxonomy || 'post_tag' == $taxonomy  ) 
    177188                $help .= '<li>' . __('<strong>Slug</strong> - 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>'; 
    178189 
    179190        if ( 'category' == $taxonomy ) 
    180191                $help .= '<li>' . __('<strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.') . '</li>'; 
    181192 
    182         $help .= '<li>' . __('<strong>Description</strong> - The description is not prominent by default; however, some themes may display it.') . '</li>' . 
     193        if ( 'category' == $taxonomy || 'post_tag' == $taxonomy  ) 
     194                $help .= '<li>' . __('<strong>Description</strong> - The description is not prominent by default; however, some themes may display it.') . '</li>' . 
    183195                '</ul>' . 
    184196                '<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>' . 
    185197                '<p><strong>' . __('For more information:') . '</strong></p>'; 
    186198 
    187199        if ( 'category' == $taxonomy ) 
    188                 $help .= '<p>' . __('<a href="http://codex.wordpress.org/Manage_Categories_SubPanel" target="_blank">Categories Documentation</a>') . '</p>'; 
     200                $help .= '<p>' . __('<a href="http://codex.wordpress.org/Manage_Categories_SubPanel" target="_blank">Documentation on Categories </a>') . '</p>'; 
     201        elseif ( 'link_category' == $taxonomy ) 
     202                $help .= '<p>' . __('<a href="http://codex.wordpress.org/Links_Link_Categories_SubPanel" target="_blank">Documentation on Link Categories </a>') . '</p>'; 
    189203        else 
    190                 $help .= '<p>' . __('<a href="http://codex.wordpress.org/Post_Tags_SubPanel" target="_blank">Tags Documentation</a>') . '</p>'; 
     204                $help .= '<p>' . __('<a href="http://codex.wordpress.org/Post_Tags_SubPanel" target="_blank">Documentation on Post Tags </a>') . '</p>'; 
    191205 
    192206        $help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'; 
    193207