This is a feature request / improvement
The storage of options data should be documented to explain to the developer that option keys are prefixed with
This is useful not only to account for character limitations on key names in the database but also should the developer want to retrieve and option using native WordPress functions.
When creating an ACF field belonging to an options page you would expect the key name for that option to be exactly that which you enter when creating the field. For example creating a text field belonging to an options page with a key of
venue_name would imply that value can be grabbed by calling
get_option( 'venue_name' );
Upon saving a value on an options page the key (using the example above) is prepended with
options_. This means to call the actual option you would need to do
get_option( 'options_venue_name' );
Through searching and looking on the documentation I believe:
– This is not documented anywhere
– There appears to be no hook / filter to change this behaviour or prefix
It would be ideal if the above could be added to the documentation, preferably somewhere here: https://www.advancedcustomfields.com/resources/get-values-from-an-options-page/ or https://www.advancedcustomfields.com/resources/options-page/
This occurs in a multisite environment in WordPress 4.7.3 and ACF Pro V 5.5.11 with any type of options page, I believe this to be default behaviour regardless of environment.