Commit 29d0bf78 authored by agata's avatar agata

[auto] plugin: buddypress 6.0.0

parent 59995999
......@@ -24,9 +24,8 @@ function bp_activity_action_sitewide_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'sitewide',
/* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity" */
/* translators: %s Site Name */
'title' => sprintf( __( '%s | Site-Wide Activity', 'buddypress' ), bp_get_site_name() ),
'link' => bp_get_activity_directory_permalink(),
'description' => __( 'Activity feed for the entire site.', 'buddypress' ),
'activity_args' => 'display_comments=threaded'
......@@ -50,10 +49,11 @@ function bp_activity_action_personal_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'personal',
/* translators: Personal activity RSS title - "[Site Name] | [User Display Name] | Activity" */
'title' => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
/* translators: 1: Site Name. 2: User Display Name. */
'title' => sprintf( _x( '%1$s | %2$s | Activity', 'Personal activity feed title', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),
/* translators: %s: User Display Name */
'description' => sprintf( __( 'Activity feed for %s.', 'buddypress' ), bp_get_displayed_user_fullname() ),
'activity_args' => 'user_id=' . bp_displayed_user_id()
) );
......@@ -76,10 +76,11 @@ function bp_activity_action_friends_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'friends',
/* translators: Friends activity RSS title - "[Site Name] | [User Display Name] | Friends Activity" */
/* translators: 1: Site Name 2: User Display Name */
'title' => sprintf( __( '%1$s | %2$s | Friends Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),
/* translators: %s: User Display Name */
'description' => sprintf( __( "Activity feed for %s's friends.", 'buddypress' ), bp_get_displayed_user_fullname() ),
'activity_args' => 'scope=friends'
) );
......@@ -106,10 +107,11 @@ function bp_activity_action_my_groups_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'mygroups',
/* translators: Member groups activity RSS title - "[Site Name] | [User Display Name] | Groups Activity" */
/* translators: 1: Site Name 2: User Display Name */
'title' => sprintf( __( '%1$s | %2$s | Group Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),
/* translators: %s: User Display Name */
'description' => sprintf( __( "Public group activity feed of which %s is a member.", 'buddypress' ), bp_get_displayed_user_fullname() ),
'activity_args' => array(
'object' => buddypress()->groups->id,
......@@ -140,10 +142,11 @@ function bp_activity_action_mentions_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'mentions',
/* translators: User mentions activity RSS title - "[Site Name] | [User Display Name] | Mentions" */
/* translators: 1: Site Name 2: User Display Name */
'title' => sprintf( __( '%1$s | %2$s | Mentions', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',
/* translators: %s: User Display Name */
'description' => sprintf( __( "Activity feed mentioning %s.", 'buddypress' ), bp_get_displayed_user_fullname() ),
'activity_args' => array(
'search_terms' => '@' . bp_core_get_username( bp_displayed_user_id() )
......@@ -172,10 +175,11 @@ function bp_activity_action_favorites_feed() {
buddypress()->activity->feed = new BP_Activity_Feed( array(
'id' => 'favorites',
/* translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites" */
/* translators: 1: Site Name 2: User Display Name */
'title' => sprintf( __( '%1$s | %2$s | Favorites', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',
/* translators: %s: User Display Name */
'description' => sprintf( __( "Activity feed of %s's favorites.", 'buddypress' ), bp_get_displayed_user_fullname() ),
'activity_args' => 'include=' . $fav_ids
) );
......
......@@ -2,7 +2,7 @@
(function( $ ) {
/**
* Activity reply object for the activity index screen
* Activity reply object for the activity index screen.
*
* @since 1.6.0
*/
......@@ -18,7 +18,7 @@ var activityReply = {
$(document).on( 'click', '#bp-activities-container a.cancel', activityReply.close );
$(document).on( 'click', '#bp-activities-container a.save', activityReply.send );
// Close textarea on escape
// Close textarea on escape.
$(document).on( 'keyup', '#bp-activities:visible', function( e ) {
if ( 27 === e.which ) {
activityReply.close();
......@@ -32,7 +32,7 @@ var activityReply = {
* @since 1.6.0
*/
open : function() {
// Hide the container row, and move it to the new location
// Hide the container row, and move it to the new location.
var box = $( '#bp-activities-container' ).hide();
$( this ).parents( 'tr' ).after( box );
......@@ -49,13 +49,13 @@ var activityReply = {
* @since 1.6.0
*/
close : function() {
// Hide the container row
// Hide the container row.
$('#bp-activities-container').fadeOut( '200', function () {
// Empty and unfocus the text area
// Empty and unfocus the text area.
$( '#bp-activities' ).val( '' ).blur();
// Remove any error message and disable the spinner
// Remove any error message and disable the spinner.
$( '#bp-replysubmit .error' ).html( '' ).hide();
$( '#bp-replysubmit .waiting' ).hide();
});
......@@ -69,27 +69,27 @@ var activityReply = {
* @since 1.6.0
*/
send : function() {
// Hide any existing error message, and show the loading spinner
// Hide any existing error message, and show the loading spinner.
$( '#bp-replysubmit .error' ).hide();
$( '#bp-replysubmit .waiting' ).show();
// Grab the nonce
// Grab the nonce.
var reply = {};
reply['_ajax_nonce-bp-activity-admin-reply'] = $( '#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]' ).val();
// Get the rest of the data
// Get the rest of the data.
reply.action = 'bp-activity-admin-reply';
reply.content = $( '#bp-activities' ).val();
reply.parent_id = $( '#bp-activities-container' ).prev().data( 'parent_id' );
reply.root_id = $( '#bp-activities-container' ).prev().data( 'root_id' );
// Make the AJAX call
// Make the AJAX call.
$.ajax({
data : reply,
type : 'POST',
url : ajaxurl,
// Callbacks
// Callbacks.
error : function( r ) { activityReply.error( r ); },
success : function( r ) { activityReply.show( r ); }
});
......@@ -98,7 +98,7 @@ var activityReply = {
},
/**
* send() error message handler
* send() error message handler.
*
* @since 1.6.0
*/
......@@ -116,14 +116,14 @@ var activityReply = {
},
/**
* send() success handler
* send() success handler.
*
* @since 1.6.0
*/
show : function ( xml ) {
var bg, id, response;
// Handle any errors in the response
// Handle any errors in the response.
if ( typeof( xml ) === 'string' ) {
activityReply.error( { 'responseText': xml } );
return false;
......@@ -139,17 +139,17 @@ var activityReply = {
// Close and reset the reply row, and add the new Activity item into the list.
$('#bp-activities-container').fadeOut( '200', function () {
// Empty and unfocus the text area
// Empty and unfocus the text area.
$( '#bp-activities' ).val( '' ).blur();
// Remove any error message and disable the spinner
// Remove any error message and disable the spinner.
$( '#bp-replysubmit .error' ).html( '' ).hide();
$( '#bp-replysubmit .waiting' ).hide();
// Insert new activity item
// Insert new activity item.
$( '#bp-activities-container' ).before( response.data );
// Get background colour and animate the flash
// Get background colour and animate the flash.
id = $( '#activity-' + response.id );
bg = id.closest( '.widefat' ).css( 'backgroundColor' );
id.animate( { 'backgroundColor': '#CEB' }, 300 ).animate( { 'backgroundColor': bg }, 300 );
......@@ -158,10 +158,10 @@ var activityReply = {
};
$(document).ready( function () {
// Create the Activity reply object after domready event
// Create the Activity reply object after domready event.
activityReply.init();
// On the edit screen, unload the close/open toggle js for the action & content metaboxes
// On the edit screen, unload the close/open toggle js for the action & content metaboxes.
$( '#bp_activity_action h3, #bp_activity_content h3' ).unbind( 'click' );
// redo the post box toggles to reset the one made by comment.js in favor
......
......@@ -29,8 +29,8 @@ function bp_activity_add_admin_menu() {
// Add our screen.
$hook = add_menu_page(
_x( 'Activity', 'Admin Dashbord SWA page title', 'buddypress' ),
_x( 'Activity', 'Admin Dashbord SWA menu', 'buddypress' ),
_x( 'Activity', 'Admin Dashboard SWA page title', 'buddypress' ),
_x( 'Activity', 'Admin Dashboard SWA menu', 'buddypress' ),
'bp_moderate',
'bp-activity',
'bp_activity_admin',
......@@ -75,7 +75,7 @@ function bp_activity_admin_reply() {
$parent_id = ! empty( $_REQUEST['parent_id'] ) ? (int) $_REQUEST['parent_id'] : 0;
$root_id = ! empty( $_REQUEST['root_id'] ) ? (int) $_REQUEST['root_id'] : 0;
// $parent_id is required
// $parent_id is required.
if ( empty( $parent_id ) )
die( '-1' );
......@@ -356,7 +356,7 @@ function bp_activity_admin_load() {
check_admin_referer( 'spam-activity_' . $activity_ids[0] );
}
// Initialise counters for how many of each type of item we perform an action on.
// Initialize counters for how many of each type of item we perform an action on.
$deleted = $spammed = $unspammed = 0;
// Store any errors that occurs when updating the database items.
......@@ -660,7 +660,12 @@ function bp_activity_admin_edit() {
do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) ); ?>
<div class="wrap">
<h1><?php printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?></h1>
<h1>
<?php
/* translators: %s: the activity ID */
printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
?>
</h1>
<?php if ( ! empty( $activity ) ) : ?>
......@@ -761,7 +766,12 @@ function bp_activity_admin_edit_metabox_status( $item ) {
$datef = __( 'M j, Y @ G:i', 'buddypress' );
$date = date_i18n( $datef, strtotime( $item->date_recorded ) );
?>
<span id="timestamp"><?php printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' ); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
<span id="timestamp">
<?php
/* translators: %s: the date the activity was submitted on */
printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' );
?>
</span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
<div id='timestampdiv' class='hide-if-js'>
<?php touch_time( 1, 0, 5 ); ?>
......@@ -899,7 +909,16 @@ function bp_activity_admin_edit_metabox_type( $item ) {
* of the list.
*/
if ( ! isset( $actions[ $selected ] ) ) {
_doing_it_wrong( __FUNCTION__, sprintf( __( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ), $selected ), '2.0.0' );
_doing_it_wrong(
__FUNCTION__,
sprintf(
/* translators: %s: the name of the activity type */
__( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ),
$selected
),
'2.0.0'
);
$actions[ $selected ] = $selected;
}
......@@ -973,11 +992,14 @@ function bp_activity_admin_index() {
// Reindex array.
$errors = array_values( $errors );
if ( $deleted > 0 )
if ( $deleted > 0 ) {
/* translators: %s: the number of permanently deleted activities */
$messages[] = sprintf( _n( '%s activity item has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) );
}
if ( ! empty( $errors ) ) {
if ( 1 == count( $errors ) ) {
/* translators: %s: the ID of the activity which errored during an update */
$messages[] = sprintf( __( 'An error occurred when trying to update activity ID #%s.', 'buddypress' ), number_format_i18n( $errors[0] ) );
} else {
......@@ -986,7 +1008,7 @@ function bp_activity_admin_index() {
// Display each error as a list item.
foreach ( $errors as $error ) {
// Translators: This is a bulleted list of item IDs.
/* Translators: %s: the activity ID */
$error_msg .= '<li>' . sprintf( __( '#%s', 'buddypress' ), number_format_i18n( $error ) ) . '</li>';
}
......@@ -995,14 +1017,19 @@ function bp_activity_admin_index() {
}
}
if ( $spammed > 0 )
if ( $spammed > 0 ) {
/* translators: %s: the number of activities successfully marked as spam */
$messages[] = sprintf( _n( '%s activity item has been successfully spammed.', '%s activity items have been successfully spammed.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) );
}
if ( $unspammed > 0 )
if ( $unspammed > 0 ) {
/* translators: %s: the number of activities successfully marked as ham */
$messages[] = sprintf( _n( '%s activity item has been successfully unspammed.', '%s activity items have been successfully unspammed.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) );
}
if ( $updated > 0 )
if ( $updated > 0 ) {
$messages[] = __( 'The activity item has been updated successfully.', 'buddypress' );
}
}
// Prepare the activity items for display.
......@@ -1020,13 +1047,21 @@ function bp_activity_admin_index() {
<div class="wrap">
<h1>
<?php if ( !empty( $_REQUEST['aid'] ) ) : ?>
<?php printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?>
<?php
/* translators: %s: the activity ID */
printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
?>
<?php else : ?>
<?php _ex( 'Activity', 'Admin SWA page', 'buddypress' ); ?>
<?php endif; ?>
<?php if ( !empty( $_REQUEST['s'] ) ) : ?>
<span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
<span class="subtitle">
<?php
/* translators: %s: the activity search terms */
printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) );
?>
</span>
<?php endif; ?>
</h1>
......
......@@ -26,7 +26,7 @@ function bp_activity_admin_menu() {
return;
}
// Only show this menu to super admins
// Only show this menu to super admins.
if ( ! bp_current_user_can( 'bp_moderate' ) ) {
return;
}
......@@ -38,7 +38,7 @@ function bp_activity_admin_menu() {
), bp_get_admin_url( 'admin.php' ) );
// Add the top-level Edit Activity button.
$wp_admin_bar->add_menu( array(
$wp_admin_bar->add_node( array(
'id' => 'activity-admin',
'title' => __( 'Edit Activity', 'buddypress' ),
'href' => esc_url( $activity_edit_link ),
......
......@@ -60,7 +60,7 @@ function bp_activity_akismet_delete_old_metadata() {
// Enforce a minimum of 1 day.
$interval = max( 1, absint( $interval ) );
// _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status
// _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status.
$sql = $wpdb->prepare( "SELECT a.id FROM {$bp->activity->table_name} a LEFT JOIN {$bp->activity->table_name_meta} m ON a.id = m.activity_id WHERE m.meta_key = %s AND DATE_SUB(%s, INTERVAL {$interval} DAY) > a.date_recorded LIMIT 10000", '_bp_akismet_submission', current_time( 'mysql', 1 ) );
$activity_ids = $wpdb->get_col( $sql );
......
......@@ -100,7 +100,7 @@ function bp_activity_embed_has_activity( $activity_id = 0 ) {
$activity = (array) $activities_template->activities;
$activity = reset( $activity );
// No need to requery if we already got the embed activity
// No need to requery if we already got the embed activity.
if ( (int) $activity_id === $activity->id ) {
return $activities_template->has_activities();
}
......@@ -234,10 +234,10 @@ function bp_activity_embed_media() {
$thumbnail = $oembed->thumbnail_url;
/* Non-oEmbed standard attributes */
// Mixcloud
// Mixcloud.
} elseif ( isset( $oembed->image ) ) {
$thumbnail = $oembed->image;
// ReverbNation
// ReverbNation.
} elseif ( isset( $oembed->{'thumbnail-url'} ) ) {
$thumbnail = $oembed->{'thumbnail-url'};
}
......@@ -261,7 +261,7 @@ EOD;
$play_icon = sprintf( '<a rel="nofollow" class="play-btn" href="%1$s" onclick="top.location.href=\'%1$s\'">%2$s</a>', esc_url( $url ), $play_icon );
}
// Thumb width
// Thumb width.
$thumb_width = isset( $oembed->thumbnail_width ) && 'photo' !== $oembed->type && (int) $oembed->thumbnail_width < 550 ? (int) $oembed->thumbnail_width : $width;
$float_width = 350;
......@@ -274,17 +274,18 @@ EOD;
$caption .= sprintf( '<p class="caption-title"><strong>%s</strong></p>', apply_filters( 'single_post_title', $oembed->title ) );
}
// Show description (non-oEmbed standard)
// Show description (non-oEmbed standard).
if ( isset( $oembed->description ) ) {
$caption .= sprintf( '<div class="caption-description">%s</div>', apply_filters( 'bp_activity_get_embed_excerpt', $oembed->description ) );
}
// Show author info.
if ( isset( $oembed->provider_name ) && isset( $oembed->author_name ) ) {
/* translators: By [oEmbed author] on [oEmbed provider]. eg. By BuddyPress on YouTube. */
/* translators: 1: oEmbed author. 2: oEmbed provider. eg. By BuddyPress on YouTube. */
$anchor_text = sprintf( __( 'By %1$s on %2$s', 'buddypress' ), $oembed->author_name, $oembed->provider_name );
} elseif ( isset( $oembed->provider_name ) ) {
/* translators: %s: oEmbed provider. */
$anchor_text = sprintf( __( 'View on %s', 'buddypress' ), $oembed->provider_name );
}
......
......@@ -615,7 +615,7 @@ function bp_activity_heartbeat_strings( $strings = array() ) {
*/
$heartbeat_settings = apply_filters( 'heartbeat_settings', array() );
if ( ! empty( $heartbeat_settings['interval'] ) ) {
// 'Fast' is 5
// 'Fast' is 5.
$global_pulse = is_numeric( $heartbeat_settings['interval'] ) ? absint( $heartbeat_settings['interval'] ) : 5;
}
......
......@@ -522,12 +522,12 @@ function bp_activity_get_post_type_tracking_args( $post_type ) {
$post_type_activity->new_post_type_action_ms = $post_type_object->labels->bp_activity_new_post_ms;
}
// If the post type supports comments and has a comment action id, build the comments tracking args
// If the post type supports comments and has a comment action id, build the comments tracking args.
if ( $post_type_support_comments && ! empty( $post_type_activity->comment_action_id ) ) {
// Init a new container for the activity type for comments
// Init a new container for the activity type for comments.
$post_type_activity->comments_tracking = new stdClass();
// Build the activity type for comments
// Build the activity type for comments.
$post_type_activity->comments_tracking->component_id = $post_type_activity->component_id;
$post_type_activity->comments_tracking->action_id = $post_type_activity->comment_action_id;
......@@ -597,9 +597,9 @@ function bp_activity_get_post_types_tracking_args() {
$track_post_type = bp_activity_get_post_type_tracking_args( $post_type );
if ( ! empty( $track_post_type ) ) {
// Set the post type comments tracking args
// Set the post type comments tracking args.
if ( ! empty( $track_post_type->comments_tracking->action_id ) ) {
// Used to check support for comment tracking by activity type (new_post_type_comment)
// Used to check support for comment tracking by activity type (new_post_type_comment).
$track_post_type->comments_tracking->comments_tracking = true;
// Used to be able to find the post type this activity type is associated to.
......@@ -607,7 +607,7 @@ function bp_activity_get_post_types_tracking_args() {
$post_types_tracking_args[ $track_post_type->comments_tracking->action_id ] = $track_post_type->comments_tracking;
// Used to check support for comment tracking by activity type (new_post_type)
// Used to check support for comment tracking by activity type (new_post_type).
$track_post_type->comments_tracking = true;
}
......@@ -650,7 +650,7 @@ function bp_activity_type_supports( $activity_type = '', $feature = '' ) {
* eg. 'new_blog_post' and 'new_blog_comment' will both return true.
*/
case 'post-type-comment-tracking' :
// Set the activity track global if not set yet
// Set the activity track global if not set yet.
if ( empty( $bp->activity->track ) ) {
$bp->activity->track = bp_activity_get_post_types_tracking_args();
}
......@@ -726,7 +726,7 @@ function bp_activity_post_type_get_tracking_arg( $activity_type, $arg = '' ) {
$bp = buddypress();
// Set the activity track global if not set yet
// Set the activity track global if not set yet.
if ( empty( $bp->activity->track ) ) {
$bp->activity->track = bp_activity_get_post_types_tracking_args();
}
......@@ -1277,7 +1277,22 @@ function bp_activity_remove_all_user_data( $user_id = 0 ) {
do_action( 'bp_activity_remove_all_user_data', $user_id );
}
add_action( 'wpmu_delete_user', 'bp_activity_remove_all_user_data' );
add_action( 'delete_user', 'bp_activity_remove_all_user_data' );
/**
* Deletes user activity data on the 'delete_user' hook.
*
* @since 6.0.0
*
* @param int $user_id The ID of the deleted user.
*/
function bp_activity_remove_all_user_data_on_delete_user( $user_id ) {
if ( ! bp_remove_user_data_on_delete_user_hook( 'activity', $user_id ) ) {
return;
}
bp_activity_remove_all_user_data( $user_id );
}
add_action( 'delete_user', 'bp_activity_remove_all_user_data_on_delete_user' );
/**
* Mark all of the user's activity as spam.
......@@ -1523,7 +1538,11 @@ function bp_activity_generate_action_string( $activity ) {
* @return string $action
*/
function bp_activity_format_activity_action_activity_update( $action, $activity ) {
$action = sprintf( esc_html__( '%s posted an update', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) );
$action = sprintf(
/* translators: %s: the activity author user link */
esc_html__( '%s posted an update', 'buddypress' ),
bp_core_get_userlink( $activity->user_id )
);
/**
* Filters the formatted activity action update string.
......@@ -1546,7 +1565,11 @@ function bp_activity_format_activity_action_activity_update( $action, $activity
* @return string $action
*/
function bp_activity_format_activity_action_activity_comment( $action, $activity ) {
$action = sprintf( esc_html__( '%s posted a new activity comment', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) );
$action = sprintf(
/* translators: %s: the activity author user link */
esc_html__( '%s posted a new activity comment', 'buddypress' ),
bp_core_get_userlink( $activity->user_id )
);
/**
* Filters the formatted activity action comment string.
......@@ -1597,13 +1620,14 @@ function bp_activity_format_activity_action_custom_post_type_post( $action, $act
if ( ! empty( $bp->activity->track[ $activity->type ]->new_post_type_action_ms ) ) {
$action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action_ms, $user_link, esc_url( $post_url ), $blog_link );
} else {
/* translators: 1: the activity author user link. 2: the post link. 3: the blog link. */
$action = sprintf( esc_html_x( '%1$s wrote a new %2$s, on the site %3$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_link, $blog_link );
}
} else {
if ( ! empty( $bp->activity->track[ $activity->type ]->new_post_type_action ) ) {
$action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action, $user_link, $post_url );
} else {
/* translators: 1: the activity author user link. 2: the post link. */