Hooks and filters
Groups and files
On this page
ugly_field_groups
Filter. The list of groups, after loading them. Change, add or remove groups from code.
add_filter( 'ugly_field_groups', function ( array $groups ) {
// Return the groups you want loaded.
return $groups;
} );ugly_json_paths
Filter. The folders where the JSON files are read. By default, the ugly-json/ of your theme and of its parent theme.
add_filter( 'ugly_json_paths', function ( array $folders ) {
$folders[] = WP_CONTENT_DIR . '/shared/ugly-json';
return $folders;
} );ugly_json_save_path
Filter. The folder where groups are written. By default, the first of the folders above.
add_filter( 'ugly_json_save_path', fn ( $path ) => get_stylesheet_directory() . '/ugly-json' );Did this article answer your question?
Thank you. It helps us make the documentation better. Need more help?