Skip to content
Custom fields for WordPress that are quick to build and quick to load. Get Pro
Docs

Hooks and filters

Who can do what

1 minute to read Updated 1 week ago

ugly_fields_capability

Filter. The capability needed to open UglyFields and build groups, blocks and options pages. The default is the one chosen in Settings → General.

PHP
add_filter( 'ugly_fields_capability', fn () => 'manage_options' );

ugly_options_capability

Filter. The capability needed to use options pages, unless a page has its own rule.

PHP
add_filter( 'ugly_options_capability', fn () => 'edit_others_pages' );

Did this article answer your question?