Closed remcotolsma closed 1 year ago
Registered setting are added to the $new_allowed_options
array and merged in
https://github.com/WordPress/wordpress-develop/blob/d51ee6ce097fb288aca9da1f95899fc3d77c0fa4/src/wp-includes/option.php#L2430
The advantage of registering the setting is the sanitze callback and adjusting the value via, for example, the /wp-admin/options.php
page.
We had some users with the following notice:
This is already fixed/improved in https://github.com/pronamic/wp-pay-core/commit/4eeb83ae251dff9e33c603e4d8be06817516714d.
Before we could not reproduce this, but i think saving the Pronamic Pay settings page causes this. We register the
pronamic_pay_home_url
setting but have no settings field for this setting.https://github.com/pronamic/wp-pay-core/blob/4eeb83ae251dff9e33c603e4d8be06817516714d/src/HomeUrlController.php#L42-L51
We should check how WordPress handles the saving of registered settings. Should we not register settings that don't have UI settings field?