To change the capability required to save settings you can use the option_page_capability_{$option_page}
filter, where {$option_page}
is the value passed to settings_field()
on your settings page.
So if you have this on your settings page:
<?php settings_fields( 'wpse_294802_options' ); ?>
You can change the required capability to save with the option_page_capability_wpse_294802_options
filter:
function wpse_294802_option_page_capability() {
return 'edit_pages';
}
add_filter( 'option_page_capability_wpse_294802_options', 'wpse_294802_option_page_capability' );
Now users with the edit_pages
capability can save your settings. Just make sure that you set a matching capability when adding the settings page or the user will be able to save your settings page, but not see it.
PS: submit_button()
isn’t really relevant here, it’s just a function that outputs an <input>
element with the proper classes and text. It doesn’t play a role in determining how or if settings are saved. The important part for that is settings_fields()
.