I just wrote a plugin to solve some of this without hacking the core. Please see:
This allows you to create network options pages with the same ACF API, you just need to add a
network attribute to the options when using
acf_add_options_sub_page. For example:
acf_add_options_page([ 'network' => true, 'post_id' => 'acf_network_options', 'page_title' => 'Network Options', 'menu_title' => 'Network Options' ]);
I’m not sure what happened to my reply on this thread, so pardon me if this is a duplicate post.
The values are stored in the ‘sitemeta’ table, so they are accessible across sites without needing to use the switch_to_blog function.
@elliot – There is a lot of extra code that could be reduced if there were a filters in place in the
acf_delete_metadata functions. Alternatively, this functionality could be built into the core fairly easily. If you are interested, I could create a pull request, but I would need to do so in the Pro repo.
Hope this helps some people. I am using in a production site now and will make this plugin available on the WordPress directory once I’ve tested a bit more.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!