Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround does not work due to changed variable names #70

Open
jojo2357 opened this issue Sep 27, 2024 · 6 comments
Open

Workaround does not work due to changed variable names #70

jojo2357 opened this issue Sep 27, 2024 · 6 comments

Comments

@jojo2357
Copy link

I tried to get the plugin to work with 2024 (WP default) and pasted

do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args, $id );

in wp-admin/includes/class-walker-nav-menu-checklist.php and noticed that $item_id $item $id are not in the scope of start_el with a comment that two of those names were changed circa wp 5.9.0

I couldn't get the menu to show up in wp-admin menu to config. I have used with 2021 theme some time ago and it worked great. Thanks btw :)

@helgatheviking
Copy link
Owner

You shouldn't need a workaround for twenty twenty four theme. wp_nav_menu_item_custom_fields is now in core. I'm not sure I understand what is happening, can you clarify?

@jojo2357
Copy link
Author

When I install the plugin I can't find the settings where I have seen them in prior versions. Where are they? I expect them under Appearance > Menus but I see no such item.

@helgatheviking
Copy link
Owner

Yes, they should be on each menu item you see when editing a menu via appearance > menu.

If you aren't seeing them, you likely have a conflict and I would suggest switching themes and disabling plugins one at a time.

@helgatheviking
Copy link
Owner

It's just now occurred to me that Appearance > Menus isn't accessible at all in the admin.... Is this the problem? Currently there's no support for the nav menus in the block editor, but I think it might be possible.

@jojo2357
Copy link
Author

Recently I had a reason to spin up a base wp install and yes, as you mention it doesnt show up in the menu

@helgatheviking
Copy link
Owner

Thank you for confirming. I hadn't realized the menu had gone away. I will have to think about how to handle that. Technically I think the block editor is customizable enough, but I'm only mid in block development so that might a lot of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants