admin_comment_types_dropdown filter-hookWP 2.7.0

Filters the comment types shown in the drop-down menu on the Comments list table.

Usage

add_filter( 'admin_comment_types_dropdown', 'wp_kama_admin_comment_types_dropdown_filter' );

/**
 * Function for `admin_comment_types_dropdown` filter-hook.
 * 
 * @param string[] $comment_types Array of comment type labels keyed by their name.
 *
 * @return string[]
 */
function wp_kama_admin_comment_types_dropdown_filter( $comment_types ){

	// filter...
	return $comment_types;
}
$comment_types(string[])
Array of comment type labels keyed by their name.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

WP_Comments_List_Table::comment_type_dropdown()
admin_comment_types_dropdown
wp-admin/includes/class-wp-comments-list-table.php 501-507
$comment_types = apply_filters(
	'admin_comment_types_dropdown',
	array(
		'comment' => __( 'Comments' ),
		'pings'   => __( 'Pings' ),
	)
);

Where the hook is used in WordPress

Usage not found.