• Hi Shea, what do you think about the idea of allowing the order of the snippets (on the Manage page) to be changed? Maybe by dragging-and-dropping them up and down?

    I know this wouldn’t make any functional difference in terms of how the snippets actually work, but it would make it a bit easier to manage a larger number of snippets, by grouping similar or related snippets next to each other in the list.

    Eg. I have several snippets which add or modify things to the <head> section of my webpages, and it would be handy for me if I could have those snippets sitting right next to each other on the Manage page, so I don’t have to scroll up and down to find them all.

    Of course I don’t know how big a deal it would be to implement something like this… 🙂

    http://wordpress.org/plugins/code-snippets/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    This is a good idea – I’ll see what I can do. Perhaps the snippets could also be executed in the order that they are placed in as well.

    Thread Starter GermanKiwi

    (@germankiwi)

    FWIW, I’ve used another plugin called Simple Page Ordering which allows the order of Pages to be changed via a very useful drag-n-drop method. Maybe the same method (same code?) could work with your plugin.

    In what order to the snippets currently execute? And what would be the consequence of changing the order based on the order they are placed? I hadn’t considered this aspect.

    Plugin Author Shea Bunge

    (@bungeshea)

    I’ve used Simple Page Ordering before as well, and it came to mind when thinking about how to implement this. I might have a look at SPO’s JavaScript code for dragging and dropping the pages and use something like that.

    Snippets are currently executed in the order they are retrieved from the database – this would usually be the order they are added to the database. Changing the order probably wouldn’t make a lot of difference, as snippets tend to be mostly isolated, but it would make sense to have a bit of reason to the order they are executed.

    Thread Starter GermanKiwi

    (@germankiwi)

    Sounds good to me! 🙂

    This is a very good idea to let us set the order of the snippets, they are executed.

    For the original question by GermanKiwi: I would recommend to have custom taxonomy, so we can put snippets to categories and we can list them by category as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing the list order of snippets?’ is closed to new replies.