#36707 closed enhancement (fixed)
Add pre_get_blogs_of_user filter.
Reported by: | nerrad | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Users | Keywords: | has-patch has-unit-tests |
Focuses: | multisite | Cc: |
Description
See original discussion on #31746
The filter has been broken out into its own ticket so that discussion on longer term improvement of get_blogs_of_user()
can be continued there.
See https://core.trac.wordpress.org/attachment/ticket/31746/31746.3.diff for patch.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core-multisite by nerrad. View the logs.
9 years ago
#2
@
9 years ago
- Summary changed from Add pre_get_blogs_of_user of user filter. to Add pre_get_blogs_of_user filter.
#4
follow-up:
↓ 5
@
9 years ago
- Keywords needs-refresh removed
- Milestone changed from Awaiting Review to 4.6
36707.diff is a riff on/refresh of @jtsternberg's original patch and uses count()
rather than empty()
to check the returned data from the filter.
Should we start with false
instead and allow for the return of an empty array?
#5
in reply to:
↑ 4
;
follow-up:
↓ 6
@
9 years ago
Should we start with
false
instead and allow for the return of an empty array?
Actually yah, that seems like a good idea, though it probably should be null
in keeping with the precedent of other 'pre_*
filters in WordPress.
Also, it looks like the static variable is a no-go?
#6
in reply to:
↑ 5
@
9 years ago
- Owner set to jeremyfelt
- Status changed from new to reviewing
Replying to jtsternberg:
Should we start with
false
instead and allow for the return of an empty array?
Actually yah, that seems like a good idea, though it probably should be
null
in keeping with the precedent of other'pre_*
filters in WordPress.
+1
Also, it looks like the static variable is a no-go?
For this ticket, yes. We can continue discussing improvements to get_blogs_of_user()
on #31746.
Related patch. https://core.trac.wordpress.org/attachment/ticket/31746/31746.3.diff