admin_comment_types_dropdown
Filters the comment types dropdown menu.
Description
Parameters (1)
- 0. $array — Optional. (callback) =>
array( 'comment' => __( 'Comments' ), 'pings' => __( 'Pings' ), )
- An array of comment types. Accepts Comments,, Pings..
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'admin_comment_types_dropdown', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the admin_comment_types_dropdown callback
- function filter_admin_comment_types_dropdown( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'admin_comment_types_dropdown', 'filter_admin_comment_types_dropdown', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'admin_comment_types_dropdown', 'filter_admin_comment_types_dropdown', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/class-wp-comments-list-table.php
- $comment_types = apply_filters( 'admin_comment_types_dropdown', array(