[buddypress-trac] [BuddyPress Trac] #6026: Single items for the Blogs component.

buddypress-trac noreply at wordpress.org
Fri Jul 29 18:40:04 UTC 2016


#6026: Single items for the Blogs component.
------------------------------------+-----------------------
 Reporter:  imath                   |       Owner:  imath
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  2.7
Component:  Blogs                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------

Comment (by boonebgorges):

 Hi @imath - Thanks for working on this!

 > WordPress 4.6 is introducing a very interesting class WP_Site_Query to
 query for sites. So i thought we should use it to progressively replace
 the way we are querying sites in BP_Blogs_Blog::get().

 If there's decent test coverage, and you feel good about this change, you
 should commit it. It's a meaningful improvement, regardless of whether we
 implement single blog pages.

 I am a bit confused about the Subscriber and Contributor stuff. Let me see
 if I can put it together:
 a. You're introducing the concept of Site Subscriptions
 b. You'll be using WP's Subscriber role to indicate a subscription.
 c. You want to store this data in a way that it can be easily accessed by
 BP. This suggests the `bp_user_blogs` table.
 d. But the `bp_user_blogs` table currently only stores user-blog
 relationships when the user is at least a Contributor.
 e. So, for backward compatibility with this functionality, you're
 introducing an `is_contributor` column.

 Is that correct?

 If so, it seems crazy :-D First, regarding (b), in my experience the
 Subscriber role has almost no meaning in WordPress. Using it to indicate a
 BP site subscription seems like it will have odd side effects. Think, for
 example, about how it will change the return value of
 `get_blogs_of_user()`. Second, `is_contributor` seems narrowly named. If I
 understand correctly, what it really means is "show this site in my
 directories". Currently, BP hardcodes this option: a site is shown in your
 directories if you're a Contributor or greater. But this seems kinda
 arbitrary, and something that we may want to change in the future. How
 about `show_in_directories` column, or something like that? Then directory
 queries would be something like `SELECT ... WHERE ( show_in_directories =
 1 OR is_subscribed = 1 ) ...`

 > I've edited the phpunit.xml.dist unit test configuration file, because
 it seems a bit weird to include multisite tests into regular tests.

 How does this relate to `/tests/phpunit/multisite.xml`? As with
 `WP_Site_Query`, if you figure out a configuration for multisite tests
 that makes sense, you should go ahead and commit it separately from this
 ticket, as it's an independent issue.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6026#comment:40>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list