Better Compatibility and Functionality Suggestion…
-
Hey there,
First of all I’d like to convey that I love this plugin. I have used it to replace “The Other” Nav Menu plugin mainly because I like the dropdown selector and the added functionalities.
I made some minor changes to the nav-menu-edit-custom-fields.php file for better functionality.
Here are the changes I implemented:
- Newer Walker Class: The script now uses
Walker_Nav_Menu
for broader compatibility with recent WordPress versions. - Dedicated Hook: It replaces the regular expression with the
walker_nav_menu_start_el
hook to insert custom fields during menu item rendering. This is a more reliable approach. - Field Sanitization: The script includes
wp_kses_post
to sanitize user input within custom fields before outputting them. This helps prevent potential XSS vulnerabilities. - Note:
- This script still relies on plugins and themes using the?
wp_nav_menu_item_custom_fields
?hook to define their custom fields.
Hope this helps.
- Newer Walker Class: The script now uses
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Better Compatibility and Functionality Suggestion…’ is closed to new replies.