[buddypress-trac] [BuddyPress Trac] #7675: Check bp_attachments_get_template_part() & revise it's hardcoded template directory
buddypress-trac
noreply at wordpress.org
Tue Jan 30 13:52:39 UTC 2018
#7675: Check bp_attachments_get_template_part() & revise it's hardcoded template
directory
--------------------------+-----------------------------
Reporter: hnla | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
This is just to highlight something we perhaps need to examine and relates
partly to the recent relocation of the assets dir in themes ( #7672 )
In `bp-core/bp-core-attachements.php` we run a function
`bp_attachements_get_template_part($slug)` L: 923 to locate the part
required.
Normally it will return `bp_get_template_part( $attachment_template_part )
e.g `assets/_attachments/upload.php`
I assume - as things appear ok with the change - this returns new location
ok.
However in the function we test for is_admin() to load parts for admin
screens and this is to some extent hardcoded to 'legacy' e.g:
`$attachment_admin_template_part = buddypress()->themes_dir . '/bp-
legacy/buddypress/' . $attachment_template_part . '.php'`
While that will work as we preserved the assets dir in legacy, do we want
to locate parts from legacy by default?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7675>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list