WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 241 | $id = "popular-$taxonomy-$term->term_id"; |
| 242 | $checked = in_array( $term->term_id, $checked_terms, true ) ? 'checked="checked"' : ''; |
| 243 | ?> |
| 244 | |
| 245 | <li id="<?php echo $id; ?>" class="popular-category"> |
| 246 | <label class="selectit"> |
| 247 | <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> /> |
| 248 | <?php |
| 249 | /** This filter is documented in wp-includes/category-template.php */ |
| 250 | echo esc_html( apply_filters( 'the_category', $term->name, '', '' ) ); |
| 251 | ?> |
| 252 | </label> |
| 253 | </li> |
| 254 | |
| 255 | <?php |
| 256 | } |
| 257 | return $popular_ids; |
| 258 | } |
| 259 | |
| Line | Code |
| 289 | |
| 290 | if ( empty( $categories ) ) { |
| 291 | return; |
| 292 | } |
| 293 | |
| 294 | foreach ( $categories as $category ) { |
| 295 | $cat_id = $category->term_id; |
| 296 | |
| 297 | /** This filter is documented in wp-includes/category-template.php */ |
| 298 | $name = esc_html( apply_filters( 'the_category', $category->name, '', '' ) ); |
| 299 | $checked = in_array( $cat_id, $checked_categories, true ) ? ' checked="checked"' : ''; |
| 300 | echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, '</label></li>'; |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Adds hidden fields with the data for use in the inline editor for posts and pages. |
| 306 | * |
| 307 | * @since 2.7.0 |