ACF Config - 3ev/wordpress-core GitHub Wiki

Wordpress Core has deep integration with the Advanced Custom Fields (ACF) plugin. Wordpress Core provides a set of conventions that make configuring ACF easy and common across different plugins.

###JSON field config

Wordpress Core can automatically load ACF configuration that uses the Local JSON storage format. Simply create a directory called config/acf-json/ and place all of your JSON config files there. The plugin loader will automatically load your config when the plugin is registered.

###Options screens

Wordpress Core provides a simple convention for registering ACF Options pages. Simply create a file called config/options_screens.php, which returns a PHP array where each entry is a set of ACF Options page config params.

For exmaple:

return array(

    array(
        'page_title' => 'My Custom Options Page',
        'menu_title' => 'My Custom Options',
        'menu_slug'  => 'my-custom-options',
        'capability' => 'edit_posts',
        'redirect'   => false,
        'position'   => 150
    )
);