apply_filters( "option_page_capability_{$option_page}", string $capability )

Filters the capability required when using the Settings API.


By default, the options groups for all registered settings require the manage_options capability.
This filter is required to change the capability required for a certain options page.

Top ↑


$capability string
The capability used for the page, which is manage_options by default.

Top ↑


File: wp-admin/options.php. View all references

$capability = apply_filters( "option_page_capability_{$option_page}", $capability );

Top ↑


Version Description
3.2.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by filatovdanyl

    {$option_page} is actually {$option_group} – option group used as first argument in register_setting() for example. Therefore this filter also works for updating options on pages added via add_management_page, not just add_options_page as “{$option_page}” suggests.

You must log in before being able to contribute a note or feedback.