[buddypress-trac] [BuddyPress Trac] #6252: bp_core_referrer() not returning leading slash
buddypress-trac
noreply at wordpress.org
Wed Feb 25 15:01:07 UTC 2015
#6252: bp_core_referrer() not returning leading slash
-------------------------------------+---------------------------
Reporter: mechter | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.3
Component: API | Version: 2.2.1
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing |
-------------------------------------+---------------------------
Comment (by boonebgorges):
Replying to [comment:6 mechter]:
> We could extract the code from `bp_core_referrer()` into
`bp_core_set_uri_globals()`, fix the leading slash there, deprecate
`bp_core_referrer()` and unit test `bp_core_set_uri_globals()`. We would
have some duplicate code for a while. How many major/minor versions are
deprecated functions kept in core?
Whoops, committed over the top of you there. `bp_core_set_uri_globals()`
is a behemoth and nearly impossible to test accurately, especially for
something like this that doesn't manifest itself in core behavior. I've
gone ahead and added `bp_get_referer_path()` (function name chosen to
parallel `wp_get_referer()` better) with appropriate unit tests.
Deprecated functions are kept around forever, and are loaded by default -
they can be toggled with the `BP_IGNORE_DEPRECATED` constant.
Thanks for your help working through this one.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6252#comment:9>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list