Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/07/2023 11:36:50 AM (12 months ago)
Author:
imath
Message:

BP Rewrites merge process, final touches

This commit is closing the main ticket about migrating our Legacy URL parser to using the WP Rewrite API. Please open next possible issues in new tickets.

The final touches:

  • Make sure BP Activity Embeds are fully supported when using the BP Rewrites API.
  • Make sure BuddyPress directories are fetched into the Site Editor's Navigation block.
  • Deprecate bp_admin_display_directory_states() and move the BP Page directory states feature into the BP Classic backcompat plugin.
  • Remove the Page settings Admin help tab & move it into BP Classic
  • Introduce the bp_core_include_directory_on_front() in order to maintain the possibility to use a BP Directory page as the site's home page.

Props r-a-y, johnjamesjacoby, boonebgorges

Closes https://github.com/buddypress/buddypress/pull/95
Fixes #4954

File:
1 edited

Legend:

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

    r13461 r13471  
    6161add_action( 'bp_admin_menu', 'bp_admin_separator' );
    6262
    63 // Add a filter to include BP Components directory pages display states.
    64 add_filter( 'display_post_states', 'bp_admin_display_directory_states', 10, 2 );
    65 
    6663/**
    6764 * When a new site is created in a multisite installation, run the activation
     
    239236    do_action( 'bp_register_admin_settings' );
    240237}
    241 
    242 /**
    243  * Dedicated filter to inform about BP components directory page states.
    244  *
    245  * @since 10.0.0
    246  *
    247  * @param string[] $post_states An array of post display states.
    248  * @param WP_Post  $post        The current post object.
    249  */
    250 function bp_admin_display_directory_states( $post_states = array(), $post = null ) {
    251     /**
    252      * Filter here to add BP Directory pages.
    253      *
    254      * Used internaly by BP_Component->admin_directory_states(). Please use the dynamic
    255      * filter in BP_Component->admin_directory_states() to edit the directory state
    256      * according to the component's ID.
    257      *
    258      * @since 10.0.0
    259      *
    260      * @param array    $value An empty array.
    261      * @param WP_Post  $post  The current post object.
    262      */
    263     $directory_page_states = apply_filters( 'bp_admin_display_directory_states', array(), $post );
    264 
    265     if ( $directory_page_states ) {
    266         $post_states = array_merge( $post_states, $directory_page_states );
    267     }
    268 
    269     return $post_states;
    270 }
Note: See TracChangeset for help on using the changeset viewer.