- Timestamp:
- 03/01/2023 08:17:11 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-component.php
r13414 r13432 439 439 * Set up component global data. 440 440 * 441 * The BP_GROUPS_SLUG constant is deprecated, and only used here for 442 * backwards compatibility. 441 * The BP_GROUPS_SLUG constant is deprecated. 443 442 * 444 443 * @since 1.5.0 … … 449 448 */ 450 449 public function setup_globals( $args = array() ) { 451 $bp = buddypress(); 452 453 // Define a slug, if necessary. 454 if ( ! defined( 'BP_GROUPS_SLUG' ) ) { 455 define( 'BP_GROUPS_SLUG', $this->id ); 450 $bp = buddypress(); 451 $default_slug = $this->id; 452 453 // @deprecated. 454 if ( defined( 'BP_GROUPS_SLUG' ) ) { 455 _doing_it_wrong( 'BP_GROUPS_SLUG', esc_html__( 'Slug constants are deprecated.', 'buddypress' ), 'BuddyPress 12.0.0' ); 456 $default_slug = BP_GROUPS_SLUG; 456 457 } 457 458 … … 475 476 // Note that global_tables is included in this array. 476 477 $args = array( 477 'slug' => BP_GROUPS_SLUG,478 'root_slug' => isset( $bp->pages->groups->slug ) ? $bp->pages->groups->slug : BP_GROUPS_SLUG,478 'slug' => $default_slug, 479 'root_slug' => isset( $bp->pages->groups->slug ) ? $bp->pages->groups->slug : $default_slug, 479 480 'has_directory' => true, 481 'rewrite_ids' => array( 482 'directory' => 'groups', 483 'directory_type' => 'groups_type', 484 'create_single_item' => 'group_create', 485 'create_single_item_variables' => 'group_create_variables', 486 'single_item' => 'group', 487 'single_item_action' => 'group_action', 488 'single_item_action_variables' => 'group_action_variables', 489 ), 480 490 'directory_title' => isset( $bp->pages->groups->title ) ? $bp->pages->groups->title : $default_directory_title, 481 491 'notification_callback' => 'groups_format_notifications',
Note: See TracChangeset
for help on using the changeset viewer.