Changeset 13514 for trunk/src/bp-core/admin/bp-core-admin-functions.php
- Timestamp:
- 07/12/2023 03:38:26 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-functions.php
r13502 r13514 260 260 261 261 // Only components with 'has_directory' require a WP page to function. 262 foreach ( array_keys( $bp->loaded_components ) as$component_id ) {262 foreach ( $bp->loaded_components as $component_slug => $component_id ) { 263 263 if ( ! empty( $bp->{$component_id}->has_directory ) ) { 264 264 $wp_page_components[] = array( … … 291 291 foreach ( $wp_page_components as $component ) { 292 292 if ( ! isset( $bp->pages->{$component['id']} ) ) { 293 $orphaned_components[ $component['id'] ] = $component['name']; 293 $component_props = $component; 294 if ( isset( $bp->{$component['id']}->directory_title ) ) { 295 $component_props['title'] = $bp->{$component['id']}->directory_title; 296 } else { 297 $component_props['title'] = $component_props['name']; 298 } 299 300 if ( isset( $bp->{$component['id']}->root_slug ) ) { 301 $component_props['name'] = $bp->{$component['id']}->root_slug; 302 } 303 304 $orphaned_components[ $component['id'] ] = $component_props; 294 305 } 295 306 } … … 300 311 // Translators: %s is the comma separated list of components needing a directory page. 301 312 __( 'The following active BuddyPress Components do not have associated BuddyPress Pages: %s.', 'buddypress' ), 302 '<strong>' . implode( '</strong>, <strong>', array_map( 'esc_html', $orphaned_components) ) . '</strong>'313 '<strong>' . implode( '</strong>, <strong>', array_map( 'esc_html', wp_list_pluck( $orphaned_components, 'title' ) ) ) . '</strong>' 303 314 ); 304 315 … … 310 321 $notice = sprintf( 311 322 // Translators: %s is the comma separated list of components needing a directory page. 312 __( 'A BuddyPress page has been added for the following active BuddyPress Components which did not have associated BuddyPress Pages yet: %s. ', 'buddypress' ),313 '<strong>' . implode( '</strong>, <strong>', array_map( 'esc_html', $orphaned_components) ) . '</strong>'323 __( 'A BuddyPress page has been added for the following active BuddyPress Components which did not have associated BuddyPress Pages yet: %s. You may need to refresh your permalink settings.', 'buddypress' ), 324 '<strong>' . implode( '</strong>, <strong>', array_map( 'esc_html', wp_list_pluck( $orphaned_components, 'title' ) ) ) . '</strong>' 314 325 ); 315 326 }
Note: See TracChangeset
for help on using the changeset viewer.