Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the actual root of #32 #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hatsumatsu
Copy link
Contributor

@hatsumatsu hatsumatsu commented Nov 12, 2021

Turns out #32 was caused by having a capability check in the function that registered the field, so the field is not registered for non-admin users:

if (!current_user_can('administrator') || !function_exists('acf_add_options_page') || !function_exists('acf_add_local_field_group')) {

I think it's not necessary there and could rather be tackled in the capabilites field of acf_add_options_sub_page().

Got the hint in
https://support.advancedcustomfields.com/forums/topic/get_field-field-option-return-null-for-non-admin-users/#post-150078

Works fine in my tests.

@hatsumatsu hatsumatsu changed the title fixed the actual root of the bug fixed the actual root of #32 Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant