Summary of Dev Chats held November 26 & December 3, 2014

Trac Tickets

#6006: User/Member Types API

  • @boonebgorges asked for dev feedback in addition to @im4th’s in order to commit the new API for early testing.
  • @djpaulgibbs has since conducted a code review of the patch a la WPcom VIP code reviews.
  • Update: As of this writing, @boonebgorges has committed the new API to core.
  • Testing and feedback welcome.

#5733: Use wp_cache_add_global_groups() so cache is applicable throughout multisite

  • @johnjamesjacoby works on improving the speed and performance of BuddyPress sites in multisite and multi-network environments.
  • Included in ticket is a proof-of-concept patch and a revised bp-multi-network file based on his work on Flox, across 8 networks.
  • An audit of current usages of cache methods used throughout BP will be conducted.

#4988: bp_has_activities to accept multi scope

  • @r-a-y and @boonebgorges work on allowing multiple scopes for bp_has_activities() using same nested query syntax introduced by @boonebgorges in upcoming WP 4.1.

#5839: BP_XProfile_Query – filtering user query results by xprofile field matches

  • @boonebgorges has committed the new API to trunk.
  • Testing and feedback welcome.

#5669: Help plugins to generate activities for their post type(s)

  • @im4th has committed new functions and hooks to support tracking custom post types in the Activity Streams without requiring the Blogs component to be active (multisite).
  • Announcement Post: https://bpdevel.wordpress.com/2014/12/04/about-post-types-and-buddypress-activities/
  • Codex Article: https://codex.buddypress.org/plugindev/post-types-activities/
  • Testing and feedback welcome.

Adding BuddyPress support for the WP REST API

  • @modemlooper has a base plugin created at https://github.com/modemlooper/BP-API which is updated to current develop branch of WP-API
  • The status of this project and call for volunteers to help build this will be posted in this blog sometime soon.

Limited BuddyPress Codex Access

  • At this time, access to the codex admin dashboard has been restricted due to a deluge of spam posts last Thanksgiving weekend. The same goes for access to the bbPress codex.
  • In addition to @johnjamesjacoby’s work in stopping these spammers, @hnla reported spammers who used github to host spam materials and fought with the spammers relentlessly along with @netweb and me. We compiled a list of said spammers and have removed the users from respective codex and sites’ forums. As of yesterday, these spam users were also blocked from the WordPress.org support forums.
  • The new process to get access to the codices will be posted soon. Thank you for your patience.

Guest Commit Access

  • Guest commit access for the BuddyPress 2.2 development cycle has been granted to @tw2113. He will be continuing his recent focus on improving BP’s inline documentation.

BP Core Attachments

  • BP Attachments is being redesigned as a shared library which will include functions to to set up the attachments environment (API) as a foundation for other components to use rather than a stand-alone component.

Slack logs

11/26/14 – https://wordpress.slack.com/archives/buddypress/p1417032280001942
12/03/14 – https://wordpress.slack.com/archives/buddypress/p1417636775002453

#dev-chat, #slack

#4988, #5669, #5733, #5839, #6006

About Post Types and BuddyPress Activities

Today, the Blogs component includes a set of functions and hooks to manage the tracking of publicly published posts and comments into the Activity stream.

The Core Team has been working on ways to build a more general solution so that an activity could be generated as soon as a new content is created by any of the registered post types. Most of our interesting discussions about it are available on the #3460 ticket.

3460 is a huge ticket which addresses many aspects of the work required to design this generic solution, such as how to catch the post types, their comments, or provide a management interface etc.

During the 2.1 dev-cycle we’ve decided to split this ticket into smaller tasks and use a more gradual approach.

This update is about the first step of it: ease the implementation of tracking the published post type items into the Activity stream (#5669).

Ease is the keyword, as today you can already add an activity when a content is created by a post type: see examples in this codex page. Plugins can use some hooks and some amount of lines of code to build their tracking feature and there’s a also a popular filter ('bp_blogs_record_post_post_types') people can use to include post types when the Blogs component is active.

In our next major release, BuddyPress 2.2, we are centralizing the majority of the tracking code into the Activity component. A new set of functions and hooks has been created to catch public post types supporting the feature 'buddypress-activity',  to generate an activity when a new item is publicly published and to insert a new option into the Activity dropdown filters used in the Activity Administration screens and in front-end.

This means the Blogs component, when activated, will automatically add the 'buddypress-activity' support to the “post” post type, this also means that any post type can support this feature. To do so, you only need one single line of code!

add_post_type_support( 'book', 'buddypress-activity' );

So using the above line of code will make sure an activity is posted each time an item of the supported post type is published, and will automatically create a new entry into the Activity dropdowns to filter the stream. The created activities will use, by default, very generic strings. If you need more control about the activity attributes, this codex page is explaining the extra code you’ll need to include using the new BuddyPress function bp_activity_set_post_type_tracking_args() or the WordPress function register_post_type().

These improvements have been committed to trunk recently. If you are a developer or an “eager tester”, you can download the trunk version as explained in the “Development” section of the BuddyPress.org download page (make sure to use it on a dev/local/testing environment).

#2-2, #3460, #5669