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
254 <?php endif; ?>
255 <option value="delete"><?php _e('Delete'); ?></option>
256 </select>
257 <input type="submit" name="doaction" id="doaction" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" />
258 <?php wp_nonce_field('bulk-comments'); ?>
259
260 <select name="comment_type">
261      <option value="all"><?php _e('Show all comment types'); ?></option>
262 <?php
263      $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
264           'comment' => __('Comments'),
265           'pings' => __('Pings'),
266      ) );
267
268      foreach ( $comment_types as $type => $label ) {
269           echo "     <option value='" . esc_attr($type) . "'";
270           selected( $comment_type, $type );
271           echo ">$label</option>\n";
272      }