diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php
index 7646b80..c8361c9 100644
|
|
|
function bp_attachments_get_template_part( $slug ) {
|
| 395 | 395 | |
| 396 | 396 | // Load the attachment template in WP Administration screens. |
| 397 | 397 | if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { |
| 398 | | $attachment_admin_template_part = buddypress()->themes_dir . '/bp-legacy/buddypress/' . $attachment_template_part . '.php'; |
| | 398 | /** |
| | 399 | * Filter the attachment template part for the WP Admin context |
| | 400 | * |
| | 401 | * Plugin developers: make sure to use this filter for your very own additional attachment template parts only. |
| | 402 | * In your filter, you'll just need to check the $slug value is matching the additional template part you requested. |
| | 403 | * |
| | 404 | * For now all attachment template parts located in the assets/_attachments BP Legacy's directory are private. |
| | 405 | * Please do not override them. |
| | 406 | * |
| | 407 | * @since 2.4.0 |
| | 408 | * |
| | 409 | * @param string $value Path to the admin template part |
| | 410 | * @param string $slug Requested template slug |
| | 411 | */ |
| | 412 | $attachment_admin_template_part = apply_filters( 'bp_attachments_get_admin_template_part', buddypress()->themes_dir . '/bp-legacy/buddypress/' . $attachment_template_part . '.php', $slug ); |
| 399 | 413 | |
| 400 | 414 | // Check whether the template part exists. |
| 401 | 415 | if ( ! file_exists( $attachment_admin_template_part ) ) { |