The MU forums have moved to WordPress.org

using meta for additional data (1 post)

  1. cori
    Member
    Posted 17 years ago #

    I'm trying to use the meta array during blog creation to handle some arbitrary information to insert in another table related to a plugin. I'm adding it to the array using the add_signup_meta filter, and can use it for my purposes using the built in hooks (mostly wpmu_new_blog).

    However, my excess meta information is causing fits during the blog creation process in wpmu_create_blog() when the status and options are updated; since the stuff I need doesn't have a representative field in the blogs table MySQL's throwing "no such field" type errors.

    Which makes perfect sense of course, and I could just turn off errors, but that doesn't pass my stink test. What I've done instead is to hack wpmu-functions.php to add a new action that runs before the updates to the blog tables, and then remove my fields from the meta array before those updates run. However, I feel like I must be missing something that would make this more elegant (and keep me from having to hack a core file). Is there a better way to do this?

About this Topic

  • Started 17 years ago by cori