WordPress.org

Make WordPress Core

Ticket #7701: 7701-edit-category-form.php.diff

File 7701-edit-category-form.php.diff, 1017 bytes (added by mtekk, 5 years ago)

A better version, still not 100% working

  • edit-category-form.php

     
    6060                <tr class="form-field"> 
    6161                        <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th> 
    6262                        <td> 
    63                                 <?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br /> 
     63                                <?php wp_dropdown_categories(array('exclude_tree' => $cat_ID, 'hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br /> 
    6464                <?php _e('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.'); ?> 
    6565                        </td> 
    6666                </tr>