Hey Everyone.
I have noticed an issue with the menu editor being super slow when using X-Theme. When I have a menu with several items in it, it almost becomes unusable to make any changes to. I figured at first it was an issue with our server, and spent several hours with our hosting companies technical support to see if there were any issues with memory, execution time, php configuration, etc… but what seemed to be the big culprit were the additional fields that the theme was adding to the menu items, which caused javascript execution to start ballooning exponentially until it eventually freezes client-side.
I did some digging and I found for me that the best solution was to remove these additional fields using this code:
// ==================================
// Remove custom fields for menu
// ==================================
add_action('init', 'remove_these', 10 );
function remove_these() {
remove_all_actions( 'wp_nav_menu_item_custom_fields', 10);
remove_all_actions( 'wp_update_nav_menu_item', 10 );
remove_all_filters( 'manage_nav-menus_columns', 10 );
}
I just wanted to share this with anyone who was running into this issue, and to bring this up to staff to flag it as a potential fix in the future.
Thanks!