wphooks.info - admin_comment_types_dropdown

admin_comment_types_dropdown

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-admin/includes/class-wp-comments-list-table.php:
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
			<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