bp_document_activity_append_document( $content,  $activity )

Append the document content to activity read more content

Description

Parameters

$content

(Required)

$activity

(Required)

Return

(string)

Source

File: bp-document/bp-document-filters.php

129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
function bp_document_activity_append_document( $content, $activity ) {
 
    $document_ids = bp_activity_get_meta( $activity->id, 'bp_document_ids', true );
 
    if ( ! empty( $document_ids ) && bp_has_document(
        array(
            'include'  => $document_ids,
            'order_by' => 'menu_order',
            'sort'     => 'ASC',
        )
    ) ) {
 
        ?>
        <?php ob_start(); ?>
        <div class="bb-activity-media-wrap bb-media-length-1 ">
            <?php
            bp_get_template_part( 'document/activity-document-move' );
            while ( bp_document() ) {
                bp_the_document();
                bp_get_template_part( 'document/activity-entry' );
            }
            ?>
        </div>
        <?php
        $content .= ob_get_clean();
    }
 
    return $content;
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.