Hi @taa,
1 . Yes, you can change text of BuddyPress activity stream as “uploaded a music track”, but it will be possible for single media upload only. For multiple media upload this trick would not work. The reason behind it is multiple media upload may include any type of media (music,photos,video… etc).
For single music upload you can put below code in your theme’s functions.php file:
function change_rtmedia_activity_action( $action, $username, $count, $user_nicename, $media_type ) {
if( strcmp( $media_type, "music" ) == 0 ) {
$media_const = 'RTMEDIA_' . strtoupper ( $media_type );
if ( $count > 1 ) {
$media_const .= '_PLURAL';
}
$media_const.='_LABEL';
$media_str = constant ( $media_const );
$media_type = "music track";
$action = sprintf (
_n(
'%s uploaded a %s', '%s uploaded %d %s.', $count, 'rtmedia'
), $username, $media_type, $media_str
);
}
return $action;
}
add_filter('rtmedia_buddypress_action_text_fitler', 'change_rtmedia_activity_action', 10, 5);
2 . To change message text you just need to put below code in your theme’s functions.php file:
function custom_no_media_found_message_function( $message ) {
$message = "Custom Message";
return $message;
}
add_filter( 'rtmedia_no_media_found_message_filter', 'custom_no_media_found_message_function' ,10, 1 );