WordPress.org

Ready to get started?Download WordPress

Forums

Backbone...Gallery...Rube Goldberg (2 posts)

  1. alan-c
    Member
    Posted 1 year ago #

    So.....

    We get a nice new media uploader/gallery maker. But for every problem solved seems more are created.

    It starts from the fact, that there is no default way to add a custom class to divs that enclose WP galleries on a per gallery basis. Something like:

    [gallery ids="1,2" my-custom-class="newclass"]

    followed by the next gallery on the page being:

    [gallery ids="3,4" my-custom-class="anotherclass"]

    Sure, I can easily override the function for the shortcode and add this in. But wouldn't in be nice to add a nice little text box over there on the right side of the new media uploader we've been given? Perhaps in the 'Gallery Settings' right below the check box for random? So I don't have to permanently live in text editing mode or use a plugin to fix something that should be a default feature...

    Unfortunately, the new media uploader is done with backbone templates in js. For those of us who don't use backbone this is rather painful. So sure, we can hook in to print_media_templates thanks to that addition - unfortunately we have to hook using php around what appears appears to be a whole collection of backbone code. Code for which there is no documentation or examples. Awesome.

    Guess I'll just stick with text editor mode for a while until someone (who cares to learn backbone/knows backbone for wp) writes a tutorial or some documentation that shows how we'll have to write a couple dozen lines of php and js just to echo out ONE LINE OF HTML.

    And my wife wonders why I'm losing my hair. Instead of 3.5 Edwin, I think that 3.5 Rube might have been more appropriate. We get to use wp functions in php to complement wp functions in backbone on top of jquery.

    Well, if anyone has any links on hooking in the the backbone templating system please post.

  2. alan-c
    Member
    Posted 1 year ago #

    As this thread is being drowned in the flood of joy over 3.5, I felt the need to post my complaints in other venues in the hopes that it draws some attention.

    I feel... quixotic.

    http://wpdaily.co/backbone-underscore-35/#comment-126

Topic Closed

This topic has been closed to new replies.

About this Topic