carbon-fields
carbon-fields copied to clipboard
nav_menu_item container wont show till after saving a menu item to menu
Version
3.0
- Carbon Fields:
- WordPress:
- PHP:
Expected Behavior
I add just a basic nav_menu_item container with a field. Copied from example. I go to menus and click add to menu and I expect the fields to be there.
Actual Behavior
The actual fields do show but only if i add a menu item then save then open the menu item back up.
Container definition
// functions.php
use Carbon_Fields\Container;
use Carbon_Fields\Field;
add_action( 'after_setup_theme', 'crb_load' );
function crb_load() {
\Carbon_Fields\Carbon_Fields::boot();
}
add_action( 'carbon_fields_register_fields', 'test' );
function test (){
Container::make( 'nav_menu_item', 'Menu Settings' )
->add_fields( array(
Field::make( 'color', 'crb_color' ),
));
}
any update on this, seems to be an important thing to fix?