Skip to content

Commit

Permalink
Merge pull request #4410 from buddyboss/PROD-7043
Browse files Browse the repository at this point in the history
[PROD-7043] Move media template parts inclusion into messages template
  • Loading branch information
KartikSuthar authored Jun 12, 2024
2 parents 219bc90 + 52c0e67 commit 8f71d51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@
<div class="bp-messages-content"></div>

</div>

<?php

if ( bp_is_active( 'media' ) && bp_is_messages_media_support_enabled() ) {
bp_get_template_part( 'media/theatre' );
}
if ( bp_is_active( 'video' ) && bp_is_messages_video_support_enabled() ) {
bp_get_template_part( 'video/theatre' );
}
if ( bp_is_active( 'media' ) && bp_is_messages_document_support_enabled() ) {
bp_get_template_part( 'document/theatre' );
}
10 changes: 0 additions & 10 deletions src/bp-templates/bp-nouveau/includes/messages/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ function bp_nouveau_messages_enqueue_scripts() {
wp_enqueue_style( 'bp-medium-editor' );
wp_enqueue_style( 'bp-medium-editor-beagle' );

if ( bp_is_active( 'media' ) && bp_is_messages_media_support_enabled() ) {
bp_get_template_part( 'media/theatre' );
}
if ( bp_is_active( 'video' ) && bp_is_messages_video_support_enabled() ) {
bp_get_template_part( 'video/theatre' );
}
if ( bp_is_active( 'media' ) && bp_is_messages_document_support_enabled() ) {
bp_get_template_part( 'document/theatre' );
}

/**
* Split each js template to its own file. Easier for child theme to
* overwrite individual parts.
Expand Down

0 comments on commit 8f71d51

Please sign in to comment.