Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

'orderby' => 'plugins' , 'type' Option #82

Closed
wpsmith opened this Issue Jan 2, 2012 · 8 comments

Comments

Projects
None yet
3 participants

wpsmith commented Jan 2, 2012

We should be able to set in the plugins config array the an orderby (Plugin, Source, Type, Status)--mainly Plugin and Type I would imagine as I can see theme developers wanting their REQUIRED plugins at the top (maybe even with a different background highlighted CSS option).

Contributor

thomasgriffin commented Jan 2, 2012

Gary and I both discussed this as this was the way I originally had it. It may be something we put in the future, but we figured that most people are going to require/recommended only a handful of plugins and that people can generally read. :-) Given that, having an orderby parameter may be useful so that they can order the plugin by any column (perhaps even a custom column if we open up that avenue later).

Owner

GaryJones commented Jan 2, 2012

We don't need that level of customization.

I don't mind having the required plugins grouped at the top, with recommended plugins grouped underneath, but each group should be alphabetical. If a plugin is required, then it's required, and having any particular one above any other required plugins seems pointless.

wpsmith commented Jan 2, 2012

This is definitely preferred: "required plugins grouped at the top, with recommended plugins grouped underneath"

@ghost ghost assigned thomasgriffin Jan 8, 2012

Contributor

thomasgriffin commented Jan 8, 2012

I'll see about adding a sortable option to the table so that the user has the ability to sort them.

Owner

GaryJones commented Jan 9, 2012

The end-user doesn't need to be able to sort them - there aren't going to be that many in the majority of cases.

We can make the decision to put required (a-z) at the top, followed by recommended (a-z) next.

Contributor

thomasgriffin commented Jan 9, 2012

Ok yes, that would be the preferred way of doing it. I will do that for 2.3.0 for sure.

@thomasgriffin thomasgriffin reopened this Jan 9, 2012

Contributor

thomasgriffin commented Jan 9, 2012

I've fixed this issue in dev, but I need someone to look over the commit and make sure there isn't a better way of doing it. Basically I split the plugins array into 2 arrays by type, sorted each of them alphabetically, merged them back into the original plugin array and then sorted it in reverse alphabetical order ('required' comes after 'recommended') to achieve the result. It works fine, but just want to make sure there isn't a better way to approach it.

Contributor

thomasgriffin commented Mar 22, 2012

The current way of doing it is fine until someone else finds a better approach. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment