Filter
rpress_addon_category_args
On this page
Filters the arguments used to register the add-on group taxonomy.
Runs while the menu taxonomies are registered on init, immediately before register_taxonomy() for the add-on group taxonomy (addon_category). The defaults are hierarchical, show_ui, query_var 'addon_category', a rewrite slug built from the menu item slug plus '/category', and capabilities mapped to the product term capabilities. The labels have already passed through rpress_addon_category_labels.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$category_args | array | Arguments for register_taxonomy(). |
Return value#
array. The registration arguments.
Example#
add_filter( 'rpress_addon_category_args', 'my_addon_category_args', 10, 1 );
function my_addon_category_args( $category_args ) {
$category_args['show_in_rest'] = true;
return $category_args;
}
Source#
Applied in:
includes/post-types.php(line 225), inrpress_setup_fooditem_taxonomies()
See also#
Was this page helpful?
