Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/01/2024 06:07:04 AM (13 months ago)
Author:
imath
Message:

Improve BuddyPress compatibility with WP Playground previews

  • Avoid using SIGNED casting into the SQL query retrieving the signup field IDs as it's generating an error with WP Playground SQLite db.
  • Make sure BP URI globals are set during Ajax requests passing the current displayed page canonical URL into these requests.
  • Ignore the bp-message cookie when its value is set to deleted to prevent the wrong display of a template notice when BP Legacy is the active template pack.
  • Update JSON blueprints to latest WP Playground's blueprint schema.

Props espellcaste

Fixes #9207
Closes https://github.com/buddypress/buddypress/pull/389

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-catchuri.php

    r13904 r14068  
    3838    }
    3939
    40     bp_reset_query( bp_get_referer_path(), $GLOBALS['wp_query'] );
     40    $referer = bp_get_referer_path();
     41    if ( ! $referer && isset( $_REQUEST['canonicalUrl'] ) ) {
     42        $canonical_url = esc_url_raw( wp_unslash( $_REQUEST['canonicalUrl'] ) );
     43        $referer       = wp_validate_redirect( wp_parse_url( $canonical_url, PHP_URL_PATH ) );
     44    }
     45
     46    bp_reset_query( $referer, $GLOBALS['wp_query'] );
    4147}
    4248
Note: See TracChangeset for help on using the changeset viewer.