#22002 closed task (blessed) (fixed)
Favorite plugins in the plugin installer
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | japh@…, pippin@…, xoodrew@…, gary@…, ben@…, maorhaz@… |
Description
Show a new Favorites tab in the plugin installer, to allow users to put in a WordPress.org username and see the Favorites of that user, and install them.
API change has been made. Patch to use API change is attached.
Attachments (12)
Change History (48)
Seems like it returns all plugins if a user exists but has no favorites.
Fixed. That's on the API side. BB_Query has this disconcerting habit of returning all possible results when there are no matches for the given data.
Updated the patch with typo fixes and a little more relevant documenting for the $page param.
- Milestone changed from Awaiting Review to 3.5
+1. Without this, favorite plugins are little more than bookmarks.
comment:10
follow-up:
↓ 15
Japh — 8 months ago
I have included a suggested change in my Favorite Plugins plugin which utilises this new API, that is remembering the user. Though perhaps for core, we could do this with a transient?
comment:11
Otto42 — 8 months ago
Japh: If I was going to do that, I'd probably want it to use a cookie or something instead, to keep it browser/user specific instead of storing it on the server-side. Could be weird if you have multiple admins browsing that page.
comment:12
griffinjt — 8 months ago
Ok, ignore my patches until I get my trunk install corrected. x.x
comment:13
Japh — 8 months ago
Otto42: Yes, I was thinking either cookie or session.
comment:14
Otto42 — 8 months ago
No sessions. Bad mojo with sessions. You'd be downright shocked at the number of hosting setups out there which will break painfully when you even try to use sessions.
comment:15
in reply to:
↑ 10
nacin — 8 months ago
- Component changed from Plugins to Upgrade/Install
- Type changed from enhancement to task (blessed)
Replying to Japh:
I have included a suggested change in my Favorite Plugins plugin which utilises this new API, that is remembering the user. Though perhaps for core, we could do this with a transient?
This is a worthy addition to this — but simply as a user option (global usermeta) rather than a site option.
comment:16
DrewAPicture — 8 months ago
Getting a fatal error Cannot redeclare install_plugins_favorites() clicking 'Add New' from a site's Plugins menu on Multisite:
Fatal error: Cannot redeclare install_plugins_favories() (previously declared in /Users/Drew/Sites/mutrunk/wp-admin/includes/plugin-install.php:183) in /Users/Drew/Sites/mutrunk/wp-admin/includes/plugin-install.php on line 212
EDIT: Applies to favorites-updates.2.diff
Oh, and by the way ... ooooh ahhhh, impressive.
comment:17
Otto42 — 8 months ago
DrewAPicture: Use my patch, not the two broken ones after that. See if that is the problem.
comment:18
DrewAPicture — 8 months ago
- Cc xoodrew@… added
Make that fatal error on 'Add New' from any plugins screen in Multisite including Network Admin with favorites-updated.2.diff
Replying to Otto42:
DrewAPicture: Use my patch, not the two broken ones after that. See if that is the problem.
favorites.diff works for me on Multisite. Spiffy.
comment:19
Otto42 — 8 months ago
Yes, both the "updated" patches from griffinjt are broken, as he pointed out earlier. The original patch is currently the correct one, for now.
comment:20
DrewAPicture — 8 months ago
Paired with this, it sure would be nice to be able to install multiple plugins at once though. There's a ticket for that somewhere around here (unless I'm missing something).
comment:21
Otto42 — 8 months ago
Interesting idea, but separate. Anyway, this new screen uses the same listing methodology as all the other pages do (same function calls) so a patch to do multiple installs should affect this in an identical fashion.
comment:22
Japh — 8 months ago
I implemented at least a preliminary version of username remembrance with usermeta in 22002.diff. Also fixed favories -> favorites typo.
Move form into the correct position to match the search form display, so it doesn't push down the results table needlessly
DrewAPicture — 8 months ago
Adds help text for the Favorites link, fixes a couple of help-text typos
comment:23
DrewAPicture — 8 months ago
22002.5.diff Adds help text and fixes a couple of typos.
comment:24
Japh — 8 months ago
For the sake of consistency and friendliness to touch devices, 22002.6.diff changes the favourites input field type to 'search'.
comment:25
nacin — 8 months ago
enctype="multipart/form-data" appears to be copied-pasted from the upload form. This form isn't uploading data, so it can go.
comment:26
Japh — 8 months ago
Patch 22002.7.diff removes the extra attribute @nacin pointed out.
comment:27
nacin — 8 months ago
- Keywords commit added
22002.8.diff hides the list table before the initial search and moves to method="get" action="".
comment:28
DrewAPicture — 8 months ago
- Keywords 2nd-opinion added
After a bit of back and forth with @japh seems like searches are only case-insensitive if the username is all lowercase to start with.
For instance, 'markjaquith' works, but 'MarkJaquith' doesn't. 'matt' works but 'Matt' doesn't.
But DrewAPicture and drewapicture both work (username:DrewAPicture).
Consensus seems to be this should be looked at on the API side.
comment:29
nacin — 8 months ago
- Keywords 2nd-opinion removed
Yes, this is just an API thing. Otto42 and I should be able to straighten it out.
comment:30
westi — 8 months ago
This is a great enhancement and great use of the WP.org favs
For
$user = isset( $_REQUEST['user'] ) ? stripslashes( $_REQUEST['user'] ) : get_user_option( 'wporg_favorites' );
should we be explicitly checking $_GET instead of $_REQUEST? The form's a get form anyways.
comment:32
Otto42 — 8 months ago
User name search is now case-insensitive.
comment:33
pento — 8 months ago
- Cc gary@… added
comment:34
nacin — 8 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [22026]:
comment:35
husobj — 8 months ago
- Cc ben@… added
comment:36
maor — 8 months ago
- Cc maorhaz@… added

Add favorites to plugin installer