Functions

__()

__($text, $domain = 'default'
package BuddyPress

Parameters

$text

$domain

__n()

__n($singular, $plural, $count, $domain = 'default'
package BuddyPress

Parameters

$singular

$plural

$count

$domain

Injects specific BuddyPress CSS classes into a widget sidebar.

_bp_core_inject_bp_widget_css_class(array $params) : array

Helps to standardize styling of BuddyPress widgets within a theme that does not use dynamic CSS classes in their widget sidebar's 'before_widget' call.

package BuddyPress
since 2.4.0
access private
global array $wp_registered_widgets Current registered widgets.

Parameters

$params

array

Current sidebar params.

Returns

array

Temporary implementation of 'bp_moderate' cap.

_bp_enforce_bp_moderate_cap_for_admins(array $caps = array(), string $cap = '', integer $user_id = 0, array $args = array()) : array

In BuddyPress 1.6, the 'bp_moderate' cap was introduced. In order to enforce that bp_current_user_can( 'bp_moderate' ) always returns true for Administrators, we must manually add the 'bp_moderate' cap to the list of user caps for Admins.

Note that this level of enforcement is only necessary in the case of non-Multisite. This is because WordPress automatically assigns every capability - and thus 'bp_moderate' - to Super Admins on a Multisite installation. See \WP_User::has_cap().

This implementation of 'bp_moderate' is temporary, until BuddyPress properly matches caps to roles and stores them in the database.

Plugin authors: Please do not use this function; thank you. :)

package BuddyPress
since 1.6.0
access private
see

Parameters

$caps

array

The caps that WP associates with the given role.

$cap

string

The caps being tested for in WP_User::has_cap().

$user_id

integer

ID of the user being checked against.

$args

array

Miscellaneous arguments passed to the user_has_cap filter.

Returns

array$allcaps The user's cap list, with 'bp_moderate' appended, if relevant.

Backward compatibility for 'last_activity' usermeta fetching.

_bp_get_user_meta_last_activity_warning(null $retval, integer $object_id, string $meta_key, boolean $single) : string | null

In BuddyPress 2.0, user last_activity data was moved out of usermeta. For backward compatibility, we continue to mirror the data there. This function serves two purposes: it warns plugin authors of the change, and it returns the data from the proper location.

package BuddyPress
since 2.0.0
since 2.9.3 Added the `$single` parameter.
access private For internal use only.

Parameters

$retval

null

Null retval value.

$object_id

integer

ID of the user.

$meta_key

string

Meta key being fetched.

$single

boolean

Whether a single key is being fetched (vs an array).

Returns

stringnull

Remove WP's canonical redirect when we are trying to load BP-specific content.

_bp_maybe_remove_redirect_canonical() 

Avoids issues with WordPress thinking that a BuddyPress URL might actually be a blog post or page.

This function should be considered temporary, and may be removed without notice in future versions of BuddyPress.

package BuddyPress
since 1.6.0

Remove WP's rel=canonical HTML tag if we are trying to load BP-specific content.

_bp_maybe_remove_rel_canonical() 

This function should be considered temporary, and may be removed without notice in future versions of BuddyPress.

package BuddyPress
since 1.6.0

_bp_mock_mailer()

_bp_mock_mailer($class) 
package BuddyPress

Parameters

$class

_bp_mock_mailer()

_bp_mock_mailer($class) 
package BuddyPress

Parameters

$class

Sort BuddyPress nav menu items by their position property.

_bp_nav_menu_sort(array $a, array $b) : integer

This is an internal convenience function and it will probably be removed in a later release. Do not use.

package BuddyPress
access private
since 1.7.0

Parameters

$a

array

First item.

$b

array

Second item.

Returns

integerReturns an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

Rehook maybe_redirect_404() to run later than the default.

_bp_rehook_maybe_redirect_404() 

WordPress's maybe_redirect_404() allows admins on a multisite installation to define 'NOBLOGREDIRECT', a URL to which 404 requests will be redirected. maybe_redirect_404() is hooked to template_redirect at priority 10, which creates a race condition with bp_template_redirect(), our piggyback hook. Due to a legacy bug in BuddyPress, internal BP content (such as members and groups) is marked 404 in $wp_query until bp_core_load_template(), when BP manually overrides the automatic 404. However, the race condition with maybe_redirect_404() means that this manual un-404-ing doesn't happen in time, with the results that maybe_redirect_404() thinks that the page is a legitimate 404, and redirects incorrectly to NOBLOGREDIRECT.

By switching maybe_redirect_404() to catch at a higher priority, we avoid the race condition. If bp_core_load_template() runs, it dies before reaching maybe_redirect_404(). If bp_core_load_template() does not run, it means that the 404 is legitimate, and maybe_redirect_404() can proceed as expected.

This function will be removed in a later version of BuddyPress. Plugins (and plugin authors!) should ignore it.

package BuddyPress
since 1.6.1
link https://buddypress.trac.wordpress.org/ticket/4329
link https://buddypress.trac.wordpress.org/ticket/4415

Strip the span count of a menu item or of a title part.

_bp_strip_spans_from_title(string $title_part = '') : string
package BuddyPress
since 2.2.2

Parameters

$title_part

string

Title part to clean up.

Returns

string

Backward compatibility for 'last_activity' usermeta setting.

_bp_update_user_meta_last_activity_warning(integer $meta_id, integer $object_id, string $meta_key, string $meta_value) 

In BuddyPress 2.0, user last_activity data was moved out of usermeta. For backward compatibility, we continue to mirror the data there. This function serves two purposes: it warns plugin authors of the change, and it updates the data in the proper location.

package BuddyPress
since 2.0.0
access private For internal use only.

Parameters

$meta_id

integer

ID of the just-set usermeta row.

$object_id

integer

ID of the user.

$meta_key

string

Meta key being fetched.

$meta_value

string

Active time.

Strip close comment and close php tags from file headers used by WP See http://core.trac.wordpress.org/ticket/8497

_cleanup_header_comment($str) 
package BuddyPress
since 2.8

Parameters

$str

Perform a deep string replace operation to ensure the values in $search are no longer present

_deep_replace(string|array $search, string $subject) : string

Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that str_replace would return

package BuddyPress
since 2.8.1
access private

Parameters

$search

stringarray

$subject

string

Returns

stringThe processed string

_e()

_e($text, $domain = 'default'
package BuddyPress

Parameters

$text

$domain

_install_and_load_buddypress()

_install_and_load_buddypress() 
package BuddyPress

_load_buddypress()

_load_buddypress() 
package BuddyPress

Callback to convert email address match to HTML A element.

_make_email_clickable_cb(array $matches) : string

This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link make_clickable()}.

package BuddyPress
since 2.3.2
access private

Parameters

$matches

array

Single Regex Match.

Returns

stringHTML A element with email address.

Callback to convert URI match to HTML A element.

_make_url_clickable_cb(array $matches) : string

This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link make_clickable()}.

package BuddyPress
since 2.3.2
access private

Parameters

$matches

array

Single Regex Match.

Returns

stringHTML A element with URI address.

Callback to convert URL match to HTML A element.

_make_web_ftp_clickable_cb(array $matches) : string

This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link make_clickable()}.

package BuddyPress
since 2.3.2
access private

Parameters

$matches

array

Single Regex Match.

Returns

stringHTML A element with URL address.

Converts a number of special characters into their HTML entities.

_wp_specialchars(string $string, mixed $quote_style = ENT_NOQUOTES, string $charset = false, boolean $double_encode = false) : string

Specifically deals with: &, <, >, ", and '.

$quote_style can be set to ENT_COMPAT to encode " to ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.

package BuddyPress
since 1.2.2

Parameters

$string

string

The text which is to be encoded.

$quote_style

mixed

Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES.

$charset

string

Optional. The character encoding of the string. Default is false.

$double_encode

boolean

Optional. Whether or not to encode existing html entities. Default is false.

Returns

stringThe encoded text with HTML entities.

_wp_timezone_choice_usort_callback()

_wp_timezone_choice_usort_callback($a, $b) 
package BuddyPress

Parameters

$a

$b

Search for disabled element tags. Push element to stack on tag open and pop on tag close. Assumes first character of $text is tag opening.

_wptexturize_pushpop_element(string $text, array $stack, string $disabled_elements, string $opening = '<', $closing = '>') : object
package BuddyPress
access private
since 2.9.0

Parameters

$text

string

Text to check. First character is assumed to be $opening

$stack

array

Array used as stack of opened tag elements

$disabled_elements

string

Tags to match against formatted as regexp sub-expression

$opening

stringstring

Tag opening character, assumed to be 1 character long

$closing

Returns

object

Converts value to nonnegative integer.

absint(mixed $maybeint) : integer
package BuddyPress
since 2.5.0

Parameters

$maybeint

mixed

Data you wish to have convered to an nonnegative integer

Returns

integerAn nonnegative integer

Add blog option.

add_blog_option(integer $blog_id, string $option_name, mixed $option_value) : mixed
package BuddyPress
since 1.2.0
see

Parameters

$blog_id

integer

Blog ID to add for. Not used.

$option_name

string

Option name to add.

$option_value

mixed

Option value to add.

Returns

mixed

Retrieve a modified URL query string.

add_query_arg() : string

You can rebuild the URL and append a new query variable to the URL query by using this function. You can also retrieve the full URL with query data.

Adding a single key & value or an associative array. Setting a key value to emptystring removes the key. Omitting oldquery_or_uri uses the $_SERVER value.

package BuddyPress
since 1.5.0

Returns

stringNew URL query string.

Does the specified module exist in the apache config?

apache_mod_loaded(string $mod, boolean $default = false) : boolean
package BuddyPress
since 2.5.0

Parameters

$mod

string

e.g. mod_rewrite

$default

boolean

The default return value if the module is not found

Returns

boolean

Escaping for HTML attributes.

attribute_escape(string $text) : string
package BuddyPress
since 2.0.6
deprecated 2.8.0
see

Parameters

$text

string

Returns

string

backpress_add_option()

backpress_add_option($option, $value) 
package BuddyPress

Parameters

$option

$value

backpress_convert_object()

backpress_convert_object($object, $output) 
package BuddyPress

Parameters

$object

$output

backpress_delete_option()

backpress_delete_option($option) 
package BuddyPress

Parameters

$option

backpress_delete_transient()

backpress_delete_transient($transient) 
package BuddyPress

Parameters

$transient

Kill BackPress execution and display HTML message with error message.

backpress_die(string $message, string $title = '', string|array $args = array()

This function calls the die() PHP function. The difference is that a message in HTML will be displayed to the user. It is recommended to use this function only when the execution should not continue any further. It is not recommended to call this function very often and normally you should try to handle as many errors as possible silently.

package BuddyPress

Parameters

$message

string

Error message.

$title

string

Error title.

$args

stringarray

Optional arguments to control behaviour.

backpress_get_option()

backpress_get_option($option) 
package BuddyPress

Parameters

$option

backpress_get_transient()

backpress_get_transient($transient) 
package BuddyPress

Parameters

$transient

backpress_gmt_strtotime()

backpress_gmt_strtotime($string) 
package BuddyPress

Parameters

$string

backpress_set_transient()

backpress_set_transient($transient, $value, $expiration = 0
package BuddyPress

Parameters

$transient

$value

$expiration

backpress_update_option()

backpress_update_option($option, $value) 
package BuddyPress

Parameters

$option

$value

Adds backslashes before letters and before a number at the start of a string.

backslashit(string $string) : string
package BuddyPress
since 0.71

Parameters

$string

string

Value to which backslashes will be added.

Returns

stringString with backslashes inserted.

Return the value of a given action variable.

bp_action_variable(integer $position = 0) : string | boolean
package BuddyPress
since 1.5.0

Parameters

$position

integer

The key of the action_variables array that you want.

Returns

stringboolean$action_variable The value of that position in the array, or false if not found.

Return the value of $bp->action_variables.

bp_action_variables() : array | boolean
package BuddyPress
since 1.0.0

Returns

arrayboolean$action_variables The action variables array, or false if the array is empty.

Fire the 'bp_actions' action, which runs just before rendering.

bp_actions() 

Attach potential template actions, such as catching form requests or routing custom URLs.

package BuddyPress
since 1.5.0

Output the activation slug.

bp_activate_slug() 
package BuddyPress
since 1.5.0

Fire activation hooks and events.

bp_activation() 

Runs on BuddyPress activation.

package BuddyPress
since 1.6.0

Output the URL of the activation page.

bp_activation_page() 
package BuddyPress
since 1.0.0

Determine if there are still activities left in the loop.

bp_activities() : boolean
package BuddyPress
since 1.0.0
global object $activities_template {@link BP_Activity_Template}

Returns

booleanReturns true when activities are found.

{@internal Missing Description}

bp_activities_no_activity() 
package BuddyPress
since 1.0.0
todo Deprecate.

Output the activities title.

bp_activities_title() 
package BuddyPress
since 1.0.0
todo Deprecate.

Output the activity action.

bp_activity_action(array $args = array()
package BuddyPress
since 1.2.0

Parameters

$args

array

See bp_get_activity_action().

Delete specific activity item and redirect to previous page.

bp_activity_action_delete_activity(integer $activity_id = 0) : boolean
package BuddyPress
since 1.1.0

Parameters

$activity_id

integer

Activity id to be deleted. Defaults to 0.

Returns

booleanFalse on failure.

Load a user's favorites feed.

bp_activity_action_favorites_feed() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Load a user's friends' activity feed.

bp_activity_action_friends_feed() : boolean
package BuddyPress
since 1.0.0

Returns

booleanFalse on failure.

Mark activity as favorite.

bp_activity_action_mark_favorite() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Load a user's @mentions feed.

bp_activity_action_mentions_feed() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Load the activity feed for a user's groups.

bp_activity_action_my_groups_feed() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Output the activity action name.

bp_activity_action_name() 

Just a wrapper for bp_activity_type().

package BuddyPress
since 1.2.0
deprecated 1.5.0
todo Properly deprecate in favor of bp_activity_type() and remove redundant echo

Load a user's personal activity feed.

bp_activity_action_personal_feed() : boolean
package BuddyPress
since 1.0.0

Returns

booleanFalse on failure.

Post new activity comment.

bp_activity_action_post_comment() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Post user/group activity update.

bp_activity_action_post_update() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Remove activity from favorites.

bp_activity_action_remove_favorite() : boolean
package BuddyPress
since 1.2.0

Returns

booleanFalse on failure.

Load the sitewide activity feed.

bp_activity_action_sitewide_feed() : boolean
package BuddyPress
since 1.0.0

Returns

booleanFalse on failure.

Mark specific activity item as spam and redirect to previous page.

bp_activity_action_spam_activity(integer $activity_id = 0) : boolean
package BuddyPress
since 1.6.0

Parameters

$activity_id

integer

Activity id to be deleted. Defaults to 0.

Returns

booleanFalse on failure.

Add an activity item.

bp_activity_add(array|string $args = '') : \WP_Error | boolean | integer
package BuddyPress
since 1.1.0
since 2.6.0 Added 'error_type' parameter to $args.

Parameters

$args

arraystring

{ An array of arguments. @type int|bool $id Pass an activity ID to update an existing item, or false to create a new item. Default: false. @type string $action Optional. The activity action/description, typically something like "Joe posted an update". Values passed to this param will be stored in the database and used as a fallback for when the activity item's format_callback cannot be found (eg, when the component is disabled). As long as you have registered a format_callback for your $type, it is unnecessary to include this argument - BP will generate it automatically. See {@link bp_activity_set_action()}. @type string $content Optional. The content of the activity item. @type string $component The unique name of the component associated with the activity item - 'groups', 'profile', etc. @type string $type The specific activity type, used for directory filtering. 'new_blog_post', 'activity_update', etc. @type string $primary_link Optional. The URL for this item, as used in RSS feeds. Defaults to the URL for this activity item's permalink page. @type int|bool $user_id Optional. The ID of the user associated with the activity item. May be set to false or 0 if the item is not related to any user. Default: the ID of the currently logged-in user. @type int $item_id Optional. The ID of the associated item. @type int $secondary_item_id Optional. The ID of a secondary associated item. @type string $date_recorded Optional. The GMT time, in Y-m-d h:i:s format, when the item was recorded. Defaults to the current time. @type bool $hide_sitewide Should the item be hidden on sitewide streams? Default: false. @type bool $is_spam Should the item be marked as spam? Default: false. @type string $error_type Optional. Error type. Either 'bool' or 'wp_error'. Default: 'bool'. }

Returns

\WP_ErrorbooleanintegerThe ID of the activity on success. False on error.

Register the Activity component admin screen.

bp_activity_add_admin_menu() 
package BuddyPress
since 1.6.0

Add a piece of activity metadata.

bp_activity_add_meta(integer $activity_id, string $meta_key, mixed $meta_value, boolean $unique = false) : integer | boolean
package BuddyPress
since 2.0.0

Parameters

$activity_id

integer

ID of the activity item.

$meta_key

string

Metadata key.

$meta_value

mixed

Metadata value.

$unique

boolean

Optional. Whether to enforce a single metadata value for the given key. If true, and the object already has a value for the key, no change will be made. Default: false.

Returns

integerbooleanThe meta ID on successful update, false on failure.

Add a notification for post comments to the post author or post commenter.

bp_activity_add_notification_for_synced_blog_comment(integer $activity_id, \WP_Comment $post_type_comment, array $activity_args, object $activity_post_object) 

Requires "activity stream commenting on posts and comments" to be enabled.

package BuddyPress
since 2.6.0

Parameters

$activity_id

integer

The activity comment ID.

$post_type_comment

\WP_Comment

WP Comment object.

$activity_args

array

Activity comment arguments.

$activity_post_object

object

The post type tracking args object.

Add an activity stream item as a favorite for a user.

bp_activity_add_user_favorite(integer $activity_id, integer $user_id = 0) : boolean
package BuddyPress
since 1.2.0

Parameters

$activity_id

integer

ID of the activity item being favorited.

$user_id

integer

ID of the user favoriting the activity item.

Returns

booleanTrue on success, false on failure.

Adjusts mention count for mentioned users in activity items.

bp_activity_adjust_mention_count(integer $activity_id = 0, string $action = 'add') : boolean

This function is useful if you only have the activity ID handy and you haven't parsed an activity item for @mentions yet.

Currently, only used in bp_activity_delete().

package BuddyPress
since 1.5.0

Parameters

$activity_id

integer

The unique id for the activity item.

$action

string

Can be 'delete' or 'add'. Defaults to 'add'.

Returns

boolean

Output the Activity component admin screens.

bp_activity_admin() 
package BuddyPress
since 1.6.0

Display the single activity edit screen.

bp_activity_admin_edit() 
package BuddyPress
since 1.6.0

Hide the advanced edit meta boxes by default, so we don't clutter the screen.

bp_activity_admin_edit_hidden_metaboxes(array $hidden, \WP_Screen $screen) : array
package BuddyPress
since 1.6.0

Parameters

$hidden

array

Array of items to hide.

$screen

\WP_Screen

Screen identifier.

Returns

arrayHidden Meta Boxes.

Primary item ID/Secondary item ID metabox for the Activity admin edit screen.

bp_activity_admin_edit_metabox_itemids(object $item) 
package BuddyPress
since 1.6.0

Parameters

$item

object

Activity item.

Status metabox for the Activity admin edit screen.

bp_activity_admin_edit_metabox_status(object $item) 
package BuddyPress
since 1.6.0

Parameters

$item

object

Activity item.

Activity type metabox for the Activity admin edit screen.

bp_activity_admin_edit_metabox_type(object $item) 
package BuddyPress
since 1.6.0

Parameters

$item

object

Activity item.

User ID metabox for the Activity admin edit screen.

bp_activity_admin_edit_metabox_userid(object $item) 
package BuddyPress
since 1.6.0

Parameters

$item

object

Activity item.

Get flattened array of all registered activity actions.

bp_activity_admin_get_activity_actions() : array

Format is [activity_type] => Pretty name for activity type.

package BuddyPress
since 2.0.0

Returns

array$actions

Display the Activity admin index screen, which contains a list of all the activities.

bp_activity_admin_index() 
package BuddyPress
since 1.6.0
global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.
global string $plugin_page The current plugin page.

Set up the Activity admin page.

bp_activity_admin_load() 

Does the following:

  • Register contextual help and screen options for this admin page.
  • Enqueues scripts and styles.
  • Catches POST and GET requests related to Activity.
package BuddyPress
since 1.6.0
global object $bp BuddyPress global settings.
global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.

Add the Activity top-level menu link when viewing single activity item.

bp_activity_admin_menu() : null
package BuddyPress
since 2.6.0

Returns

nullNull if user does not have access to editing functionality.

Add activity component to custom menus array.

bp_activity_admin_menu_order(array $custom_menus = array()) : array

Several BuddyPress components have top-level menu items in the Dashboard, which all appear together in the middle of the Dashboard menu. This function adds the Activity page to the array of these menu items.

package BuddyPress
since 1.7.0

Parameters

$custom_menus

array

The list of top-level BP menu items.

Returns

array$custom_menus List of top-level BP menu items, with Activity added.

AJAX receiver for Activity replies via the admin screen.

bp_activity_admin_reply() 

Processes requests to add new activity comments, and echoes HTML for a new table row.

package BuddyPress
since 1.6.0

Handle save/update of screen options for the Activity component admin screen.

bp_activity_admin_screen_options(string $value, string $option, string $new_value) : string | integer
package BuddyPress
since 1.6.0

Parameters

$value

string

Will always be false unless another plugin filters it first.

$option

string

Screen option name.

$new_value

string

Screen option form value.

Returns

stringintegerOption value. False to abandon update.

Notify a member when their nicename is mentioned in an activity stream item.

bp_activity_at_mention_add_notification(object $activity, string $subject, string $message, string $content, integer $receiver_user_id) 

Hooked to the 'bp_activity_sent_mention_email' action, we piggy back off the existing email code for now, since it does the heavy lifting for us. In the future when we separate emails from Notifications, this will need its own 'bp_activity_at_name_send_emails' equivalent helper function.

package BuddyPress
since 1.9.0

Parameters

$activity

object

Activity object.

$subject

string

(not used) Notification subject.

$message

string

(not used) Notification message.

$content

string

(not used) Notification content.

$receiver_user_id

integer

ID of user receiving notification.

Delete at-mention notifications when the corresponding activity item is deleted.

bp_activity_at_mention_delete_notification(array $activity_ids_deleted = array()
package BuddyPress
since 2.0.0

Parameters

$activity_ids_deleted

array

IDs of deleted activity items.

Send email and BP notifications when a user is mentioned in an update.

bp_activity_at_message_notification(integer $activity_id, integer $receiver_user_id) 
package BuddyPress
since 1.2.0

Parameters

$activity_id

integer

The ID of the activity update.

$receiver_user_id

integer

The ID of the user who is receiving the update.

Find and link @-mentioned users in the contents of a given item.

bp_activity_at_name_filter(string $content, integer $activity_id = 0) : string
package BuddyPress
since 1.2.0

Parameters

$content

string

The contents of a given item.

$activity_id

integer

The activity id. Deprecated.

Returns

string$content Content filtered for mentions.

Catch mentions in an activity item before it is saved into the database.

bp_activity_at_name_filter_updates(\BP_Activity_Activity $activity) 

If mentions are found, replace @mention text with user links and add our hook to send mention notifications after the activity item is saved.

package BuddyPress
since 1.5.0

Parameters

$activity

\BP_Activity_Activity

Activity Object.

Sends emails and BP notifications for users @-mentioned in an activity item.

bp_activity_at_name_send_emails(\BP_Activity_Activity $activity) 
package BuddyPress
since 1.7.0

Parameters

$activity

\BP_Activity_Activity

The BP_Activity_Activity object.

Output the avatar of the user that performed the action.

bp_activity_avatar(array|string $args = ''
package BuddyPress
since 1.1.0
see for description of arguments.

Parameters

$args

arraystring

See {@link bp_get_activity_avatar()} for description.

Determine if a comment can be made on an activity item.

bp_activity_can_comment() : boolean
package BuddyPress
since 1.2.0
global object $activities_template {@link BP_Activity_Template}

Returns

boolean$can_comment True if item can receive comments.

Determine whether a comment can be made on an activity reply item.

bp_activity_can_comment_reply(boolean|object $comment = false) : boolean
package BuddyPress
since 1.5.0

Parameters

$comment

booleanobject

Activity comment.

Returns

boolean$can_comment True if comment can receive comments, otherwise false.

Determine whether favorites are allowed.

bp_activity_can_favorite() : boolean

Defaults to true, but can be modified by plugins.

package BuddyPress
since 1.5.0

Returns

booleanTrue if comment can receive comments.

Detect a change in post type status, and initiate an activity update if necessary.

bp_activity_catch_transition_post_type_status(string $new_status, string $old_status, object $post) 
package BuddyPress
since 2.2.0
todo Suppo