• Resolved k3davis

    (@k3davis)


    My plugin uses attachment_fields_to_edit and media_send_to_editor to let the user select from the (old) media uploader whether the file selected should be inserted as a link (default behavior) or as an attribute of a shortcode my plugin uses. This functionality is now present in WP 3.5 beta 3 due to backward compatibility work, but it doesn’t function properly.

    I can fuss with how it works/doesn’t work (initially it looks like my media_send_to_editor filter isn’t being fired at all), but I’d rather use native hooks/APIs as they are intended. I am not actually saving any attachment data but just letting them toggle whether they insert a link or a pre-formed shortcode that includes the link. Is there a “more proper” way to do this in WP 3.5 in light of the new media handling?

    Is the “Add Media” button expected to replace the “Upload/Insert” in the final version?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, from what I know “Add Media” will replace “Upload/Insert” completely, but functionality for the old thickbox and Media Uploader will be left in-tact to prevent older plugins from breaking due to the updates.

    I can’t imagine them leaving the old ‘Upload/Insert’ button there for official release. Would be a bit of a usability nightmare having two different methods of completing the same task.

    My plugin uses the old Media Upload, and I’ve been working hard on updating it. It has been working fine, even with Beta 2, but Beta 3 has completely broken it. As you’ve mentioned, it looks like some of the send to editor JS has been removed. Some of the inline Thickbox styling has been changed, fixing some bugs that have remained for a lot of releases. However, in fixing it they’ve broken the fixes I myself had put in place, meaning for 3.5+ I have to add extra code just to cater for it.

    Up until Beta 3 it looked like the old Media & thickbox functionality wasn’t going to be touched and just left there for backwards compatibility, but in making adjustments it has become a headache, without even considering the new workflow they are trying to introduce.

    I hope this isn’t going to be the case for official release because it will break a lot of plugins. At the moment, if things stay the way they are I’ll be forced to adapt the new Backbone.js Media Upload format and require v3.5 minimum. Don’t really want to do this as it may alienate some users who won’t upgrade for various different reasons.

    Thread Starter k3davis

    (@k3davis)

    It strikes me as pretty late in the beta cycle to have to implement all these drastic changes. My situation is a bit different as my plugin doesn’t revolve around this functionality but only uses it in a rather token way; most of the action can similarly be handled via a TinyMCE plugin. I’ve had to make the unfortunate choice to remove the media uploader integration for 3.5 users for the time being, as this version of WP is near release and as far as my limited purposes, this feature is broken. I’m hopeful to restore it once I find appropriate documentation of the changes and can find a way to implement with backward compatibility intact.

    Moderator Dominik Schilling

    (@ocean90)

    WordPress Core Developer

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress 3.5 media uploader questions’ is closed to new replies.