Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forum posts are posted without support for shortcodes. #2289

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bp-activity/bp-activity-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2104,6 +2104,8 @@ function bp_activity_get_specific( $args = '' ) {
'update_meta_cache' => $r['update_meta_cache'],
);



/**
* Filters the requested specific activity item.
*
Expand Down
3 changes: 2 additions & 1 deletion src/bp-activity/bp-activity-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ function bp_has_activities( $args = '' ) {
$r['spam'] = 'all';
}



/*
* Query
*/

$activities_template = new BP_Activity_Template( $r );

/**
Expand Down
2 changes: 2 additions & 0 deletions src/bp-activity/classes/class-bp-activity-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ public function __construct( $args ) {
$r = wp_parse_args( $args, $defaults );
extract( $r );



$this->pag_arg = sanitize_key( $r['page_arg'] );
$this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] );
$this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] );
Expand Down
5 changes: 4 additions & 1 deletion src/bp-document/bp-document-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,17 +639,20 @@ function bp_document_attach_document_to_message( &$message ) {

if ( ! empty( $document_id ) && ! is_wp_error( $document_id ) ) {

$thread_id = ( isset( $_POST['thread_id'] ) ? $_POST['thread_id'] : 0 );
$activity_id = bp_activity_add(
array(
'hide_sitewide' => true,
'action' => sprintf( __( '%s attached a document', 'buddyboss' ), bp_core_get_userlink( bp_loggedin_user_id() ) ),
'component' => buddypress()->messages->id,
'type' => 'message_document_update',
'privacy' => 'document',
'privacy' => 'message',
'content' => ' ',
'item_id' => $thread_id
)
);

bp_activity_update_meta( $activity_id, 'thread_id', $thread_id );
bp_activity_update_meta( $activity_id, 'bp_document_ids', $document_id );
bp_activity_update_meta( $activity_id, 'bp_document_activity', '1' );
update_post_meta( $attachment_id, 'bp_document_activity_id', $activity_id );
Expand Down
19 changes: 11 additions & 8 deletions src/bp-media/bp-media-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,18 @@ function bp_media_attach_media_to_message( &$message ) {
if ( bp_is_active( 'activity' ) && !empty( $media_ids ) ) {
foreach ( $media_ids as $media_id ) {

$thread_id = ( isset( $_POST['thread_id'] ) ? $_POST['thread_id'] : 0 );
$activity_id = bp_activity_add( array(
'hide_sitewide' => true,
'action' => sprintf( __( '%s attached a media', 'buddyboss' ), bp_core_get_userlink( bp_loggedin_user_id() ) ),
'component' => buddypress()->messages->id,
'type' => 'message_media_update',
'privacy' => 'media',
'content' => ' ',
) );

'hide_sitewide' => true,
'action' => sprintf( __( '%s attached a media', 'buddyboss' ), bp_core_get_userlink( bp_loggedin_user_id() ) ),
'component' => buddypress()->messages->id,
'type' => 'message_media_update',
'privacy' => 'message',
'content' => ' ',
'item_id' => $thread_id
) );

bp_activity_update_meta( $activity_id, 'thread_id', $thread_id );
bp_activity_update_meta( $activity_id, 'bp_media_ids', $media_id );
bp_activity_update_meta( $activity_id, 'bp_media_activity', '1' );

Expand Down
6 changes: 6 additions & 0 deletions src/bp-templates/bp-nouveau/includes/document/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ function bp_nouveau_ajax_document_get_activity() {
}
}

$check_message_activity = bp_activity_get_meta( $post_id, 'thread_id', true );
if ( $check_message_activity ) {
$args['privacy'] = 'message';
$args['scope'] = 'message';
}

ob_start();
if ( bp_has_activities( $args ) ) {
while ( bp_activities() ) {
Expand Down
5 changes: 5 additions & 0 deletions src/bp-templates/bp-nouveau/includes/media/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,11 @@ function bp_nouveau_ajax_media_get_activity() {
);
}

$check_message_activity = bp_activity_get_meta( $media_activity, 'thread_id', true );
if ( $check_message_activity ) {
$args['privacy'] = 'message';
}

ob_start();
if ( bp_has_activities( $args ) ) {
while ( bp_activities() ) {
Expand Down