活动 → 提及

活动 → 提及

Codex Home → Member Guide → Activity → Mentions
Activity → Mentions

This page shows all the @ mentions you received throughout the site.
Filter to Show @mentions in:

Everything (default)
Updates
New Sites (if on Multisite installation)
Posts
Comments
Friendships (if Friendships are enabled)
New Groups (if Groups are enabled)
Group Memberships (if Groups are enabled)
Group Updates (if Groups are enabled)

⇒ Next: Activity → Favorites
⇐ Previous: Activity → Personal
⇐ Back to Member Guide

设置 → 删除帐户

设置 → 删除帐户

Codex Home → Member Guide → Settings → Delete Account
Settings → Delete Account

This is where you can delete your account in the site, if account deletion was enabled by the Site Admin. Note that deleting your account will delete all the content you have created in the site. Those will be completely irrecoverable.

⇐ Previous: Settings → Profile Visibility
⇐ Back to Member Guide

群组类型

群组类型

Codex Home → Developer Resources → Group Types
Group Types

BuddyPress 2.6 introduced the concept of group types. This functionality is outlined below.
Registering group types
BuddyPress itself does not register any group types. Plugins and themes can register group types using the bp_groups_register_group_type() function:
function my_bp_custom_group_types() {
bp_groups_register_group_type( 'team', array(
'labels' => array(
'name' => 'Teams',
'singular_name' => 'Team'
),

// New parameters as of BP 2.7.
'has_directory' => 'teams',
'show_in_create_screen' => true,
'show_in_list' => true,
'description' => 'Teams are good',
'create_screen_checked' => true
) );
}
add_action( 'bp_groups_register_group_types', 'my_bp_custom_group_types' );

The first parameter of bp_groups_register_group_type() is a string identifier for the group type, used internally by BP as the canonical name of the type. This name should be unique. The second parameter is a list of generic config arguments (see Configuration Arguments section for full details).
Registering a group type will also enable a meta box so administrators can set a groups』s type when editing a group in the WP admin dashboard.
Configuration Arguments

'labels' (available as of BP 2.6)
An array consisting of the 'name' and 'singular_name' keys. 'name' is for the plural form of the group type.

'has_directory' (available as of BP 2.7)
If this argument is passed (eg. 『ninja』), a list of members matching the group type will be available as a filter from the Groups Directory page. (eg. http://example.com/groups/type/ninja/. You can pass any string to customize the URL for the group type』s directory.) Default: false.

'show_in_create_screen' (available as of BP 2.7)
If set to true, the group type will be selectable during group creation and when a group administrator is on the group』s 「Manage > Settings」 page. Default: false.

'show_in_list' (available as of BP 2.7)
If set to true, the group type will be shown when the bp_group_type_list() function is used by default. Currently, the group type list is shown when on a group page. This defaults to true if 'show_in_create_screen' is set to true. Default: null.

'description' (available as of BP 2.7)
Used to describe the group type. If this is passed, this is currently shown on the group creation screen to describe the group type.

'create_screen_checked' (available as of BP 2.7)
If the 'show_in_create_screen' argument is set to true, this argument will toggle the checkbox for our group type so it is checked by default during the group creation process. This is handy if you wanted to imply that the group type should be enforced, but the decision ultimately lies with the group creator. Default: false.

Querying by group type
A common task is to retrieve a list of groups of a given type (or set of types). bp_has_groups() and BP_Groups_Group::get() accept a 'group_type' parameter, which can be a single group type or an array/comma-separated list of group types. This will filter query results to those groups matching the type. Example:
// Fetch all teams and companies.
$group_args = array(
'group_type' => array( 'team', 'company' ),
);
if ( bp_has_groups( $group_args ) ) { // ...

Fetching and setting group types
When BuddyPress detects that group types have been registered, it will display a Group Type metabox when editing a group』s page in Dashboard > Groups. Administrators can use this interface to view or change a groups』s type.
BuddyPress also provides simple functions for fetching and setting group types programatically. To get the group type of a group, use bp_groups_get_group_type():
// Get the group type of group 5412.
$group_type = bp_groups_get_group_type( 5412 );

Set a group』s type using bp_groups_set_group_type():
// Set the group type of group 5412 to 'team'.
$group_type = bp_groups_set_group_type( 5412, 'team' );

活动 → 收藏夹

活动 → 收藏夹

Codex Home → Member Guide → Activity → Favorites
Activity → Favorites

This is a list of all the items (posts, comments, friendships, etc.) you have 「favorited」 in your Groups』 Activity Streams, the Sitewide Activity Stream, or even your own Personal Activity Stream.
Filter to Show 「favorited items」 in:

Everything (default)
Updates
Posts
Comments
New Groups (if Groups are enabled)
Group Memberships (if Groups are enabled)
Group Updates (if Groups are enabled)
Topics (if bbPress is activated)
Replies (if bbPress is activated)

⇒ Next: Activity → Friends
⇐ Previous: Activity → Mentions
⇐ Back to Member Guide

WordPress 版本兼容性

WordPress 版本兼容性

Codex Home → Getting Started → WordPress version compatibility
WordPress version compatibility

BuddyPress shines brightest when run on the newest available version of WordPress – we optimize for the latest and greatest. For this reason, the BuddyPress team strongly recommends that all WordPress installations be kept up to date. However, we strive to maintain support for a number of legacy WordPress versions – generally, four or five major versions.
Near the beginning of each development cycle, we reassess BuddyPress』s minimum required WP version. Our rough guidelines are as follows:

If a WordPress version became obsolete over a year ago, it』s a candidate for removal. See https://wordpress.org/news/category/releases/ for a list of WP release dates.
If a WordPress version』s use slips below 5% of all WP installations, it』s a strong candidate for removal. See https://wordpress.org/about/stats/ for information about WordPress version usage.

What do we mean when we say that BP 「supports」 a given version of WordPress? Roughly:

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

By extension: When we 「drop support」 for a version of WordPress, it means we stop including it in our builds, stop answering support questions related to that specific WP version, and stop putting function_exists() checks (and the like) targeting that version when building new BP features. Dropping support does not mean that we will actively try to break older versions of WP

⇐ Getting Started

活动嵌入

活动嵌入

Codex Home → Activity Embeds
Activity Embeds

Intro
WordPress added oEmbed provider support in v4.4.0, allowing users to easily embed posts by copying a WordPress post URL and pasting it into the WordPress editor.
WordPress 4.5.0 made further enhancements to the embed template for easier customization for theme developers.
In BuddyPress 2.6.0, we are piggybacking off this functionality and enabling oEmbed provider support for single activity item.
This means you will be able to embed single activity items by copying the activity permalink and pasting it into the WordPress editors.
For example:
Your WordPress version is 4.5 or higher, you can enjoy the Activity Embeds feature we』re introducing in BuddyPress 2.6!https://videopress.com/v/VwVrGm7a?hd=1– Paul Gibbs (@djpaul) June 15, 2016

This feature will require WordPress 4.5+.
Disabling Activity Embeds
If you do not want your BuddyPress site to have activity embeds enabled, you can disable the feature with this small code snippet:
add_filter( 'bp_is_activity_embeds_active', '__return_false' );
Media in Activity Embeds
If an activity item includes a URL from a registered WordPress oEmbed provider on its own line:
https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F
We will attempt to display an image and caption of that oEmbed item in the activity embed template.
If a URL from a registered WordPress oEmbed provider isn』t found, we will attempt to embed an inline audio or video URL using your browser』s native HTML5 player.
Information for Theme Developers
As a theme developer, if you do not like the default look of activity embeds, you can override any of the template parts located at /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/assets/embeds/ by copying them to your theme』s directory.
Let』s say I want to make some tweaks to the activity header embed template part, copy /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/assets/embeds/header-activity.php to /wp-content/themes/YOUR-THEME/buddypress/assets/embeds/header-activity.php and make your changes.
If you want to override the CSS, copy /wp-content/plugins/buddypress/bp-templates/bp-legacy/css/embeds-activity.min.css to /wp-content/themes/YOUR-THEME/buddypress/css/embeds-activity.min.css or /wp-content/themes/YOUR-THEME/css/embeds-activity.min.css and make your changes.
If you have WP_DEBUG turned on, then omit the '.min' suffix.
Note: CSS is rendered inline in the tag. This is similar to what WordPress is doing in their embed template.
Information for Template Pack developers
If you do not know what a template pack is, you do not need to read this section!
As of BuddyPress 2.6, if you are developing a custom template pack that is not bp-legacy, for activity embeds to display properly, you will need to copy the following to your template pack』s directory:

/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/assets/embeds/
/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/embeds-activity.css
/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/embeds-activity-rtl.css
/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/embeds-activity.min.css
/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/embeds-activity-rtl.min.css

There is a proposal to eliminate this copying process in future versions. Keep an eye on the following ticket for more info:
https://buddypress.trac.wordpress.org/ticket/7116
Information for Plugin Developers
In order for oEmbed to work with BuddyPress activity items, we register a custom endpoint with the WordPress oEmbed REST API:
example.com/wp-json/oembed/1.0/embed/activity?url=URL_TO_ACTIVITY_ITEM
As well as supporting the regular oEmbed parameters like url, format and maxwidth:
http://oembed.com/#section2.2
The BP Activity oEmbed endpoint also supports the hide_media parameter.
If this is set during the oEmbed request, no media items will be displayed in the embed.

通知 → 未读

通知 → 未读

Codex Home → Member Guide → Notifications → Unread
Notifications → Unread

This screen lists all the notifications that you received which you either have not read or marked as already read.
You have the option to delete the notifications one by one or in bulk. Any notification that you mark as 「Read」 or open up to read is automatically moved to the Notifications → Read page.
You can filter the order of this list: Newest First (default) or Oldest First.

⇒ Next: Notifications → Read
⇐ Previous: Profile → Change Profile Photo
⇐ Back to Member Guide

设置 → 电子邮件

设置 → 电子邮件

Codex Home → Member Guide → Settings → Email
Settings → Email

This page is where you can opt out or opt back in to receiving email notifications for the following:

Activity: A member mentions you in an update using 「@admin」
Activity: A member replies to an update or comment you』ve posted
Messages: A member sends you a new message
Friends: A member sends you a friendship request
Friends: A member accepts your friendship request
Groups: A member invites you to join a group
Groups: Group information is updated
Groups: You are promoted to a group administrator or moderator
Groups: A member requests to join a private group for which you are an admin

⇒ Next: Settings → Profile
⇐ Previous: Settings → General
⇐ Back to Member Guide

通知 → 已读

通知 → 已读

Codex Home → Member Guide → Notifications → Read
Notifications → Read

This page lists all the notifications that you have either opened up to read or marked as already read.
You have the option to delete the notifications one by one or in bulk. Any notification that you mark as 「Unread」 is automatically moved to the Notifications → Unread page.
You can filter the order of this list: Newest First (default) or Oldest First.

⇒ Next: Messages → Inbox
⇐ Previous: Notifications → Unread
⇐ Back to Member Guide