Legacy Widgets in BuddyPress 10.0.0

BuddyPress 9.0.0 main focus was to build a new BP Block Widget for each existing BP Legacy Widget. Starting in 10.0.0, BuddyPress is no more loading Legacy Widgets by default. It only keeps on loading them if:

  • Your WordPress version is < 5.8.
  • Your active theme doesn’t support Block Wigdets.
  • You activated the Classic Widgets plugin.
  • You decided to opt-out the new Block Widget Editor using the use_widgets_block_editor filter.

If your WordPress version is >= 5.8 and your active theme supports Block Widgets and you haven’t opted-out the Block Widget Editor using the Classic Widgets plugin or the filter but still want BuddyPress to load its Legacy Widget, you can do so using this filter:

// This filter makes sure BP Legacy Widgets will be loaded.
add_filter( 'bp_core_retain_legacy_widgets', '__return_true' );

#10-0-0, #widgets

More engaging logging activities in 10.0.0

By default, BuddyPress has had an elementary style for secondary activities for a long time, now it’s time to make it more attractive.

Default secondary BuddyPress activities

These simple activities about specific user interactions or events (e.g., you joined a group) are more visually attractive to improve user engagement in your community. The most impressive new activity is generated when a user updates their profile photo; it will include the profile photo that spurred the creation of the activity item, even if it has been updated.

New Interactive activities

The new update also saves your avatar change timeline. For example, when a user uploads a new avatar, the previously uploaded one is moved inside a history subdirectory of the user’s avatar directory. This avatar’s history is then available for the new_avatar activities to display the avatar the user had when these were published.

We’ve added a new « recycle » tab inside the change profile photo UI to manage and delete old uploaded avatars.

Thanks to this recycle tab, users can manage their avatar’s history. They can choose to:

  • Reuse a previously uploaded avatar as their current profile photo,
  • Permanently delete an avatar from their avatars history.

It also deletes the activity when a historical avatar has been deleted. It also covered avoiding multiple new_avatar activities per hour. You can change your avatar numerous times in a short time frame, and it will use the last avatar for the activity.

The new functions added for these updates

  • bp_attachments_list_directory_files() returns a list of file objects contained into the directory thanks to its absolute path passed as the function argument.
  • bp_attachments_list_directory_files_recursively() returns a list of file objects contained into the directory and its subdirectories thanks to the directory absolute path passed as the function argument.
  • bp_avatar_get_version() can be used to get a version of an avatar according to its timestamp. Since [13175] the BP_Attachment_Avatar class is using a timestamp inside the avatar file name instead of a generated unique string (uniqid()), this change allows us to request avatars according to the timestamp included into their names.
  • bp_avatar_get_avatars_history() can be used to get the file objects list of previously uploaded avatars.
  • bp_activity_type_part() function to return the name of the activity type template part.
  • edit the bp_activity_has_content() function to generate a richer content for activity types supporting the feature. For such activities the $activities_template global is extended adding a generated_content property to each activity in the loop having a type supporting the “generated-content” feature.
  • Introduce the bp_activity_generated_content_part() template tag which use the current activity generated_content property to output the requested information passed as the function parameter.

The new template tags introduced with current update:

  • bp_activity_the_content_body() to bypass the activity types template parts look up or to use this tag inside an activity types template part.
  • bp_activity_has_generated_content_part() is checking if the property of a generated content exists
  • bp_activity_generated_content_part() is outputing the the property of a generated content
  • bp_activity_get_generated_content_part() is returning the output after making sure it has been sanitized.

The new update will need theme developers to update the buddypress/activity/entry.php template if they have overridden it inside their themes.

PS: all screenshots were made using the BuddyX theme (WordPress 5.8.2 ).

#10-0-0, #activity

BP Dev-Chat Summary : January 5, 2022.

Some complementary explanations about the 9.2.0 release

@im4th started the meeting saying some words about this minor version which was released on January 3rd. The download spike (~39K downloads) was reached on January 4th. He apologized about the fact he took the decision quite in a rush without discussing about it during a dev-chat. He explained he wanted to have the BP Search Block released in the WordPress.org directory the soonest so that he could focus on the BP Rewrites feature as a plugin for the coming 15 days. 9.2.0 is including a change needed by the BP Search Block (activity search redirection support).

About BP Rewrites, @johnjamesjacoby wants to dive deeper into the plugin. @im4th said it was ok to delay its release after BuddyPress 10.0.0, if needed, as it’s a BP plugin. He also shared his opinion about a BP Core potential merge.

I believe it needs to stay an add-on for at least 2 major BuddyPress releases, there are too many plugins we need to make sure they still behave right before thinking about merging it into BP Core.

imath

Finishing the 10.0.0 Hello BuddyPress screen

If you’ve started testing the RC1 release (if not, do it now!), you already saw it has been finished (See #8605). During the chat, we’ve decided about the 10.0.0 features we want to highlight into this screen:

We also decided to release RC1 as soon as we could (it happened 2 days later) as we already postponed twice our schedule.

Last 10.0.0 schedule

  • 10.0.0-RC: January 7, 2022 🏁 ✅
  • 10.0.0 stable: January 17, 2022 🎯

Open floor

@dcavins has been using the 10.0.0-beta2 release on some decent traffic sites and it seems to be working well 💪 😎

@vapvarun brought up to our attention this support forum topic. Our discussion about it lead to an important decision for our next major release : if ! is_buddypress() no more BP Template Pack CSS/JS. @imath also wishes we use a more modular approach for our JavaScript assets as well as less/no dependency to jQuery.

Next Dev-Chat

It will happen on January 19 at 19:30 UTC in #BuddyPress. We should be able to check the first feedbacks about 10.0.0 😉

#10-0-0, #dev-chat, #summary

BP Dev-Chat Summary : December 15, 2021.

10.0.0-beta1 1st feedbacks

A theme related issue was posted into our support topic @dcavins gave some explanations of possible reasons for this issue and the reporter said he would ask the premium theme authors for support.

10.0.0 remaining tickets

  • @vapvarun will soon post a patch about #7540.
  • During the chat @im4th said he would work on #8088, #8589 and #8474. He fixed the 2 first and committed fixes about the third.
  • About #8604 @dcavins agreed suggested changes were making sense. The patch still needs to be built.

10.0.0 stable release tasks repartition

@dcavins wrote a codex page about alternative registration workflows and volunteered to take in charge the credits list and part of the « Hello BuddyPress 10.0.0 » screen.

10.0.0 schedule

  • 10.0.0-RC: TBD 👈
  • 10.0.0 stable: January 5, 2022 🎯

Next Dev-Chat

It will happen next week on December 22 at 19:30 UTC in #BuddyPress.

#10-0-0, #dev-chat, #summary

BP Dev-Chat Summary : December 8, 2021.

10.0.0 Progress

#8582 Add site membership requests

@dcavins fixed the multisite issues about the feature, @im4th confirmed the fixes made the feature works as expected on the WordPress multisite config. @dcavins decided to add complementary explanations about how the feature deals with multisite registration options. He committed the code yesterday and BuddyPress 10.0.0 is now offering a Site Membership Request feature 🙌. Congratulations to @dcavins 💪.

#8451 Extending no content activities with images and call of actions

@vapvarun brought some nice improvements about how we load activity types template part and also added some new layouts for “no-content” activities. @im4th still had to finish the Avatar Recycle UI so that users can reuse a previously uploaded avatar or permanently delete a previously uploaded avatar.

#8148 Extend WordPress Plugins screen to allow Admins to easily install features as a plugin

@johnjamesjacoby added the BP Beta Tester plugin to the BuddyPress WP.org user favorites so that we have a first BuddyPress Add-on into the new WP Admin “Add New” plugin screen. The ticket is now closed and we’ll soon be able to publish new add-ons like the BP Rewrites plugin to the WordPress.org Plugin directory. Here’s a preview of this new screen:

Other tickets needing attention

  • @vapvarun will have a look to #7540 to try to have it fixed before the 10.0.0 stable release.

10.0.0 schedule

We’re adding the very final touches to the first 10.0.0 beta release… get ready for it!

  • 10.0.0-beta1: in a few of hours 👈
  • 10.0.0 stable: January 5, 2022 🎯

Next Dev-Chat

It will happen next week on December 15 at 19:30 UTC in #BuddyPress.

#10-0-0, #dev-chat, #summary

BP Dev-Chat Agenda December 15, 2021

Hi!

Our development meeting will happen today (December 15 at 19:30 UTC) and of course in #BuddyPress. Here’s our agenda:

  • 10.0.0-beta1 testing results.
  • Decisions about keeping/bumping the 10.0.0 remaining tickets.
  • 10.0.0 stable release tasks repartition.

If you have specific/additional points you need to discuss about, please share them into the comments area of this post.

👋

#10-0-0, #agenda, #dev-chat

BP Dev-Chat Summary : December 1st, 2021.

10.0.0 Progress

#8582 Add site membership requests

@im4th tested the patch @dcavins updated lately and found some issues when BuddyPress is network activated on a WordPress Multisite configuration. In such a configuration, the site membership request feature is only available when the WordPress registration setting is “Logged in users may register new sites” (1) or “Registration is disabled” (2).

  1. In the first case (1), the request membership form includes a checkbox to request a site at the same time, and once the form is submitted the user receives an email to activate their account instead of the awaiting moderation email.
  2. In the second case (2), once the request membership form is submitted, an empty registration page is displayed and the site membership request is not created.

@dcavins is working on fixes about these two issues to have the feature ready for the BuddyPress 10.0.0-beta1 release.

#8451 Extending no content activities with images and call of actions

Great progress were made about this feature:

  • The BP Attachments API will include a new method to add file revisions. This is needed by the feature to keep an history of the uploaded profile photos so that generated activities always display the profile photo that was set when the activity was published.
  • The BP Template hierarchy will be improved so that it’s possible to override the layout of the activity content based on its activity type.
  • @im4th will try to add the needed adaptations to the Avatar Backbone views so that they includes a new tab to recycle or delete previously uploaded profile photos from history.
  • @vapvarun will work on the generated activity layouts to differentiate them according to the (no-content) activity types.

Other tickets/GitHub PR needing attention

Updated 10.0.0 schedule

We’ve updated the 10.0.0 schedule for the last time 😅. @dcavins alerted us about the comments on the Tavern’s post about our initial released date which was December 24, 2021. To avoid causing some stress to site administrators (and to the team ☺) during the christmas period, we’ve decided to postpone the release date to January 5, 2022. We also took this opportunity to give us one last week to add the final touches to the first 10.0.0 beta release.

  • 10.0.0-beta1: December 10, 2021 👈
  • 10.0.0 stable: January 5, 2022 🎯

Next Dev-Chat

It will happen next week on December 8 at 19:30 UTC in #BuddyPress.

#10-0-0, #dev-chat, #summary

BP Dev-Chat Summary : November 17, 2021.

10.0.0 Progress

The first thing we’ve discussed about was the scheduled date for the first beta release of BuddyPress 10.0.0. @im4th shared his concern about the fact he would not be able to test/review the latest improvements brought to the site request membership feature #8582 by @dcavins as well as the “no-content” activities patch @vapvarun was about to add to the ticket (#8451) before November 20 (beta1 initial scheduled date). He requested to use 2 more weeks before releasing beta1. Although @vapvarun was in favor of only adding 1 week, @im4th argued he was prefering to delay by 2 weeks once instead of by 1 week twice. @dcavins also thinks a 2 weeks delay is good and should help us to fix some other tickets.

New 10.0.0 schedule

  • 10.0.0-beta 1: ~ december 3, 2021 👈
  • 10.0.0 stable: ~ december 24, 2021 🎄
  • #8451 Extending no content activities with images and call to actions: @vapvarun announced he was about to submit a first patch about the feature.
  • #8582 Add site membership requests: we think we should use a new action link instead of links into a new WP List Table column to open the modal. @im4th will try to build an inline-edit feature using the BP REST API and we’ll be able to replace the modal link with the inline-edit one if it’s ready before first beta. @dcavins will also try to avoid adding an upgrade routine to edit the existing $wpdb->base_prefix . 'signups' table rows and use instead a new meta to differentiate site membership requests from signups. The last touch about the feature will be to update the list of BP Emails so that it includes the ones needed by the feature.
  • #8594 Legacy Widgets: next step before deprecation: @vapvarun shared his concern about it considering the number of downloads of the Classic Widget editor plugin. After checking the ticket’s patch and the plugin’s code, @im4th reassured @vapvarun telling him the legacy widgets would still be available for people using this plugin. He’ll do some more tests to be 100% sure about it.

Open floor

@im4th thinks we shouldn’t include more BP Blocks into BP Core and that we should start using standalone blocks and publish them into the WordPress.org Blocks directory (which is actually using the plugins directory). @dcavins thinks it’s an interesting idea. @vapvarun is not convinced (yet 😁) about it especially when considering these blocks are increasing the number of active plugins on sites. He thinks a Blocks collection plugin would be better. If you have an opinion about it, we’d be happy to read it as a comment of this post 😉.

Next Dev-Chat

It will happen on December 1st at 19:30 UTC in #BuddyPress. In the meantime we’d be happy to get your help about these tickets: please contribute to BuddyPress 🙏

#10-0-0, #dev-chat, #summary

BuddyPress Admin Tabs will look different in 10.0.0

Observing the WordPress Administration screens, we’ve noticed the ones using tabs (such as the Privacy Settings screen) had a page layout that started looking like the Site Heath Screen’s one. We thought applying this specific layout to our Settings and Tools Administration screens would improve their integration into your WordPress Administration.

The only variation we included is our beloved bright red logo before the title of the page 👇

BP Admin tabs screenshot
BP Admin Tabs’ next appearance

What happens to the custom tab my plugin is adding 😱?

If you are a BuddyPress plugin developer and added a custom tab to ours to let the site’s admin set your plugin’s options from the BuddyPress Settings screen, you might wonder what this change means for your plugin.

To make sure your custom tab/screen is still looking nice, we included some backward compatibility code to dynamically adjust your screen layout according to the new one 💪. You’ll simply find a notice into your screen when defining WP_DEBUG to true into your wp-config.php file.

Screenshot of the result of the backcompat script
Result of the backward compatibility code.

Please, update the way you add your custom tab 🙏

Below is the same screen as the above one using the new way to add custom tabs to the BuddyPress Settings/Tools screens. To be precise, it’s the BP Rewrites Admin screen 😉

Screenshot of tje BP Rewrites Admin Screen
BP Rewrites Admin Screen

We encourage you to progressively update your plugin’s code, thanks in advance 😍. All the needed steps are described into the BP Rewrites pull request we used to prepare it to BuddyPress 10.0.0.

  1. Reference your screen into the global variable BuddyPress uses to store the settings (or the tools) screens hooking to bp_admin_submenu_pages new action (see this code).
  2. Use the bp_core_get_admin_settings_tabs (or bp_core_get_admin_tools_tabs if you’re targetting the BuddyPress Tools screen) to let BuddyPress know about the link and text to use into the tab (see this code).
  3. Use the new bp_core_admin_tabbed_screen_header() function into the function you use to display your screen and replace the "wrap" class of your main container by "buddypress-body" (see this code)

That’s it 🏁

#10-0-0, #admin

BP Dev-Chat Summary : November 3, 2021.

10.0.0 Progress

#8451 Extending no content activities with images and call to actions

Preview of a no content activity
Preview of a richer “no content” activity about a group who has just changed its Group profile photo.

@vapvarun will soon share a patch about it on the ticket’s page. He decided to take the base64 encoded road to store previous profile photo/cover image inside an Activity meta.

@im4th & @dcavins suggested to include a way to avoid such activity types to be generated too often when a user changes these images multiple times in a short amount of time.

Writing the above lines, I believe the last activity should overwrite the previous ones. A 1 hour delay was suggested during the dev-chat.

#8582 Add site membership requests

@dcavins updated the patch attached to the ticket to remove all references to data stored inside the Users table. He also added a way to preview all signup/membership request information using a modal window.

A modal window to preview signup/membership request information

The modal window choice was debated with @im4th & @johnjamesjacoby. First concern is a11y: we need to check keyboard navigation to make sure everything’s fine with it. Second concern is the clumsiness of it into the WP Administration (old JS libraries, Ajax, etc..). @dcavins thought about an alternative way to reach the same result (be able to preview information) using a dynamic row like what’s included into the « inline edit » feature of the WP List Table class. @im4th believes it’s a nice idea and could be even more interesting if information could be edited from there. We might need to customize the feature for our need which can be too long for the remaining time we have until first 10.0.0 beta. @dcavins will give the modal window another thoughts before deciding whether to keep it or not.

Please help us progress about the site membership requests feature testing the last patch attached to this ticket: #8582.

#8588 use the “site-health” look & feel for BP Admin tabs

Preview of the 10.0.0 BP Settings Admin screens
Next BP Admin Settings/Tools screens look & feel!

@im4th asked for some feedbacks about it. @dcavins thinks it should be committed. @espellcaste thinks this is the kind of change regular BP users will enjoy. @im4th also shared a preview of the new BP Rewrites admin screen using these revamped Admin tabs. This improvement has since been committed, a developer note will soon be published to explain the changes introduced about adding custom tabs in 10.0.0.

Other interesting updates

10.0.0 schedule

  • 10.0.0-beta 1: ~ november 20, 2021,
  • 10.0.0 stable: ~ december 24, 2021 🎄

Next Dev-Chat

It will happen on November 17 at 19:30 UTC in #BuddyPress. We’ll be 3 days away from first beta release 😅. If you have specific points you want to discuss about during this next meeting, please share them into the comments area of this post.

#10-0-0, #dev-chat, #summary