[buddypress-trac] [BuddyPress Trac] #9224: Introduce a filterable function to inform about whether BP is running from `src`
buddypress-trac
noreply at wordpress.org
Wed Aug 7 12:13:23 UTC 2024
#9224: Introduce a filterable function to inform about whether BP is running from
`src`
-------------------------+-----------------------------
Reporter: imath | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: normal | Keywords:
-------------------------+-----------------------------
This is a follow up of the patch @emaralive suggested about #9210.
As he commented on the corresponding GH PR, I haven't explained why I
decided to not include the part where he was adding a filter to bypass the
`defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY` so that
testing how the deprecated code is loaded can be achieved using the trunk
(development) version of BuddyPress.
To perform this kind of tests as well as whether minified JavaScript are
loaded, we already have something in place: testing a build.
We can do: `grunt build` from the console/terminal and then the `/build`
subdirectory will be generated and BuddyPress will load from there instead
of the `/src` subdirectory. I'd personally advise using this way.
But if you think we should introduce a filter, then I suggest to avoid
some code duplication at the same time, introducing the
`bp_is_running_from_src_subdirectory()` filterable function.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9224>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list