Open florentsorel opened 9 years ago
Hi !
Well it could be tricky. The class needs to apply the settings before admin_init
. Have you tried during wp_loaded
?
I don't have time to run tests right now, but maybe we could also do with a priority argument here : https://github.com/WebMaestroFr/wm-settings/blob/master/wm-settings.php#L47 ...
Hi,
Thx for the great class :). It's help a lot with plugin developpement.
It's possible to use create_settings_page in a admin_init hook ? If I try to use create_settings_page in admin_init, no options are created.
If I try : ($this->roles is empty when the constructor is called in create_settings_page function. And I need admin_init to use get_editable_roles function otherwise a fatal error is throw : Call to undefined function get_editable_roles())