Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: editable_slug

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
48 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-category_' . $cat_ID); ?>
49      <table class="form-table">
50           <tr class="form-field form-required">
51                <th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
52                <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /><br />
53             <span class="description"><?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></span></td>
54           </tr>
55           <tr class="form-field">
56                <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
57                <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo esc_attr(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br />
58             <span class="description"><?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.'); ?></span></td>
59           </tr>
60           <tr class="form-field">
61                <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
62                <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 />
64                 <span class="description"><?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.'); ?></span>
65                  </td>
66           </tr>