0

I need to know this for a plugin I'm developing: What happens when a user creates a menu, add/remove menu items in the admin, what updates are made in the database, what tables/columns are affected?

0

I just got into the database after trying this myself, so beware of inaccuracies. I'm also assuming the database-prefix is wp_.

What I found was that a refrence to the menu itself is stored in both wp_termsand wp_term_taxonomy. The one in term_taxonomyalso stores the number of elements in the menu.

The relationships between menu items and posts are stored in wp_term_relationships as refrences to post_id's and taxonomy_id's. I hope this was somewhat helpful.

  • Yeah, thanks. That means I can programatically create a menu by inserting into wp_terms and wp_term_taxonomy, which I did. – bodesam Nov 11 '14 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.