Filter
rpress_get_addons_args
On this page
Filters the get_terms arguments used to query add-on groups.
Runs in rpress_get_addons before get_terms is called. The default arguments query the addon_category taxonomy ordered by name, restricted to the given parent term and including empty terms. Modify the array to change ordering or to hide empty groups.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$addons_args | array | Arguments for get_terms: taxonomy, orderby, parent and hide_empty. |
Return value#
array. The get_terms arguments.
Example#
function my_get_addons_args( $addons_args ) {
$addons_args['hide_empty'] = true;
$addons_args['orderby'] = 'term_id';
return $addons_args;
}
add_filter( 'rpress_get_addons_args', 'my_get_addons_args', 10, 1 );
Source#
Applied in:
includes/fooditem-functions.php(line 750), inrpress_get_addons()
See also#
Was this page helpful?
