row actions – {$taxonomy}_row_actions for all custom taxonomies
Question
I want to add a row action to ALL custom taxonomies. This is for use in a plugin so I want this to apply to whatever taxonomies exist rather than adding a filter for each taxonomy manually like below. I can’t figure out a simple way to do this.
add_filter( 'category_row_actions', 'category_row_actions', 10, 2 );
in progress
0
11 months
2022-03-04T01:41:51-05:00
2022-03-04T01:41:51-05:00 0 Answer
0 views
0
Answer ( 1 )
You could use the
tag_row_actions
hook (which was deprecated in WP v3.0.0, but then restored in WP v5.4.2) to target any taxonomies (Tags/post_tag
, Categories/category
,a_custom_taxonomy
, etc.), so just replace thecategory_row_actions
withtag_row_actions
:add_filter( 'tag_row_actions', 'category_row_actions', 10, 2 );