EDITS.WS

Tag: buddypress

  • BuddyPress 12.0 to Introduce Community Visibility Feature that Restricts Access to Members Only

    BuddyPress 12.0 is set to introduce a new Community Visibility feature that gives site administrators the option to restrict access to the community sections of the site. Sites set to “members only” will show an access error message and a login form when a non-logged-in user tries to view a page generated by BuddyPress.

    The Community Visibility setting makes it possible to create a private community site without adding any plugins to BuddyPress, a feature that has frequently been requested by BuddyPress site admins. It is being introduced as a basic toggle but BuddyPress contributor David Cavins, who worked on the feature, said it lays the groundwork for future, more granular privacy controls.

    The BuddyPress core development team has also published the BP Classic plugin ahead of the 12.0 release. The plugin provides backwards compatibility for sites using plugins or themes that are not ready for the BP Rewrite API that will be introduced in 12.0. It includes features and templates that are fully deprecated:

    • The BP Legacy widgets (these were migrated as Blocks in BuddyPress 9.0.0).
    • The BP Default theme.
    • The BP Legacy navigation globals (buddypress()->bp_nav & buddypress()->bp_options_nav).

    An advisory about BP Classic was posted to the official BuddyPress blog to help site owners figure out if they will need this plugin. Those who require it before upgrading can install it ahead of time and it will be dormant until it is needed.

    The new Community Visibility feature was committed to trunk five days ago and is on track to be included in the next major release. BuddyPress 12.0 is anticipated to be released on October 30, 2023, and Beta 1 is overdue and expected any day.

  • BuddyPress to Host Virtual Contributor Day on April 20

    Representatives of the BuddyPress core team will be hosting a contributor day alongside the French WordPress Community Contributor Day in Paris on April 20, 2023. This in-person event has filled up its registration and posted its schedule already, but BuddyPress core developer Mathieu Viet is inviting people to join online to contribute to BuddyPress.

    “As we’re currently working on a very ambitious 12.0 release with the main goal of migrating from our Legacy URL parser to using the WordPress Rewrite API, there are many areas getting your contributions would really help us and make a huge difference,” Viet said.

    BuddyPress 12.0 is expected to be released May 31, 2023, and merging the BP Rewrites feature plugin into the core plugin will be a major change that impacts the entire BuddyPress ecosystem. The effort to migrate BuddyPress’ custom URI parser to use WordPress’ Rewrite API has been in the works for the past decade. Contributors will also be providing backwards compatibility via a new plugin called BP Classic that will contain BuddyPress’ legacy widgets. The virtual contributor day will organize code contributions towards these efforts.

    In addition to code, people can also contribute to documentation regarding how developers can prepare their themes and plugins to be ready for BP Rewrites, and documentation for end users on how the change will benefit their BuddyPress experience. Viet also intends to organize some common troubleshooting tips for the inevitable support forum requests that the major change will generate.

    The event will run from 08:15 UTC to 15:30 UTC. Although virtual attendees may miss out on the hot drinks and pastries, they can be equal participants by joining BuddyPress’ Slack channel and jumping in on one of the projects.

  • BuddyPress 11.0.0 Adds Filter for Improved JS and CSS Asset Loading, WebP Support, and New Ways to Fetch Activities

    BuddyPress 11.0.0 is now available thanks to the efforts of 34 contributors. The release is named “La Scala” in honor of a pizza restaurant located in Issy-Les-Moulineaux, a Paris suburb.

    Version 11.0.0 introduces a few important changes. BuddyPress has improved the way it loads its JavaScript and CSS assets with the addition of a new filter so that they are now only loaded on community pages. Previously, the plugin would load them indiscriminately on every page, a leftover from how they were loaded in the first Template Pack (BP Legacy). This change is being rolled out progressively, so users who want to take advantage of this improvement will need to add the filter to their bp-custom.php file.

    add_filter( ‘bp_enqueue_assets_in_bp_pages_only’, ‘__return_true’ );

    BP 11.0.0 also enables the use of use .webp images for profile and cover images, after a user requested it in a negative review. This feature requires WordPress 5.8 or newer.

    This release introduces the ability to fetch activities for or excluding a group of users. For example, developers can now write code to fetch activities for a select few users based on user ID or block updates from some annoying users by excluding their user IDs.

    “This change is simple but powerful!” BuddyPress core developer Dan Cavins said. “For instance, you could create custom interest activity streams, or build a mute feature to let your members take a break from other, too-chatty users!”

    Version 11.0.0 also gives developers the ability to build custom xProfile loops including a specific set of profile field groups.

    BuddyPress 10.0.0 introduced an add-ons section in the plugin administration screen for users to easily test plugins or blocks maintained by the BuddyPress development team and hosted on WordPress.org. BP lead developer Mathieu Viet said the team will soon be publishing a Community Media Attachments add-on and a block-based Activity Post Form that will “standardize the way to extend activity updates with richer and more engaging content.” These feature plugins are part of what Viet anticipates will be “a transitional year for BuddyPress” and may be published to the add-ons section independent of a major release.

    BuddyPress users should watch for updates to the add-ons section and check out the full list of changes in 11.0.0 in the BuddyPress codex. Updating to the latest version will require WordPress 5.7 or later.

  • BuddyPress 11.0.0 to Limit JavaScript and CSS Asset Loading to Community Pages Using a Filter

    BuddyPress will soon be improving the way it loads its JavaScript and CSS assets so that they are only loaded on community pages. Previously, the plugin would load them indiscriminately on every page.

    BuddyPress lead developer Mathieu Viet said he’s not sure there is a specific reason explaining why this was kept in place. Before the plugin introduced the BP Theme Compat API in version 1.7, it was necessary to use a BuddyPress compatible theme like the one bundled by default (BP Default).

    “I think we kept the way this theme was loading these assets into the first Template Pack (BP Legacy) we added to BuddyPress,” Viet said.

    Users have often requested BuddyPress only load its assets on community pages in hopes of further optimizing their websites. For example, in 2020, a user on the BuddyDev forums requested custom code to accomplish this. Experts recommended against doing it

    “It is not going to help you much and will cause a lot of issues in future,” BuddyPress contributor Brajesh Singh said. “There are dependent plugins which may start throwing JavaScript errors and breaking some of your site functionality. It is not worth the effort.”

    Singh recommended the user enable browser caching to avoid loading the assets multiple times and stick to best practices for enabling gzip compression and other optimization measure. He also recommended adding a plugin that would conditionally prevent loading BuddyPress on certain pages.

    Coming in version 11.0.0, BuddyPress core will progressively move towards loading only the assets it needs in community areas. This update will still load JS and CSS everywhere but will offer a filter that users can add to their bp-custom.php files in order to keep BP assets on community pages only:

    add_filter( ‘bp_enqueue_assets_in_bp_pages_only’, ‘__return_true’ );

    “If using the above filter, you notice something is going wrong with your website due to the use of a specific BP plugin or theme, report it here and we’ll then have another development cycle to fix things before we completely restrict these assets to BuddyPress generated pages in a second step in version 12.0.0,” Viet said.

    Version 11.0.0 is expected to be released on December 14, 2022. Early adopters and BuddyPress site owners who have always wished for the plugin to behave this way can take advantage of it after the next major update using the filter. The filter can also be easily removed if users are troubleshooting and having issues with plugins.