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
159                 * post URIs and term slugs.
160                 *
161                 * @since 2.6.0
162                 * @since 4.4.0 The `$tag` parameter was added.
163                 *
164                 * @param string          $slug The editable slug. Will be either a term slug or post URI depending
165                 *                              upon the context in which it is evaluated.
166                 * @param WP_Term|WP_Post $tag  Term or post object.
167                 */
168                $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
169                ?>
170                <td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
171                <p class="description"><?php echo $tax->labels->slug_field_description; ?></p></td>
172           </tr>
173 <?php } ?>
174 <?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
175           <tr class="form-field term-parent-wrap">
176                <th scope="row"><label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label></th>
177                <td>