Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

wpsmith opened this issue Jan 2, 2012 · 8 comments
Assignees
Milestone

Comments

@wpsmith
Copy link

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).

@thomasgriffin
Copy link
Contributor

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).

@GaryJones
Copy link
Member

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
Copy link
Author

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
@thomasgriffin
Copy link
Contributor

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

@GaryJones
Copy link
Member

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.

@thomasgriffin
Copy link
Contributor

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

@thomasgriffin
Copy link
Contributor

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.

@thomasgriffin
Copy link
Contributor

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
Projects
None yet
Development

No branches or pull requests

3 participants