wphooks.info - admin_comment_types_dropdown

admin_comment_types_dropdown

The hook occurs in the following file:

wp-admin/includes/class-wp-comments-list-table.php:
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
			<select id="filter-by-comment-type" name="comment_type">
				<option value=""><?php _e( 'All comment types' ); ?></option>
<?php
				/**
				 * Filters the comment types dropdown menu.
				 *
				 * @since 2.7.0
				 *
				 * @param array $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
				 */
				$comment_types = apply_filters( 'admin_comment_types_dropdown', array(
					'comment' => __( 'Comments' ),
					'pings' => __( 'Pings' ),
				) );

				foreach ( $comment_types as $type => $label )
					echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
			?>
			</select>
<?php