Opened 16 years ago
Closed 9 years ago
#15828 closed enhancement (wontfix)
Alphabetized My Sites
| Reported by: | scep | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Networks and Sites | Version: | |
| Severity: | normal | Keywords: | has-patch needs-testing ux-feedback |
| Cc: | Focuses: | multisite |
Description
For installs that have lots of sites it would be easier to browse if the sites are alphabetized. I add the following code to our install after each update. It would be nice if this was the default.
after line 72: reset( $blogs );
function cmp($a, $b){
if ($a->blogname == $b->blogname)return 0;
else return ($a->blogname < $b->blogname) ? -1 : 1;
}
uasort($blogs, 'cmp');
Attachments (1)
Change History (13)
#4
follow-up:
↓ 7
@
13 years ago
- Keywords ux-feedback added
- Severity minor → normal
Needs UX feedback. There is a filter for get_blogs_of_user that could probably be used by a plugin to do this. It may confuse a bunch of people already running multisite if the My Sites menu was all of a sudden alphabetized.
#7
in reply to: ↑ 4
@
12 years ago
Replying to jeremyfelt:
Needs UX feedback. There is a filter for
get_blogs_of_userthat could probably be used by a plugin to do this. It may confuse a bunch of people already running multisite if the My Sites menu was all of a sudden alphabetized.
I came up with a plugin to do this a few years ago and just released it: https://wordpress.org/plugins/sort-my-sites/
I agree with your UX comment, by default we could leave it unordered and then allow the site owner/user to sort by Site ID, Site Name, Domain, Site Path, or Site URL.
#9
@
11 years ago
Conceptually I think the idea it's alphabetical makes sense. I agree though with the concern that suddenly seeing this change could be disconcerting. This is a not so cautious approach though. I'd personally say the usability gain would be enough to make this happen.
If we are being cautious, I would suggest we need to work out how many are self fixing this like the original comment. If that is a lot of users then it makes sense to change it without worrying about implications.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I don't think the original idea is a good solution - get_blogs_of_user is called in several places and doing a sort outside of this function doesn't make any good. Instead, I propose to introduce internal sorting - it looks much better and does a better job. Patch attached. Also, I improved it to allow sorting by every variable, not only the blogname.