List Category ID in Quick Actions

One thing I’ve found frustrating is that there doesn’t seem to be an easy way of getting a category (or other term) ID. This little snippet will add it to the “quick actions” that appear when you mouseover a term’s row.

add_filter( "tag_row_actions", 'add_cat_id_to_quick_edit', 10, 2 );
function add_cat_id_to_quick_edit( $actions, $tag ) {
	$actions['cat_id'] = 'ID: '.$tag->term_id;
	return $actions;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: