tag_row_actions
Filters the action links displayed for each term in the Tags list table.
Description
Parameters (2)
- 0. $actions (array)
- An array of action links to be displayed. Default Edit,, Quick Edit., Delete, and View.
- 1. $tag (WP_Term)
- Term object.
Usage
- To run the hook, copy the example below.
- $actions = apply_filters( 'tag_row_actions', $actions, $tag );
- if ( !empty( $actions ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the tag_row_actions callback
- function filter_tag_row_actions( $actions, $tag ) {
- // make filter magic happen here...
- return $actions;
- };
- // add the filter
- add_filter( 'tag_row_actions', 'filter_tag_row_actions', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'tag_row_actions', 'filter_tag_row_actions', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/class-wp-terms-list-table.php
- $actions = apply_filters( 'tag_row_actions', $actions, $tag );