in action_save_post, it should check first if self::MENUIDS get cached. if not, when it calls delete_menu_objects_cache (0), it cannot delete cache menu recursively because it can't get anything from self::MENUIDS to clear cache
convert parameter for term_exists to be int to make sure it's always integer before using command term_exists
fix indents
- update in menu function to compatible with Wordpress 3.6 because I found problem that this function can't be used with custom Walkers implemented in Wordpress 3.6
- due to upgrade to compatible with Wordpress 3.6, get_nav_menu_object need to be changed the caching mechanism
- get_nav_menu_items get one more parameter (args)
- remove parse_args function and put it back to menu function because it has nothing to do with caching.
- create function get_nav_menus to make use in action_save_post and get_nav_menu_object to cache result from wp_get_nav_menus