Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: admin_comment_types_dropdown

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
247 <option value="delete"><?php _e('Delete'); ?></option>
248 </select>
249 <input type="submit" name="doaction" id="doaction" value="<?php _e('Apply'); ?>" class="button-secondary apply" />
250 <?php wp_nonce_field('bulk-comments'); ?>
251
252 <?php if ( $comment_status ) echo "<input type='hidden' name='comment_status' value='$comment_status' />\n"; ?>
253 <select name="comment_type">
254      <option value="all"><?php _e('Show all comment types'); ?></option>
255 <?php
256      $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
257           'comment' => __('Comments'),
258           'pings' => __('Pings'),
259      ) );
260
261      foreach ( $comment_types as $type => $label ) {
262           echo "     <option value='$type'";
263           selected( $comment_type, $type );
264           echo ">$label</option>\n";
265      }