How do I set $category_id to equal the category_id of the category which was just added, so I can use it in my hook below? Is it something I get from args? Sorry if this sounds like a dumb question.... I know args contains stuff, but just not sure if it has this, and how I get it out of it!
Code:
sub add_category {
# -------------------------------------------------------------------
# This subroutine will get called whenever the hook 'add_category'
# is run. You should call GT::Plugins->action ( STOP ) if you don't
# want the regular code to run, otherwise the code will continue as
# normal.
#
my (@args) = @_;
my $category_id = shift;
#determine directory depth for new category
my $catdepth = &find_depth($category_id);
#update the depth to the categories 'Depth' Column
&update_catdepth ($category_id, $catdepth);
return @args;
}