You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context for Menu Item (class-fieldmanager-context-menuitem.php) is not working properly. I would expect to see the fields when a new Menu Item is added to a Menu in Appearance -> Menus without the need to save the menu to refresh the page, but instead I need to save the menu, reloading the page and only then the fields appears for the newly added Menu Item.
Steps To Reproduce
Requirements:
WordPress and FieldManager 1.6.1 installed.
Add Menus support to the theme add_theme_support( 'menus' );.
Add a menu with some menu items inside.
Add the code below to your functions.php file to add some fields to Menu Item.
add_action( 'fm_nav_menu', 'fm_expanded_menu_fields' );
function fm_expanded_menu_fields() {
$fm = new Fieldmanager_Group( array(
'name' => 'contact_information',
'children' => array(
'name' => new Fieldmanager_Textfield( 'Name' ),
'phone' => new Fieldmanager_Textfield( 'Phone Number' ),
'website' => new Fieldmanager_Link( 'Website' ),
),
) );
$fm->add_nav_menu_fields();
}
Steps:
Go to Appearance -> Menus.
Select the menu you've created.
Expand any existing menu item.
Check that fields are visible. (See Screenshot 1)
Add a new item to the menu a Custom Link for this example.
Expand the newly added menu item.
Check that fields are not visible. (See Screenshot 2)
Save the menu (the page will reload).
Expand the newly added menu item.
Check that fields are visible. (See Screenshot 3)
Additional Information
Screenshot 1
Screenshot 2
Screenshot 3
The text was updated successfully, but these errors were encountered:
Description of the bug
Context for Menu Item (
class-fieldmanager-context-menuitem.php
) is not working properly. I would expect to see the fields when a new Menu Item is added to a Menu in Appearance -> Menus without the need to save the menu to refresh the page, but instead I need to save the menu, reloading the page and only then the fields appears for the newly added Menu Item.Steps To Reproduce
Requirements:
add_theme_support( 'menus' );
.Steps:
Additional Information
Screenshot 1
Screenshot 2
Screenshot 3
The text was updated successfully, but these errors were encountered: