• Resolved fwiffo

    (@fwiffo)


    I’m working on a plugin (EidoGo for WordPress) that lets users upload and embed a particular file type (SGF files; but it’s not relevant to the question if you don’t happen to know anything about them). When embedding SGF files in posts, there are a few options for how they should be embedded, and I’ve added the appropriate hook for attachment_fields_to_edit, media_send_to_editor, etc. and that all works.

    The thing is, I’d like to save those options with the attachment so they are set if they reuse the file from their media library in the future. I found the attachment_fields_to_save hook, but I’m not sure how it’s meant to be used. I can’t just add new fields – they don’t correspond to actual columns in the wp_posts table and won’t get saved. I could serialize an array into something like post_content_filtered but that seems like an abuse of the intended purpose of that column. Where’s the appropriate place to stuff that sort of information and how should it be done?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Saving extra plugin-related information about attachments’ is closed to new replies.