Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai
noblogs-wp
Commits
22ede96b
Commit
22ede96b
authored
Jun 03, 2016
by
lechuck
Committed by
lucha
Oct 29, 2016
Browse files
[auto] Plugin: buddypress 2.5.3
parent
5de50f75
Changes
429
Expand all
Hide whitespace changes
Inline
Side-by-side
wp-content/plugins/buddypress/bp-activity/admin/js/admin.js
View file @
22ede96b
...
...
@@ -4,14 +4,14 @@
/**
* Activity reply object for the activity index screen
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
var
activityReply
=
{
/**
* Attach event handler functions to the relevant elements.
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
init
:
function
()
{
$
(
document
).
on
(
'
click
'
,
'
.row-actions a.reply
'
,
activityReply
.
open
);
...
...
@@ -29,7 +29,7 @@ var activityReply = {
/**
* Reveals the entire row when "reply" is pressed.
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
open
:
function
()
{
// Hide the container row, and move it to the new location
...
...
@@ -46,7 +46,7 @@ var activityReply = {
/**
* Hide and reset the entire row when "cancel", or escape, are pressed.
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
close
:
function
()
{
// Hide the container row
...
...
@@ -66,7 +66,7 @@ var activityReply = {
/**
* Submits "form" via AJAX back to WordPress.
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
send
:
function
()
{
// Hide any existing error message, and show the loading spinner
...
...
@@ -100,7 +100,7 @@ var activityReply = {
/**
* send() error message handler
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
error
:
function
(
r
)
{
var
er
=
r
.
statusText
;
...
...
@@ -118,7 +118,7 @@ var activityReply = {
/**
* send() success handler
*
* @since
BuddyPress (
1.6
)
* @since 1.6
.0
*/
show
:
function
(
xml
)
{
var
bg
,
id
,
response
;
...
...
wp-content/plugins/buddypress/bp-activity/admin/js/admin.min.js
View file @
22ede96b
/*! buddypress - v2.
3.5
- 201
5-11-11 5:23:00 A
M UTC - https://wordpress.org/plugins/buddypress/ */
/*! buddypress - v2.
5.3
- 201
6-05-24 5:17:45 P
M UTC - https://wordpress.org/plugins/buddypress/ */
!
function
(
a
){
var
b
=
{
init
:
function
(){
a
(
document
).
on
(
"
click
"
,
"
.row-actions a.reply
"
,
b
.
open
),
a
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.cancel
"
,
b
.
close
),
a
(
document
).
on
(
"
click
"
,
"
#bp-activities-container a.save
"
,
b
.
send
),
a
(
document
).
on
(
"
keyup
"
,
"
#bp-activities:visible
"
,
function
(
a
){
27
===
a
.
which
&&
b
.
close
()})},
open
:
function
(){
var
b
=
a
(
"
#bp-activities-container
"
).
hide
();
return
a
(
this
).
parents
(
"
tr
"
).
after
(
b
),
b
.
fadeIn
(
"
300
"
),
a
(
"
#bp-activities
"
).
focus
(),
!
1
},
close
:
function
(){
return
a
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
a
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
a
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
hide
()}),
!
1
},
send
:
function
(){
a
(
"
#bp-replysubmit .error
"
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
show
();
var
c
=
{};
return
c
[
"
_ajax_nonce-bp-activity-admin-reply
"
]
=
a
(
'
#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]
'
).
val
(),
c
.
action
=
"
bp-activity-admin-reply
"
,
c
.
content
=
a
(
"
#bp-activities
"
).
val
(),
c
.
parent_id
=
a
(
"
#bp-activities-container
"
).
prev
().
data
(
"
parent_id
"
),
c
.
root_id
=
a
(
"
#bp-activities-container
"
).
prev
().
data
(
"
root_id
"
),
a
.
ajax
({
data
:
c
,
type
:
"
POST
"
,
url
:
ajaxurl
,
error
:
function
(
a
){
b
.
error
(
a
)},
success
:
function
(
a
){
b
.
show
(
a
)}}),
!
1
},
error
:
function
(
b
){
var
c
=
b
.
statusText
;
a
(
"
#bp-replysubmit .waiting
"
).
hide
(),
b
.
responseText
&&
(
c
=
b
.
responseText
.
replace
(
/<.
[^
<>
]
*
?
>/g
,
""
)),
c
&&
a
(
"
#bp-replysubmit .error
"
).
html
(
c
).
show
()},
show
:
function
(
c
){
var
d
,
e
,
f
;
return
"
string
"
==
typeof
c
?(
b
.
error
({
responseText
:
c
}),
!
1
):(
f
=
wpAjax
.
parseAjaxResponse
(
c
),
f
.
errors
?(
b
.
error
({
responseText
:
wpAjax
.
broken
}),
!
1
):(
f
=
f
.
responses
[
0
],
void
a
(
"
#bp-activities-container
"
).
fadeOut
(
"
200
"
,
function
(){
a
(
"
#bp-activities
"
).
val
(
""
).
blur
(),
a
(
"
#bp-replysubmit .error
"
).
html
(
""
).
hide
(),
a
(
"
#bp-replysubmit .waiting
"
).
hide
(),
a
(
"
#bp-activities-container
"
).
before
(
f
.
data
),
e
=
a
(
"
#activity-
"
+
f
.
id
),
d
=
e
.
closest
(
"
.widefat
"
).
css
(
"
backgroundColor
"
),
e
.
animate
({
backgroundColor
:
"
#CEB
"
},
300
).
animate
({
backgroundColor
:
d
},
300
)})))}};
a
(
document
).
ready
(
function
(){
b
.
init
(),
a
(
"
#bp_activity_action h3, #bp_activity_content h3
"
).
unbind
(
"
click
"
),
"
undefined
"
!=
typeof
postboxes
&&
postboxes
.
add_postbox_toggles
(
bp_activity_admin_vars
.
page
)})}(
jQuery
);
\ No newline at end of file
wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php
View file @
22ede96b
This diff is collapsed.
Click to expand it.
wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php
View file @
22ede96b
This diff is collapsed.
Click to expand it.
wp-content/plugins/buddypress/bp-activity/bp-activity-akismet.php
View file @
22ede96b
This diff is collapsed.
Click to expand it.
wp-content/plugins/buddypress/bp-activity/bp-activity-cache.php
View file @
22ede96b
<?php
/**
* Functions related to the BuddyPress Activity component and the WP Cache.
*
* @since BuddyPress (1.6.0)
* @package BuddyPress
* @subpackage ActivityCache
* @since 1.6.0
*/
// Exit if accessed directly
// Exit if accessed directly
.
defined
(
'ABSPATH'
)
||
exit
;
/**
...
...
@@ -16,8 +17,10 @@ defined( 'ABSPATH' ) || exit;
* in $activity_ids and adds it to the WP cache. This improves efficiency when
* using querying activitymeta inline.
*
* @since 1.6.0
*
* @param int|string|array|bool $activity_ids Accepts a single activity ID, or a comma-
* separated list or array of activity ids
* separated list or array of activity ids
.
*/
function
bp_activity_update_meta_cache
(
$activity_ids
=
false
)
{
$bp
=
buddypress
();
...
...
@@ -37,9 +40,9 @@ function bp_activity_update_meta_cache( $activity_ids = false ) {
/**
* Clear a cached activity item when that item is updated.
*
* @since
BuddyPress (
2.0.0
)
* @since 2.0.0
*
* @param BP_Activity_Activity $activity
* @param BP_Activity_Activity $activity
Activity object.
*/
function
bp_activity_clear_cache_for_activity
(
$activity
)
{
wp_cache_delete
(
$activity
->
id
,
'bp_activity'
);
...
...
@@ -50,7 +53,7 @@ add_action( 'bp_activity_after_save', 'bp_activity_clear_cache_for_activity' );
/**
* Clear cached data for deleted activity items.
*
* @since
BuddyPress (
2.0.0
)
* @since 2.0.0
*
* @param array $deleted_ids IDs of deleted activity items.
*/
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-classes.php
View file @
22ede96b
<?php
/**
* BuddyPress Activity Classes
* BuddyPress Activity Classes
.
*
* @package BuddyPress
* @subpackage Activity
* @subpackage ActivityClasses
* @since 1.0.0
*/
// Exit if accessed directly
// Exit if accessed directly
.
defined
(
'ABSPATH'
)
||
exit
;
require
dirname
(
__FILE__
)
.
'/classes/class-bp-activity-activity.php'
;
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-cssjs.php
View file @
22ede96b
<?php
/**
* Activity component CSS/JS
*
* @package BuddyPress
* @subpackage ActivityScripts
* @since 1.0.0
*/
// Exit if accessed directly
// Exit if accessed directly
.
defined
(
'ABSPATH'
)
||
exit
;
/**
* Enqueue @mentions JS.
*
* @since
BuddyPress (
2.1.0
)
* @since 2.1.0
*/
function
bp_activity_mentions_script
()
{
if
(
!
bp_activity_maybe_load_mentions_scripts
()
)
{
return
;
}
// Special handling for New/Edit screens in wp-admin
// Special handling for New/Edit screens in wp-admin
.
if
(
is_admin
()
)
{
if
(
!
get_current_screen
()
||
...
...
@@ -31,7 +31,7 @@ function bp_activity_mentions_script() {
}
$min
=
de
fi
n
ed
(
'SCRIPT_DEBUG'
)
&&
SCRIPT_DEBUG
?
''
:
'.min'
;
$min
=
bp_core_get_mini
fied
_asset_suffix
()
;
wp_enqueue_script
(
'bp-mentions'
,
buddypress
()
->
plugin_url
.
"bp-activity/js/mentions
{
$min
}
.js"
,
array
(
'jquery'
,
'jquery-atwho'
),
bp_get_version
(),
true
);
wp_enqueue_style
(
'bp-mentions-css'
,
buddypress
()
->
plugin_url
.
"bp-activity/css/mentions
{
$min
}
.css"
,
array
(),
bp_get_version
()
);
...
...
@@ -50,7 +50,7 @@ function bp_activity_mentions_script() {
* This is the hook where BP components can add their own prefetched results
* friends to the page for quicker @mentions lookups.
*
* @since
BuddyPress (
2.1.0
)
* @since 2.1.0
*/
do_action
(
'bp_activity_mentions_prime_results'
);
}
...
...
@@ -60,11 +60,10 @@ add_action( 'bp_admin_enqueue_scripts', 'bp_activity_mentions_script' );
/**
* Bind the mentions listener to a wp_editor instance when TinyMCE initializes.
*
* @since
BuddyPress (
2.3.3
)
* @since 2.3.3
*
* @param array $settings An array with TinyMCE config.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
*
* @return array $mceInit An array with TinyMCE config.
*/
function
bp_add_mentions_on_tinymce_init
(
$settings
,
$editor_id
)
{
...
...
wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php
View file @
22ede96b
This diff is collapsed.
Click to expand it.
wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
View file @
22ede96b
This diff is collapsed.
Click to expand it.
wp-content/plugins/buddypress/bp-activity/bp-activity-loader.php
View file @
22ede96b
<?php
/**
* BuddyPress Activity Streams Loader.
*
...
...
@@ -7,385 +6,18 @@
*
* @package BuddyPress
* @subpackage ActivityCore
* @since 1.5.0
*/
// Exit if accessed directly
// Exit if accessed directly
.
defined
(
'ABSPATH'
)
||
exit
;
/**
* Main Activity Class.
*
* @since BuddyPress (1.5.0)
*/
class
BP_Activity_Component
extends
BP_Component
{
/**
* Start the activity component setup process.
*
* @since BuddyPress (1.5.0)
*/
public
function
__construct
()
{
parent
::
start
(
'activity'
,
__
(
'Activity Streams'
,
'buddypress'
),
buddypress
()
->
plugin_dir
,
array
(
'adminbar_myaccount_order'
=>
10
)
);
}
/**
* Include component files.
*
* @since BuddyPress (1.5.0)
*
* @see BP_Component::includes() for a description of arguments.
*
* @param array $includes See BP_Component::includes() for a description.
*/
public
function
includes
(
$includes
=
array
()
)
{
// Files to include
$includes
=
array
(
'cssjs'
,
'actions'
,
'screens'
,
'filters'
,
'classes'
,
'template'
,
'functions'
,
'notifications'
,
'cache'
);
// Load Akismet support if Akismet is configured
$akismet_key
=
bp_get_option
(
'wordpress_api_key'
);
/** This filter is documented in bp-activity/bp-activity-actions.php */
if
(
defined
(
'AKISMET_VERSION'
)
&&
class_exists
(
'Akismet'
)
&&
(
!
empty
(
$akismet_key
)
||
defined
(
'WPCOM_API_KEY'
)
)
&&
apply_filters
(
'bp_activity_use_akismet'
,
bp_is_akismet_active
()
)
)
{
$includes
[]
=
'akismet'
;
}
if
(
is_admin
()
)
{
$includes
[]
=
'admin'
;
}
parent
::
includes
(
$includes
);
}
/**
* Set up component global variables.
*
* The BP_ACTIVITY_SLUG constant is deprecated, and only used here for
* backwards compatibility.
*
* @since BuddyPress (1.5.0)
*
* @see BP_Component::setup_globals() for a description of arguments.
*
* @param array $args See BP_Component::setup_globals() for a description.
*/
public
function
setup_globals
(
$args
=
array
()
)
{
$bp
=
buddypress
();
// Define a slug, if necessary
if
(
!
defined
(
'BP_ACTIVITY_SLUG'
)
)
define
(
'BP_ACTIVITY_SLUG'
,
$this
->
id
);
// Global tables for activity component
$global_tables
=
array
(
'table_name'
=>
$bp
->
table_prefix
.
'bp_activity'
,
'table_name_meta'
=>
$bp
->
table_prefix
.
'bp_activity_meta'
,
);
// Metadata tables for groups component
$meta_tables
=
array
(
'activity'
=>
$bp
->
table_prefix
.
'bp_activity_meta'
,
);
// All globals for activity component.
// Note that global_tables is included in this array.
$args
=
array
(
'slug'
=>
BP_ACTIVITY_SLUG
,
'root_slug'
=>
isset
(
$bp
->
pages
->
activity
->
slug
)
?
$bp
->
pages
->
activity
->
slug
:
BP_ACTIVITY_SLUG
,
'has_directory'
=>
true
,
'directory_title'
=>
_x
(
'Site-Wide Activity'
,
'component directory title'
,
'buddypress'
),
'notification_callback'
=>
'bp_activity_format_notifications'
,
'search_string'
=>
__
(
'Search Activity...'
,
'buddypress'
),
'global_tables'
=>
$global_tables
,
'meta_tables'
=>
$meta_tables
,
);
parent
::
setup_globals
(
$args
);
}
/**
* Set up component navigation.
*
* @since BuddyPress (1.5.0)
*
* @see BP_Component::setup_nav() for a description of arguments.
* @uses bp_is_active()
* @uses is_user_logged_in()
* @uses bp_get_friends_slug()
* @uses bp_get_groups_slug()
*
* @param array $main_nav Optional. See BP_Component::setup_nav() for description.
* @param array $sub_nav Optional. See BP_Component::setup_nav() for description.
*/
public
function
setup_nav
(
$main_nav
=
array
(),
$sub_nav
=
array
()
)
{
// Add 'Activity' to the main navigation
$main_nav
=
array
(
'name'
=>
_x
(
'Activity'
,
'Profile activity screen nav'
,
'buddypress'
),
'slug'
=>
$this
->
slug
,
'position'
=>
10
,
'screen_function'
=>
'bp_activity_screen_my_activity'
,
'default_subnav_slug'
=>
'just-me'
,
'item_css_id'
=>
$this
->
id
);
// Stop if there is no user displayed or logged in
if
(
!
is_user_logged_in
()
&&
!
bp_displayed_user_id
()
)
return
;
// Determine user to use
if
(
bp_displayed_user_domain
()
)
{
$user_domain
=
bp_displayed_user_domain
();
}
elseif
(
bp_loggedin_user_domain
()
)
{
$user_domain
=
bp_loggedin_user_domain
();
}
else
{
return
;
}
// User link
$activity_link
=
trailingslashit
(
$user_domain
.
$this
->
slug
);
// Add the subnav items to the activity nav item if we are using a theme that supports this
$sub_nav
[]
=
array
(
'name'
=>
_x
(
'Personal'
,
'Profile activity screen sub nav'
,
'buddypress'
),
'slug'
=>
'just-me'
,
'parent_url'
=>
$activity_link
,
'parent_slug'
=>
$this
->
slug
,
'screen_function'
=>
'bp_activity_screen_my_activity'
,
'position'
=>
10
);
// @ mentions
if
(
bp_activity_do_mentions
()
)
{
$sub_nav
[]
=
array
(
'name'
=>
_x
(
'Mentions'
,
'Profile activity screen sub nav'
,
'buddypress'
),
'slug'
=>
'mentions'
,
'parent_url'
=>
$activity_link
,
'parent_slug'
=>
$this
->
slug
,
'screen_function'
=>
'bp_activity_screen_mentions'
,
'position'
=>
20
,
'item_css_id'
=>
'activity-mentions'
);
}
// Favorite activity items
if
(
bp_activity_can_favorite
()
)
{
$sub_nav
[]
=
array
(
'name'
=>
_x
(
'Favorites'
,
'Profile activity screen sub nav'
,
'buddypress'
),
'slug'
=>
'favorites'
,
'parent_url'
=>
$activity_link
,
'parent_slug'
=>
$this
->
slug
,
'screen_function'
=>
'bp_activity_screen_favorites'
,
'position'
=>
30
,
'item_css_id'
=>
'activity-favs'
);
}
// Additional menu if friends is active
if
(
bp_is_active
(
'friends'
)
)
{
$sub_nav
[]
=
array
(
'name'
=>
_x
(
'Friends'
,
'Profile activity screen sub nav'
,
'buddypress'
),
'slug'
=>
bp_get_friends_slug
(),
'parent_url'
=>
$activity_link
,
'parent_slug'
=>
$this
->
slug
,
'screen_function'
=>
'bp_activity_screen_friends'
,
'position'
=>
40
,
'item_css_id'
=>
'activity-friends'
)
;
}
// Additional menu if groups is active
if
(
bp_is_active
(
'groups'
)
)
{
$sub_nav
[]
=
array
(
'name'
=>
_x
(
'Groups'
,
'Profile activity screen sub nav'
,
'buddypress'
),
'slug'
=>
bp_get_groups_slug
(),
'parent_url'
=>
$activity_link
,
'parent_slug'
=>
$this
->
slug
,
'screen_function'
=>
'bp_activity_screen_groups'
,
'position'
=>
50
,
'item_css_id'
=>
'activity-groups'
);
}
parent
::
setup_nav
(
$main_nav
,
$sub_nav
);
}
/**
* Set up the component entries in the WordPress Admin Bar.
*
* @since BuddyPress (1.5.0)
*
* @see BP_Component::setup_nav() for a description of the $wp_admin_nav
* parameter array.
* @uses is_user_logged_in()
* @uses trailingslashit()
* @uses bp_get_total_mention_count_for_user()
* @uses bp_loggedin_user_id()
* @uses bp_is_active()
* @uses bp_get_friends_slug()
* @uses bp_get_groups_slug()
*
* @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a
* description.
*/
public
function
setup_admin_bar
(
$wp_admin_nav
=
array
()
)
{
$bp
=
buddypress
();
// Menus for logged in user
if
(
is_user_logged_in
()
)
{
// Setup the logged in user variables
$user_domain
=
bp_loggedin_user_domain
();
$activity_link
=
trailingslashit
(
$user_domain
.
$this
->
slug
);
// Unread message count
if
(
bp_activity_do_mentions
()
)
{
$count
=
bp_get_total_mention_count_for_user
(
bp_loggedin_user_id
()
);
if
(
!
empty
(
$count
)
)
{
$title
=
sprintf
(
_x
(
'Mentions <span class="count">%s</span>'
,
'Toolbar Mention logged in user'
,
'buddypress'
),
number_format_i18n
(
$count
)
);
}
else
{
$title
=
_x
(
'Mentions'
,
'Toolbar Mention logged in user'
,
'buddypress'
);
}
}
// Add the "Activity" sub menu
$wp_admin_nav
[]
=
array
(
'parent'
=>
$bp
->
my_account_menu_id
,
'id'
=>
'my-account-'
.
$this
->
id
,
'title'
=>
_x
(
'Activity'
,
'My Account Activity sub nav'
,
'buddypress'
),
'href'
=>
trailingslashit
(
$activity_link
)
);
// Personal
$wp_admin_nav
[]
=
array
(
'parent'
=>
'my-account-'
.
$this
->
id
,
'id'
=>
'my-account-'
.
$this
->
id
.
'-personal'
,
'title'
=>
_x
(
'Personal'
,
'My Account Activity sub nav'
,
'buddypress'
),
'href'
=>
trailingslashit
(
$activity_link
)
);
// Mentions
if
(
bp_activity_do_mentions
()
)
{
$wp_admin_nav
[]
=
array
(
'parent'
=>
'my-account-'
.
$this
->
id
,
'id'
=>
'my-account-'
.
$this
->
id
.
'-mentions'
,
'title'
=>
$title
,
'href'
=>
trailingslashit
(
$activity_link
.
'mentions'
)
);
}
// Favorites
// Favorite activity items
if
(
bp_activity_can_favorite
()
)
{
$wp_admin_nav
[]
=
array
(
'parent'
=>
'my-account-'
.
$this
->
id
,
'id'
=>
'my-account-'
.
$this
->
id
.
'-favorites'
,
'title'
=>
_x
(
'Favorites'
,
'My Account Activity sub nav'
,
'buddypress'
),
'href'
=>
trailingslashit
(
$activity_link
.
'favorites'
)
);
}
// Friends?
if
(
bp_is_active
(
'friends'
)
)
{
$wp_admin_nav
[]
=
array
(
'parent'
=>
'my-account-'
.
$this
->
id
,
'id'
=>
'my-account-'
.
$this
->
id
.
'-friends'
,
'title'
=>
_x
(
'Friends'
,
'My Account Activity sub nav'
,
'buddypress'
),
'href'
=>
trailingslashit
(
$activity_link
.
bp_get_friends_slug
()
)
);
}
// Groups?
if
(
bp_is_active
(
'groups'
)
)
{
$wp_admin_nav
[]
=
array
(
'parent'
=>
'my-account-'
.
$this
->
id
,
'id'
=>
'my-account-'
.
$this
->
id
.
'-groups'
,
'title'
=>
_x
(
'Groups'
,
'My Account Activity sub nav'
,
'buddypress'
),
'href'
=>
trailingslashit
(
$activity_link
.
bp_get_groups_slug
()
)
);
}
}
parent
::
setup_admin_bar
(
$wp_admin_nav
);
}
/**
* Set up the title for pages and <title>.
*
* @since BuddyPress (1.5.0)
*
* @uses bp_is_activity_component()
* @uses bp_is_my_profile()
* @uses bp_core_fetch_avatar()
*/
public
function
setup_title
()
{
$bp
=
buddypress
();
// Adjust title based on view
if
(
bp_is_activity_component
()
)
{
if
(
bp_is_my_profile
()
)
{
$bp
->
bp_options_title
=
_x
(
'My Activity'
,
'Page and <title>'
,
'buddypress'
);
}
else
{
$bp
->
bp_options_avatar
=
bp_core_fetch_avatar
(
array
(
'item_id'
=>
bp_displayed_user_id
(),
'type'
=>
'thumb'
,
'alt'
=>
sprintf
(
__
(
'Profile picture of %s'
,
'buddypress'
),
bp_get_displayed_user_fullname
()
)
)
);
$bp
->
bp_options_title
=
bp_get_displayed_user_fullname
();
}
}
parent
::
setup_title
();
}
/**
* Set up actions necessary for the component.
*
* @since BuddyPress (1.6.0)
*/
public
function
setup_actions
()
{
// Spam prevention
add_action
(
'bp_include'
,
'bp_activity_setup_akismet'
);
parent
::
setup_actions
();
}
/**
* Setup cache groups.
*
* @since BuddyPress (2.2.0)
*/
public
function
setup_cache_groups
()
{
// Global groups
wp_cache_add_global_groups
(
array
(
'bp_activity'
,
'bp_activity_comments'
,
'activity_meta'
)
);
parent
::
setup_cache_groups
();
}
}