Filters the arguments for the Categories widget.
Parameters
$cat_argsarray- An array of Categories widget options.
$instancearray- Array of settings for the current widget.
Source
wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );
Example migrated from Codex:
To hide some categories create a filter function in your
functions.phpfile and hook it to thewidget_categories_argsfilter. In this function, add the exclude parameter to the arguments list. Currently, in Version 3.3.2, the exclude parameter is not provided, but for future compatibility you should decide how you want to handle an already existing exclude parameter.