Opened 10 years ago
Closed 10 years ago
#6077 closed defect (bug) (fixed)
bp_modify_page_title can only be used before wp_head
Reported by: | DJPaul | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
bp_modify_page_title
can only be used before the wp_head
action fires because bp_core_sort_subnav_items
re-keys the $bp->bp_options_nav
variable.
(From https://gist.github.com/paulgibbs/b679bb55843bf6840704 to https://gist.github.com/paulgibbs/0bfb25fe7d49013707d4)
Given that I believe all this has been in place for at least four years, updating how bp_options_nav
is handled seems an arduous and risky task. We can re-implement part of the logic using other data in the existing array so that bp_modify_page_title
works whenever and wherever you call it, regardless of the state of the global.
Attached a patch which works for me.