Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/03/2023 06:18:23 AM (21 months ago)
Author:
imath
Message:

Stop using BP Legacy URL parser in favor of the new BP Rewrites API

  • Deprecate bp_core_set_uri_globals(). This function is moved inside the BP Classic compatibility plugin.
  • Introduce the new bp_register_nav action to hook to when globalizing Members single item navigations from the BP_Component class.
  • Improve bp_get_component_navigations() so that Avatar/Cover images navigation items are moved inside the Profile sub nav if the Extended profile component is active.
  • Register Avatar/Cover images Ajax actions so that these actions trigger our new URL Parser inside Ajax context.
  • Improve the BP_Core_Nav::add_nav() method so that any BP action variable slugs can be customized.
  • Improve Members & Groups component canonical redirections.
  • Handle slugs customization persistency using directory pages post metas.
  • Introduce a new repair tool to reset all slugs to BuddyPress default one.
  • Adapt some PHPUnit tests to better handle our new URL parser.

Props Props r-a-y, johnjamesjacoby, boonebgorges

Closes https://github.com/buddypress/buddypress/pull/94
See #4954

File:
1 edited

Legend:

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

    r13436 r13468  
    26012601}
    26022602add_action( 'wp_ajax_bp_avatar_delete_previous', 'bp_avatar_ajax_delete_previous_avatar' );
     2603
     2604
     2605/**
     2606 * Register Avatar ajax actions.
     2607 *
     2608 * @since 12.0.0
     2609 */
     2610function bp_avatar_register_ajax_actions() {
     2611    $ajax_actions = array( 'bp_avatar_upload', 'bp_avatar_set', 'bp_avatar_delete', 'bp_avatar_recycle_previous', 'bp_avatar_delete_previous' );
     2612
     2613    foreach ( $ajax_actions as $ajax_action ) {
     2614        bp_ajax_register_action( $ajax_action );
     2615    }
     2616}
     2617add_action( 'bp_init', 'bp_avatar_register_ajax_actions' );
Note: See TracChangeset for help on using the changeset viewer.