PHP 版本支持

PHP 版本支持

Codex Home → Getting Started → PHP version support
PHP version support

BP supports the latest versions of PHP
BuddyPress supports all stable versions of PHP officially supported by the PHP project.
For the best security and performance, site admins are strongly encouraged to run the latest stable PHP.
BuddyPress 6.0.0 will require at least PHP 5.6
Legacy PHP support
In addition to the official supported releases, BuddyPress maintains support for a number of legacy PHP versions.
Justification for legacy support
Like WordPress, BuddyPress is meant to be easy to install and use on a large number of hosting environments. The statistics collected on wordpress.org indicate that a large number of WordPress installations continue to be hosted on out-of-date versions of PHP. (The stats breakdown for BuddyPress installations shows a similar spread.) For certain legacy versions, dropping support in a backward-incompatible way would break tens of thousands of websites. We choose not to be so strict that a majority of BP installations cannot run the software.
How we decide
At the beginning of each major development cycle (roughly three times per year), the BuddyPress team decides on the minimum PHP version that will be supported by the following major release. Thus, at the beginning of the 2.7 cycle, decisions are made about support in 2.8. This gap allows enough time for deliberation as well as for developer outreach.
The following considerations are weighed in the decision about whether to drop support for a legacy PHP version:

Usage – When a legacy version of PHP drops below a certain percentage of total installations – as gauged by the publicly available stats or by more BuddyPress-specific numbers reported by the wordpress.org team – it becomes a candidate for removal. The rule-of-thumb threshold for consideration is 5% of modern (say, 2.0+) BuddyPress installations.
Benefits – Some versions of PHP have introduced more significant features than others. If dropping support for a given version of PHP would allow for vastly improved development practices, removing support for that version will be a higher priority.

These are rough guidelines. In some cases, it may be worth obsolescing thousands of sites because the downsides of supporting the legacy version are so great. In others, the practical benefits of increasing our minimum version may be so minimal that it』s not worth breaking any sites at all.
Decisions will be made by the core team during a regularly scheduled dev chat.
What does 「support」 mean?
When we say that BuddyPress 「supports」 a version of PHP, we mean the following:

BuddyPress should run error-free (ie, without fatal errors or PHP notices) on the PHP version.
If a new version of BP includes a feature that requires a more recent version of PHP, the feature should be gracefully disabled on earlier PHP versions.
The PHP version will be included in our automated testing build matrix.

By extension: When we 「drop support」 for a legacy version of PHP, it means we stop including it in our builds, stop answering support questions related to that specific PHP version, and stop putting function_exists() checks (and the like) targeting that version when building new BP features.

BuddyPress 2.8 需要 PHP 5.3+

BuddyPress 2.8 需要 PHP 5.3+

Codex Home → Getting Started → BuddyPress 2.8 requires PHP 5.3+
BuddyPress 2.8 requires PHP 5.3+

Starting with version 2.8, the minimum version of PHP required to run BuddyPress is 5.3.
Why the change?
PHP is the server-side programming language that powers WordPress and BuddyPress. Old versions of PHP are potentially unstable and insecure, and are missing some features that can be used to make BuddyPress faster and more powerful. The change is especially marked with the jump from PHP 5.2 to PHP 5.3, and the BuddyPress team has decided that now is the time to make the move.
Site administrators are strongly encouraged to run the latest stable version of all server software, including PHP.
See our PHP version compatibility guidelines for more details on how BP』s PHP version support is determined.
Am I affected?
Starting with version 2.7, BuddyPress creates a notice in the Dashboard if it detects that your installation doesn』t meet the minimum requirements for version 2.8+. If you reached this page via this kind of notice, then your server needs to be upgraded.
You can also check your PHP version using your hosting tools. For example, here is a tutorial from InMotion Hosting on using cPanel to view your PHP version.
How do I upgrade PHP?
Most popular webhosts have an interface for changing PHP version. Check your host』s documentation or support for more details. A few examples:

SiteGround
GoDaddy
Bluehost
DreamHost
HostGator

When in doubt, contact your host』s support.
What will happen if I don』t upgrade PHP?
BuddyPress 2.8 and later are completely incompatible with PHP 5.2: activating the plugin on an unsupported version of PHP will result in fatal errors.
BuddyPress 2.7 includes PHP version detection. If BP 2.7 detects that you are running PHP 5.2, it attempts to prevent you from upgrading to BP 2.8+ via all the normal WordPress upgrade paths (like Dashboard > Plugins). In this situation, your site will run BP 2.7.x until PHP has been upgraded.

模板更新 2.7

模板更新 2.7

Codex Home → BuddyPress Theme Development → Updating Custom Themes For New Functionality → Template Updates 2.7
Template Updates 2.7

In BuddyPress 2.7 we introduce some new features that specifically require template adjustment.
These changes are of importance for theme developers who may have overloaded the templates to the themes directory and these will need to be updated from the details here. If you are simply inheriting templates then there is no need to worry. Do note however some updates are not critical but are enhancements theme developers might like to carry through to their templates.
Changes for this release are:

Directory search form include part
Groups admin manage screens
Search form for groups manage members screens
Improve group manage members screen.
Group Type front-end integration
Templates heading element changes

Directory Search Form (Trac #6844)
We introduced a new folder for themes to hold common shared parts; in this we have added a revised copy of the directories search form that is included into all main directory component screens.
This is not a breaking change; if you choose not to update templates the search elements will function normally.
Files needing updating are:

buddypress/activity/index.php
buddypress/members/index.php
buddypress/groups/index.php
buddypress/blogs/index.php

If you need to make changes to the shared search form, create a new folder in your /buddypress/ or /community/ directories named common/search/ and copy in the new file from bp-legacy then modify.
In all of the above files, locate the search form block and replace with

Groups Admin Manage Screens (Trac #7079 )
groups/single/admin.php is now broken out by admin screen for ease of editing and overriding indivdual screens.
Although no changes are required, as there is no appreciable change other than convenience for developers, you might like to examine groups/single/admin.php & single/admin/ to see the changes and perhaps copy over.

Search Form for Groups Manage Members Screens (Trac #6385)
Adds search capability to the admin manage members screen.

groups/single/admin.php

If you』ve added the new bp_before_group_admin_form action to groups/single/admin.php, and have not overridden bp-legacy/buddypress-functions.php, then a search form will be added above the manage members list. If you have overridden bp-legacy/buddypress-functions.php, see the changeset for implementation details.

Groups Manage Members Lists (Trac #7105)
This update improves the structure of list items to more closely match members-loop.php.
Although this isn』t a breaking change you may like to update any overloaded templates for this improvement.

groups/single/admin/manage-members.php

Replace the blocks beginning

and ending before the final endif before start of new bp-widget div block with the one below in respective order:
Admins loop

15, ‘group_role’ => array( ‘admin’ ), ‘page_arg’ => ‘mlpage-admin’ ) ) ) : ?>

  • 1 ) : ?>
    <a class="button confirm admin-demote-to-member" href="”>

Mods loop

15, ‘group_role’ => array( ‘mod’ ), ‘page_arg’ => ‘mlpage-mod’ ) ) ) : ?>

  • <a href="” class=”button confirm mod-promote-to-admin”>
    <a class="button confirm mod-demote-to-member" href="”>

General members loop

15, ‘exclude_banned’ => 0 ) ) ) : ?>

    <li class="”>

    <?php
    if ( bp_get_group_member_is_banned() ) {
    echo ' ‘;
    _e( ‘(banned)’, ‘buddypress’ );
    echo ‘
    ‘;
    } ?>

    <a href="” class=”button confirm member-unban” title=””>

    <a href="” class=”button confirm member-ban”>
    <a href="” class=”button confirm member-promote-to-mod”>
    <a href="” class=”button confirm member-promote-to-admin”>

    <a href="” class=”button confirm”>

Group Type Front-End Integration ( Trac #7210 )
This feature updated and extended the work done on establishing a group type taxonomy in 2.6; it provides for front-end integration of type selection and management in the group creation steps & the manage settings screens.
In this release two new template tags are added that display all group types on a groups loop display & the current group type(s) on a single group screen. The following templates need updating:

groups/create.php
groups/groups-loop.php
groups/single/admin.php
groups/cover-image-header.php
groups/group-header.php

create.php: in the create step 2 screen we display a list of group types to select from. The markup below needs to be copied after the privacy options block and before the group invitations on screen 2 although you can move this where you need it.

true ), ‘objects’ ) ): ?>

<label for="name ); ?>”><input type="checkbox" name="group-types[]" id="name ); ?>” value=”name ); ?>” /> labels[‘name’] ); ?>
description ) ) {
/* translators: Group type description shown when creating a group. */
printf( __( ‘– %s’, ‘buddypress’ ), ‘‘ . esc_html( $type->description ) . ‘‘ );
}
?>

groups-loop.php: In the groups-loop template we have a template tag to display a group directory message. This block would be copied to a position just before the bp_has_group() query:

admin.php / group-settings.php: In 2.7 we split the admin manage file into separate includes so the block below is either copied just before the group-create-invitation fieldset or simply copy over the newer template parts to your theme.

true ), ‘objects’ ) ): ?>

<label for="name ); ?>”>
<input type="checkbox" name="group-types[]" id="name ); ?>” value=”name ); ?>” name ) ); ?>/> labels[‘name’] ); ?>
description ) ) {
printf( __( ‘– %s’, ‘buddypress’ ), ‘‘ . esc_html( $type->description ) . ‘‘ );
}
?>

cover-image-header.php & group-header.php: both these header files get a new template tag for displaying the group type for that group. Copy the tag below to the #item-header-content div or position of your choice.

Template Heading Element Changes
In 2.7 we have adjusted many of the heading elements used to effect a better and proper document outline structure and improved accessibility.
This is more an advisory notice as the styling of these element has been adjusted in the default BP stylesheets to minimize the visual change.
There may be cases where themes have overloaded BP stylesheets but not templates in which case those developers may want to check through the various headings for any necessary styling updates required, e.g. font-size changes.

BuddyPress 提交訪問

BuddyPress 提交訪問

Codex Home → BuddyPress commit access
BuddyPress commit access

What is commit access?
The code that comprises BuddyPress is written by volunteers. Anyone who wants to suggest an improvement or a bugfix to the BP codebase is welcome to do so, by submitting their proposed changes to our Trac site.
The ability to add patches directly to BuddyPress is limited to those with commit access to the BP Subversion repository. Committers are individuals who have demonstrated, through ongoing contribution to the codebase and the BuddyPress community, a deep understanding of the codebase as well as the project ethos.
What is the role of a committer?
The primary duty of a committer is to assist community members with their code contributions to the project, through code review, technical consultation, and committing patches. When reviewing contributions, a number of different kinds of considerations should be weighed. First, the technical merits of a proposed change: performance, security, architectural and stylistic coherence with the rest of the codebase, etc. Just as important are the strategic and philosophical appropriateness of a contribution – whether it moves us closer to project goals, and so forth.
The BP project is proud of its collaborative nature. Most large architectural decisions in BuddyPress are made by rough consensus, and peer code review is an important part of the project culture. However, committers have the right to make final decisions about most issues: commit access means that you don』t need permission to make changes to BuddyPress. In cases where committers cannot come to consensus about technical decisions, the lead developers may serve as tiebreakers.
How are committers chosen?
Individuals may be nominated for guest commit access by any current committer. Nominations are reviewed by existing committers, with lead developers serving as the final decision makers. Guest committers may be offered permanent commit status at the discretion of the team.
Current committers
The following contributors have commit access to BuddyPress: John James Jacoby, Paul Gibbs, Boone Gorges, r-a-y, Mathieu Viet, mercime, Hugo Ashmore, David Cavins, Michael Beckwith, Slava Abakumov, Stephen Edgar and Laurens Offereins.

BuddyPress 發布負責人和副手

BuddyPress 發布負責人和副手

Codex Home → BuddyPress Release Leads and Deputies
BuddyPress Release Leads and Deputies

The release lead works with all contributors to ensure the success of the release. The role blends aspects of being a product manager, project manager, engineering manager, release manager, and community manager. Release leads do not need to be developers, but having experience contributing to open source projects is required.
Release leads are supported by the lead developers, the project team, and deputies of their choosing. Volunteering as a release deputy is a great way to give it a try and learn about the process, but with a smaller time commitment.
For the sake of clarity, BuddyPress release leads and their deputies, between them, can expect to:

Run our weekly project meeting, and write and publish meeting notes on our development blog.
Coordinate blog posts and announcements on social media.
Make final decisions about whether a proposed feature is able to be put into the release.
Help new contributors make their contributions seen and heard in project meetings.

While BuddyPress is built by people volunteering their own time, contributing whatever they want, however they want, the release lead should take advantage of their position and use it to shape BuddyPress. For example, if the release lead feels that the next release should have a focus on specific aspects, we expect them to declare this, and try to encourage regular contributors to make that a reality.

Twenty Seventeen 二〇一七主題

Twenty Seventeen 二〇一七主題

Codex Home → BuddyPress Theme Development → BP Theme Compatibility and the WordPress Default Themes → Twenty Seventeen Theme
Twenty Seventeen Theme

To change Twenty Seventeen』s default two-column layout to a full width layout as seen in the image above, add the following code to the `functions.php` file of your Twenty Seven child theme:
?12345678910// Remove the page-two-column CSS class from the body class in BuddyPress pagesfunction bp_remove_two_column_body_class($wp_classes) {    if( function_exists ( ‘bp_loaded’ ) && !bp_is_blog_page() ) :        foreach($wp_classes as $key => $value) {             if ($value == ‘page-two-column’) unset($wp_classes[$key]);        }    endif;    return $wp_classes;}add_filter(‘body_class’, ‘bp_remove_two_column_body_class’, 20, 2);

BuddyPress 案例研究

BuddyPress 案例研究

Codex Home → Getting Started → BuddyPress Case Studies
BuddyPress Case Studies

 
Twcfit – Fitness

Article: Total Wellness Challenge: Fitness with BuddyPress
Author: Tara Claeys
BuddyPress Site: Total Wellness Challenge

Nefisyemektarifleri – Turkish Recipes

Article: Largest Turkish Recipe Site Spiced Up with BuddyPress
Author: Mustafa Uysal
BuddyPress Site: NefisYemekTarifleri.com

Naturkontakt – Environmental NGO

Article: Naturkontakt, Organising Sweden』s Largest Environmental NGO
Author: Alexander Berthelsen
BuddyPress Site: Naturkontakt (private)

StudentsNepal – Education Portal

Article: Building Bridges between Students and Educators in Nepal
Author: Arjun Bhattarai
BuddyPress Site: StudentsNepal.com

BuddyPress Hooks 掛鉤 – 操作和過濾器

BuddyPress Hooks 掛鉤 – 操作和過濾器

Codex Home → Developer Resources → BuddyPress Hooks – Actions & Filters
BuddyPress Hooks – Actions & Filters

Attached are links to PDFs listing the BuddyPress Actions and Filters as of BuddyPress 2.8.2
BuddyPress Action Hook
BuddyPress Filters (add_filter)
BuddyPress Filters (apply_filters)

「Nouveau」 群組邀請用戶界面

「Nouveau」 群組邀請用戶界面

Codex Home → Getting Started → User Submitted Guides → A 「Nouveau」 Group Invites User Interface
A 「Nouveau」 Group Invites User Interface

「Nouveau」 is the name of the new Template Pack bundled within the 3.0.0 release of BuddyPress. You can activate it from the BuddyPress Options Administration screen. 「Nouveau」 comes with some new Backbone.JS based User Interfaces and one of them, the Group Invites UI, is experimenting an alternative way to deal with single group invites. In short: it』s always possible to invite community members when 「Nouveau」 is the selected Template Pack!
Selecting Members to invite.

The Group Invites UI uses a dynamic tabbed interface to help you choose the members you want to invite into your existing or your new group. If the Friends component is active, you』ll find 2 tabs 「My Friends」 and 「All Members」 to perform this selection. Otherwise you will always find at least the 「All Members」 tab.

To add a new member to your group invites, you need to click on the 「+」 icon. Once done, a new tab named 「Send Invites」 is dynamically added under the others. It contains a counter to inform you about the number of members you added to your invites list.

If you added a member by mistake, you can remove him from the list clicking on the 「x」 icon.

You can switch between tabs at anytime to select the members or friends you need to invite into your group, you won』t lose the members you already selected.

If your community is large, you can use the search field to filter the displayed members.

When your selection is ready, click on the 「Send Invites」 tab to send your invites to the selected members. If you realize at this point you don』t want to invite 「Laurent」, just click on his avatar to remove him from your invites list. If you want to explain why the invited members should join your group, you can add a message to your invite. Oh and don』t forget to click on the 「Send」 button to actually send the invites !!
Checking for pending invites.

When a group has pending invites you can check it to see if one of your friends is already invited. Oh by the way, if you don』t find a specific member into the 「My Friends」 or 「All Members」 tab, there』s a good chance you』ll find him into these pending invites or into the existing Group Members
Putting all screens together

Video Playerhttps://cldup.com/ubTOhLK6EX.mp400:0000:0000:00Use Up/Down Arrow keys to increase or decrease volume.
 
Restricting the user listed into the 「All Members」 tab
Any member can choose to disappear from the 「All Members」 tab at anytime from their 「Group Invites」 settings profile page.

If you are the site owner, you can also completely disable the 「All Members」 tab by using the following code into your bp-custom.php file :
add_filter( ‘bp_nouveau_groups_disallow_all_members_invites’, ‘__return_true’ );

版本編號

版本編號

Codex Home → Getting Started → Version numbering
Version numbering

Beginning with version 4.0.0 (#7710), BuddyPress releases are numbered according to a slightly modified version of Semantic Versioning (SemVer).

As in SemVer, BuddyPress version numbers follow the MAJOR.MINOR.PATCH format, where:

MAJOR releases are those that include major new features, and may incorporate backward-incompatible API changes. We make an effort to document such changes on our dev blog https://bpdevel.wordpress.comMINOR releases include backward-compatible bug fixes and minor functionalityPATCH releases include backward-compatible bug fixes or security fixes only

Prior to 4.0.0, BuddyPress releases followed WordPress』s MAJOR.MINOR format, where MAJOR is a one-place decimal (of the format x.y, such as 2.8) that represents new features, and MINOR is .z (such as 2.8.1) that includes bug fixes only.