Skip to content

fixed the actual root of #32 - #34

Open
hatsumatsu wants to merge 1 commit into
ttillberg:masterfrom
hatsumatsu:fix-non-admin-user-roles
Open

fixed the actual root of #32#34
hatsumatsu wants to merge 1 commit into
ttillberg:masterfrom
hatsumatsu:fix-non-admin-user-roles

Conversation

@hatsumatsu

@hatsumatsu hatsumatsu commented Nov 12, 2021

Copy link
Copy Markdown
Contributor

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.

1 participant