WordPress.org

Ready to get started?Download WordPress

Ideas

Extra hooks for widget admin pages

  1. danbrownweb
    Member

    It would be good if there was a better way to handle intialising / reinitialising javascript plugins on the widgets admin.

    If you have, say, a jquery plugin on an input on a widget, the plugin will be deactivated on save and when a widget is dragged in. So you need to initialise the javascript 3 times: On page load, on save, and on drag.

    This gets pretty hairy when you have to identify which widget it is, and discriminate between each widget. It would be ace if there were hooks for each of these states. And these could get passed the current widget's id as an argument so you could target the javascript to the widget in question without loads of DOM traversing for easier development.

    Posted: 1 year ago #
  2. cathy700
    Member

    12345

    I think i understand what you want, but it seems pretty hard to implement !

    Posted: 1 year ago #
  3. danbrownweb
    Member

    I think you're right :) Maybe a decent tutorial would be better than a change to core.

    Posted: 1 year ago #
  4. adamweiss
    Member

    Yes, initializing the plugin three times do hard time for the developer, but it will add less flexibility for the developer. Anyway, It could be implemented as an optional setting.

    Posted: 1 month ago #
  5. eriksmithwpc
    Member

    That's a great idea, but I don't think it will be implemented soon... For the meanwhile, lets create a good tutorial that will make the work easier.

    Posted: 1 month ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    1 Vote
  • Status

    This idea is under consideration