Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/24/2023 09:37:44 AM (2 years ago)
Author:
imath
Message:

Use a custom post type instead of the page post type for directories

  • The buddypress post type is now the one used for the BP component

directory page.

  • Introduce the bp_core_set_unique_directory_page_slug() function to

make sure there is no conflict with an existing WP page when setting the
BP Component directory page post_name.

  • Introduce the bp_restricted custom status. We'll be able to use it for

future visibility features.

  • Deprecate the Admin Slugs screen and corresponding functions
  • Bump raw_db_version to 13422 (the first commit about merging BP

Rewrites).

  • Add an update function to update the post type of the existing BP

component directory pages and potential WP Nav Menus including these.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

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

    r13414 r13431  
    147147        require( $this->admin_dir . 'bp-core-admin-functions.php'  );
    148148        require( $this->admin_dir . 'bp-core-admin-components.php' );
    149         require( $this->admin_dir . 'bp-core-admin-slugs.php'      );
    150149        require( $this->admin_dir . 'bp-core-admin-tools.php'      );
    151150        require( $this->admin_dir . 'bp-core-admin-optouts.php'    );
     
    275274        $this->submenu_pages['settings']['bp-components'] = $bp_components_page;
    276275        $hooks[]                                          = $bp_components_page;
    277 
    278         $bp_page_settings_page = add_submenu_page(
    279             $this->settings_page,
    280             __( 'BuddyPress Pages', 'buddypress' ),
    281             __( 'BuddyPress Pages', 'buddypress' ),
    282             $this->capability,
    283             'bp-page-settings',
    284             'bp_core_admin_slugs_settings'
    285         );
    286 
    287         $this->submenu_pages['settings']['bp-page-settings'] = $bp_page_settings_page;
    288         $hooks[]                                             = $bp_page_settings_page;
    289276
    290277        $bp_settings_page = add_submenu_page(
     
    627614
    628615        // Settings pages.
    629         remove_submenu_page( $this->settings_page, 'bp-page-settings' );
    630616        remove_submenu_page( $this->settings_page, 'bp-settings'      );
    631617        remove_submenu_page( $this->settings_page, 'bp-credits'       );
Note: See TracChangeset for help on using the changeset viewer.