Grab the ACF values inside mu-plugins

enter image description here

So here is what I’m doing – I am setting up a plugin under mu-plugins and I want to be able to target the values but I’m unsure how to properly grab that and it’s giving me issues. I’m using ACF to make the Options page under Settings.

Structure:

mu-plugins/
— Folder/
—- _classes/
—— Test.php

Here is what I have inside my Test.php class:

public static function register() {
    add_action('widgets_init', function() {
        register_widget('Instagram_Widget');
    });

    add_action('acf/init', function() {
        if(function_exists('acf_add_options_sub_page')) {
            acf_add_options_sub_page(array(
                'page_title'  => __('Instagram'),
                'menu_title'  => __('Instagram'),
                'parent_slug' => 'options-general.php',
            ));
        }
    });
}

This returns a options page with this on it:

Within my mu-plugins, how does one successfully grab the fields?

Read more here:: Grab the ACF values inside mu-plugins

Leave a Reply

Your email address will not be published. Required fields are marked *