Skip to:
Content

BuddyPress.org

Changes between Version 4 and Version 5 of Ticket #4954, comment 13


Ignore:
Timestamp:
02/12/2014 08:19:26 PM (10 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4954, comment 13

    v4 v5  
    1111* '''Some hooks are moved to 'bp_parse_query'''' - `bp_setup_nav()` and `_bp_maybe_remove_redirect_canonical()` now run on 'bp_parse_query' to account for the URI property changes above.  This should rarely break anything.
    1212
    13 * '''AJAX and bp_current_X() checks''' - ~~With rewrite rules, the `'parse_query'` hook does not run during AJAX requests.~~ Ray be stupid!  'parse_query' ''does'' run, but WP checks the current REQUEST_URI on AJAX and not the referer's REQUEST_URI, which is what we need WP to check.  This means any BP URI property checks (using a `bp_is_current_X() function`) during AJAX will fail.  To workaround this, I decided to keep on using `bp_core_set_uri_globals()`, but run it on AJAX only.  I don't see a better way around this without using some version of that function during AJAX.  Might build upon the new `bp_core_get_from_uri()` function, which is lighter than the old bp_core_set_uri_globals(). Will look into this some more.
     13* '''AJAX and bp_current_X() checks''' -  With rewrite rules, the 'parse_query' hook does not run during AJAX requests. That means any BP URI property checks (using a bp_is_current_X() function) during AJAX will fail. To workaround this, I decided to keep on using bp_core_set_uri_globals(), but run it on AJAX only. I don't see a better way around this without using some version of that function during AJAX. Might build upon the new bp_core_get_from_uri() function, which is lighter than the old bp_core_set_uri_globals(). Will look into this some more.
    1414
    1515* '''Shortlink canonical redirection''' - Try something like `domain.com/?bp_user_id=1` or `domain.com/?bp_group_id=1`.  This will redirect to the pretty permalink.  Still a lot of work to do to our output link functions if we want to support non-fancy permalinks entirely.