Changeset 13432 for trunk/src/bp-blogs/classes/class-bp-blogs-component.php
- Timestamp:
- 03/01/2023 08:17:11 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r13414 r13432 44 44 * Set up global settings for the blogs component. 45 45 * 46 * The BP_BLOGS_SLUG constant is deprecated, and only used here for 47 * backwards compatibility. 46 * The BP_BLOGS_SLUG constant is deprecated. 48 47 * 49 48 * @since 1.5.0 … … 54 53 */ 55 54 public function setup_globals( $args = array() ) { 56 $bp = buddypress(); 57 58 if ( ! defined( 'BP_BLOGS_SLUG' ) ) { 59 define ( 'BP_BLOGS_SLUG', $this->id ); 55 $bp = buddypress(); 56 $default_slug = $this->id; 57 58 // @deprecated. 59 if ( defined( 'BP_BLOGS_SLUG' ) ) { 60 _doing_it_wrong( 'BP_BLOGS_SLUG', esc_html__( 'Slug constants are deprecated.', 'buddypress' ), 'BuddyPress 12.0.0' ); 61 $default_slug = BP_BLOGS_SLUG; 60 62 } 61 63 … … 76 78 // All globals for blogs component. 77 79 $args = array( 78 'slug' => BP_BLOGS_SLUG,79 'root_slug' => isset( $bp->pages->blogs->slug ) ? $bp->pages->blogs->slug : BP_BLOGS_SLUG,80 'slug' => $default_slug, 81 'root_slug' => isset( $bp->pages->blogs->slug ) ? $bp->pages->blogs->slug : $default_slug, 80 82 'has_directory' => is_multisite(), // Non-multisite installs don't need a top-level Sites directory, since there's only one site. 83 'rewrite_ids' => array( 84 'directory' => 'blogs', 85 'single_item_action' => 'blogs_action', 86 'single_item_action_variables' => 'blogs_action_variables', 87 ), 81 88 'directory_title' => isset( $bp->pages->blogs->title ) ? $bp->pages->blogs->title : $default_directory_title, 82 89 'notification_callback' => 'bp_blogs_format_notifications',
Note: See TracChangeset
for help on using the changeset viewer.