BuddyPress 2.7.0 Release Candidate 2 is now available for testing

BuddyPress 2.7.0 Release Candidate 2

Changes to Template Files for BuddyPress 2.7

Several improvements to BuddyPress template files are introduced when we release BuddyPress 2.7.0 on October 19 (there will be a Release Candidate 2 on October 12). These include upgrades for accessibility, markup, and template refactoring.

Please remember to test/update your plugins, themes, and sites before the stable release. This is also a friendly reminder that BuddyPress 2.7 will require at least WordPress 4.2.

Following are the changesets for respective files to guide you in your updates. At the bottom of this post, there are links to other views of the file revisions for this dev cycle.

This post will be updated as needed.

Changesets

Reference point: buddypress/bp-templates/bp-legacy/

The following give you an overview of the revisions to individual files. Please note that changesets with accompanying trac ticket numbers, e.g. (See #5757), require that you upgrade installations to at least BP 2.7 RC1 or trunk in order to test the new features.

Activity

buddypress/activity/single/home.php
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/activity/comment.php
* Add data-livestamp attribute. (Changeset) (See #5757)

buddypress/activity/index.php
* a11y: Add navigation landmarks. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset 1, Changeset 2)

Blogs

buddypress/blogs/create.php
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/blogs/index.php
* Refactor search form for the Sites Directory screen. (Changeset) (See #6844)
* a11y: Add navigation landmarks. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

bp-blogs/bp-blogs-template.php *** Do not change core file. Noted here for possible styling adjustments.
* a11y: Group radio buttons within a fieldset on the Site > Create screen for multisite installations. (Changeset)

Legacy Forums

buddypress/forums/index.php
* Refactor search form for the Forums Directory Screen. (Changeset) (See #6844)
* a11y: Add navigation landmark. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)

Groups

buddypress/groups/single/admin/group-settings.php – New file after splitting up groups/single/admin.php in (#7079)
* Show available group types. (Changeset) (See #7210)

buddypress/groups/single/admin/manage-members.php – New file after splitting up groups/single/admin.php in (#7079)
* Change structure, content, and message of member list plus add pagination controls. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset 1, Changeset 2)

buddypress/groups/single/forum/edit.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/groups/single/forum/topic.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/groups/single/activity.php
* a11y: Clarify navigation landmark. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/groups/single/admin.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/groups/single/admin.php in BP 2.6, now in buddypress/groups/single/admin/manage-members.php for BP 2.7 in (#7079).
* a11y: Bump headings from h4 to h3 for the Groups > Manage > Members screen. (Changeset)

buddypress/groups/single/admin.php in BP 2.6, now in buddypress/groups/single/admin/group-settings.php for BP 2.7 in (#7079)
* a11y: Group two sets of radio buttons within fieldsets for the Groups > Manage > Settings screen. (Changeset)

buddypress/groups/single/cover-image-header.php
* a11y: Bump headings for Group Admins and Mods from h4 to h2 for the header template used if group cover image is enabled. (Changeset)
* Show group type in group header under cover image if enabled. (Changeset) (See #7210)
* Add data-livestamp attribute. (Changeset) (See #5757)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/groups/single/forum.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/groups/single/group-header.php
* a11y: Bump headings for Group Admins and Mods from h4 to h2 for the header template file used if group cover images are disabled. (Changeset)
* Show group type in group header if enabled. (Changesets: 1, 2, 3) (See #7210)
* Add data-livestamp attribute. (Changeset) (See #5757)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/groups/single/home.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/groups/single/invites-loop.php
* a11y: Bump heading from h4 to h3 for the Group > Send Invites screen. (Changeset)

buddypress/groups/single/members.php
* Add data-livestamp attribute. (Changeset) (See #5757)

buddypress/groups/single/request-membership.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/groups/single/send-invites.php
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/groups/create.php
* a11y: Group two sets of radio buttons within fieldsets for the Groups > Create – Step 2. (Changeset)
* Show a list of group types for selection during group creation. (Changeset) (See #7210)
* a11y: Remove navigation landmark. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)
* a11y: Add headings for screen reader users. (Changeset)

buddypress/groups/groups-loop.php
* New template tag to show group directory message. (Changeset) (See #7210)
* Add data-livestamp attribute. (Changeset) (See #5757)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/groups/index.php
* Refactor search form for the Groups Directory Screen. (Changeset) (See #6844)
* a11y: Clarify navigation landmarks. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

Members

buddypress/members/single/friends/requests.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/groups/invites.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/messages/compose.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/messages/messages-loop.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/messages/single.php
* a11y: Bump heading from h3 to h2 for the single message screen. (Changeset)

buddypress/members/single/notifications/read.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/notifications/unread.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/profile/change-avatar.php
* a11y: Bump heading from h4 to h2 for the Profile > Change Avatar screen. (Changeset)

buddypress/members/single/profile/change-cover-image.php
* a11y: Bump heading from h4 to h2 for the Profile > Change Cover Image screen. (Changeset)
* Add data-livestamp attribute. (Changeset)

buddypress/members/single/profile/edit.php
* a11y: Bump heading from h4 to h2 for the Profile > Edit screen. (Changeset)
* Add navigation role for profile field group links. (Changeset)

buddypress/members/single/profile/profile-loop.php
* a11y: Bump heading from h4 to h2 for Profile > View screen. (Changeset)

buddypress/members/single/settings/general.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/settings/notifications.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/settings/profile.php
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/activity.php
* a11y: Clarify navigation landmarks. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/members/single/blogs.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/cover-image-header.php
* a11y: Alert screen reader users about new messages. (Changeset)
* Add data-livestamp attribute. (Changeset) (See #5757)

buddypress/members/single/forums.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/friends.php
* a11y: Clarify navigation landmark. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/groups.php
* a11y: Clarify navigation landmark. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/home.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/member-header.php
* Add data-livestamp attribute. (Changeset) (See #5757)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/members/single/messages.php
* a11y: Clarify navigation landmark. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/single/notifications.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/plugins.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/profile.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/single/settings.php
* a11y: Clarify navigation landmark. (Changeset)

buddypress/members/activate.php
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/members/index.php
* Refactor search directory in the Members Directory Screen. (Changeset) (See #6844)
* a11y: Clarify navigation landmark. (Changeset)
* a11y: Add heading for screen reader users. (Changeset)

buddypress/members/members-loop.php
* Add data-livestamp attribute. (Changeset) (See #5757)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress/members/register.php
* a11y: Bump headings for sections from h4 to h2 of Registration page. (Changeset)
* a11y: Group radio buttons with a fieldset for multisite installations. (Changeset)
* a11y: Alert screen reader users about new messages. (Changeset)

buddypress-functions.php

buddypress/buddypress-functions.php
* Add search form for Groups > Manage Members screen. (Changeset) (See #6385)
* Renders the group ID hidden input on group admin screens. (Changeset) (See #7079)
* Use new groups_get_group() syntax throughout BP. (Changeset) (See #5451)
* Group join/leave buttons should have group-button class after AJAX request.(Changeset) (See #7229)

CSS

buddypress/css/*
* a11y: Update contrast ratios to meet WCAG 2 AA standards
~ twentysixteen – (.css) (-rtl.css) (.scss)
~ twentyfifteen – (.css) (-rtl.css) (.scss)
~ twentyfourteen – (.css) (-rtl.css) (.scss)
~ twentythirteen – (.css) (-rtl.css) (.scss)
~ twentytwelve – (.css) (-rtl.css) (.scss)
~ buddypress – (.css) (.css) (-rtl.css) (-rtl.css)

JavaScript

buddypress/js/buddypress.js
* Don’t allow a Favorite click when AJAX request is in progress. (Changeset)
* Fix AJAX search after directory form template refactoring. (Changeset)

Additional References

BP Codex – Template Changes for BP 2.7

BP Trac – Complete changeset for bp-legacy/buddypress since BP 2.6.2
(Updated 10/12/2016)

BuddyPress 2.7.0 Release Candidate 1 is now available for testing

BuddyPress 2.7.0 Release Candidate 1

BuddyPress 2.7.0 Beta 1 is now Available

BuddyPress 2.7.0 Beta 1

BuddyPress 2.7.0 is scheduled to be released on October 12, 2016.

#2-7, #beta

Group queries have been rewritten for BP 2.7

BuddyPress 2.7 will introduce a number of major changes to the code that underlies group queries – specifically, BP_Groups_Group::get(). Most of these changes will be invisible to users and developers, but anyone using filters to modify the underlying SQL may experience backward compatibility breaks in certain cases.

The main motivator for the changes is performance. Over the past few releases, BuddyPress has been following WordPress in moving its object queries to the “split” model, where one query gets the IDs matching the query parameters, and the second query gets the objects corresponding to the matched IDs. Split queries are generally less memory-intensive, and make it easier to phase in various improvements to caching. The changes we’ve made for BP 2.7 should lead to a huge performance improvement on sites using persistent caching; when querying groups, not only are group objects now fetched from the cache when available, but the ID queries themselves are cached as well. See 5451 for more information.

All normal uses of the bp_has_groups() stack, including groups_get_groups() and BP_Groups_Group::get(), should be 100% backward compatible. Plugins that use the bp_groups_get_total_groups_sql or bp_groups_get_paged_groups_sql filters may require an update for BP 2.7 compatibility. Filter callbacks will break in the following cases:

  • The callback assumes the old comma-separated JOIN syntax: SELECT ... FROM wp_bp_groups g, wp_bp_groups_groupmeta gm1 .... The SQL now uses the more verbose JOIN syntax: SELECT ... FROM wp_bp_groups g JOIN wp_bp_groups_groupmeta gm ON ( g.id = gm.group_id ) ...
  • The callback assumes SELECT * instead of SELECT id
  • The callback requires access to the groupmeta tables that were previously joined for ‘last_activity’ and ‘total_member_count’ (gm1 and gm2). These tables are now only JOINed during the main query when required by the type or orderby parameter. Access to the last_activity and total_member_count properties of group objects is unchanged.
  • The callback expects the second parameter – the $sql array – to have a specific format. Previously, the $sql array had keys that corresponded to various WHERE conditions, but the array was assembled haphazardly, and some values were not included. Now, the top-level items in the $sql array are the main clauses of the SQL query (‘select’, ‘from’, ‘where’, etc) and the WHERE conditions are grouped in the $sql['where'] key. If your plugin filters the SQL string conditionally – for example, when performing a search – you are encouraged to use the third parameter, the $r array of arguments passed to the query method, as the canonical source for query information.

In this comment, I outlined a list of plugins from GitHub and wordpress.org that may be affected by the change. If you see your name on that list, consider yourself pinged.

Though it shouldn’t result in any backward compatibility breaks (except in cases of odd type checking), it’s also worth noting that items returned from BP_Groups_Group::get() are now BP_Groups_Group objects.

Questions about the new query format, or how to make your plugin compatible with BP 2.7? Please leave comments in this thread.

#2-7, #5451, #groups

Dev Chat Summary for September 14, 2016

BuddyPress 2.7

  • Beta 1 – September 21
  • There are currently 110 tickets in queue (76 closed, 34 open)

Trac Tickets

Prevent BP from being updated when minimum requirements are not met (#7196) @boonebgorges: “If we’re going to drop PHP 5.2 support for 2.8, then something should happen for 2.7 to provide warnings. I’m bumping this so I remember to look at it in the next few days. if anyone has thoughts or wants to have it instead, let me know on the ticket.”

Display and filter by member type on Dashboard > Users (#6060) @dcavins has patch. @boonebgorges: “This is a cool enhancement, and it’d be great to get it in, especially since it appears to be close to being ready.”  @dcavins: “Yes, I’ll push this through along with the related group types ticket (#7175).”

Groups query overhaul (#5451) @boonebgorges will be posting about backward compatibility issues related to the group query refactoring.

Use WP 4.3 site icon feature to set a blog’s “profile photo” (#6544) @rayisme has patch which mirrors the site icon URL to blogmeta instead of making a direct copy of the image.

Update BP_buttons class to accept new arg param for $element_type (#7226) @rayisme has patch and requested feedback on the new, proposed class `BP_Core_HTML_Element`.

Improve group management members screen (#7105) @dcavins will be working on the changes this week.

Friends: Add caching to BP_Friends_Friendship class (#6978) @dcavins has patch. @boonebgorges: “It would be helpful to demonstrate the need (or lack thereof) by writing tests that count `$wpdb->num_queries` before and after removal. Maybe go ahead with the proposed changes first, and then worry about removing the redundant cache afterward when it’ll be simpler to write tests for.”

Slack log: https://wordpress.slack.com/archives/buddypress/p1473879643000745

#dev-chat

Dev Chat Summary for September 7, 2016

BuddyPress 2.7

Trac Tickets

Groups query overhaul (#5451) @boonebgorges has patch to boost performance and object caching for the Groups component. He noted, “There will be some backward compatibility breaks for anyone using `bp_groups_get_(paged|total)_groups_sql` filters and has listed some plugins in ticket. Dev feedback requested –  especially @djpaulgibbs and @rayisme ( @dcavins has already voiced his support :)  )” @rayisme has posted support as well. Update: This is now in trunk.

Hierarchical groups (#3961) @dcavins is ready to commit the patch which has a cache invalidation scheme. @boonebgorges said patch looks good and mentioned testing the patch with thousands of groups. @dcavins is prepared to test with a group generator via WP-CLI.

Friends: Add caching to BP_Friends_Friendship class (#6978) @dcavins has refreshed patch which caches friendship objects separately from a users’ friendships.

Change bp_sort_by_key() to allow key preservation (#7238) @dcavins has patch, “If anyone has reservations about changing the underlying function call, please add a note on the ticket.”

Add action hook(s) outside the group admin form (#7249) @dcavins has patch. @boonebgorges, “seems fine to me.” @tw2113 “is fine to me too, it has its docs.”😀 Update: This has been committed to trunk

No group members search in groupname/admin/manage-members/ (#6385) @dcavins has patch. Dev feedback needed.

Improve group management members screen (#7105) @dcavins has patch. @boonebgorges has posted comment in ticket. Update: This has been committed to trunk

Update BP_buttons class to accept new arg param for $element_type (#7226) @r-a-y requested feedback for current patch.

Group type frontend integration (#7210) @rayisme noted in ticket that he was going to commit patch soon. This has @boonebgorges‘ ♥ stamp.

Only load component action and screen code when we’re on the component’s page (#7218) @rayisme has patch. Dev feedback requested for relocating functions.

Screen notifications settings page (#6712) @rayisme has patches for a separate screen notifications panel as well as for a new merged notifications (email and screen) panel. @dcavins likes the “idea of a central place to manage communication.” @boonebgorges “I haven’t tested the patch, but I definitely like the idea of a central place for managing this stuff. I’ll check it out. What to do with 3rd-party settings doesn’t seem like a dealbreaker either way.”

Use WP page names for BP directory pages headings (#6765) @hnla requested dev feedback. @boonebgorges will look into this.

Display and filter by member type on Dashboard > Users (#6060) @dcavins has updated patch. Dev feedback requested – “a lookover would be great because this should easily apply to the groups wp-admin table with slight modification.” @boonebgorges will try to take a look.

Creation of developer.buddypress.org (#6812) @tw2113 has set up test site at https://trexthepirate.com/buddypress/

Slack log: https://wordpress.slack.com/archives/buddypress/p1473274934000113

#dev-chat