Changeset 4961 for trunk/bp-core/admin/bp-core-admin.php
- Timestamp:
- 08/10/2011 06:32:02 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-admin.php
r4920 r4961 19 19 * @since {@internal Unknown}} 20 20 */ 21 function bp_core_admin_dashboard() { 21 function bp_core_admin_dashboard() { 22 22 $base_url = bp_get_admin_url( 'admin.php' ); 23 23 $action = add_query_arg( array( 'page' => 'bp-general-settings' ), $base_url ); … … 331 331 function bp_core_admin_component_options() { 332 332 global $bp_wizard; 333 333 334 334 // Load core functions, if needed 335 335 if ( !function_exists( 'bp_get_option' ) ) … … 337 337 338 338 $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); 339 339 340 340 // An array of strings looped over to create component setup markup 341 341 $optional_components = apply_filters( 'bp_admin_optional_components', array( … … 388 388 ), 389 389 ) ); 390 390 391 391 // On new install, set all components to be active by default 392 392 if ( !empty( $bp_wizard ) && 'install' == $bp_wizard->setup_type && empty( $active_components ) ) … … 394 394 395 395 ?> 396 396 397 397 <?php /* The setup wizard uses different, more descriptive text here */ ?> 398 398 <?php if ( empty( $bp_wizard ) ) : ?> 399 399 400 400 <h3><?php _e( 'Available Components', 'buddypress' ); ?></h3> 401 401 402 402 <p><?php _e( 'Each component has a unique purpose, and your community may not need each one.', 'buddypress' ); ?></p> 403 403 404 404 <?php endif ?> 405 405 406 406 <table class="form-table"> 407 407 <tbody> … … 480 480 function bp_core_admin_page_options() { 481 481 global $bp; 482 482 483 483 // Get the existing WP pages 484 484 $existing_pages = bp_core_get_directory_page_ids(); … … 492 492 // Only components that need directories should be listed here 493 493 if ( isset( $bp->{$component_id} ) && !empty( $bp->{$component_id}->has_directory ) ) { 494 494 495 495 // component->name was introduced in BP 1.5, so we must provide a fallback 496 496 $component_name = !empty( $bp->{$component_id}->name ) ? $bp->{$component_id}->name : ucwords( $component_id ); 497 497 498 498 $directory_pages[$component_id] = $component_name; 499 499 } 500 500 } 501 501 502 502 $directory_pages = apply_filters( 'bp_directory_pages', $directory_pages ); 503 503 504 504 ?> 505 505 506 506 <h3><?php _e( 'Directories', 'buddypress' ); ?></h3> 507 507 508 508 <p><?php _e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p> 509 509 … … 513 513 <?php foreach ( $directory_pages as $name => $label ) : ?> 514 514 <?php $disabled = !bp_is_active( $name ) ? ' disabled="disabled"' : ''; ?> 515 515 516 516 <tr valign="top"> 517 517 <th scope="row"> … … 520 520 521 521 <td> 522 <?php if ( !bp_is_root_blog() ) 522 <?php if ( !bp_is_root_blog() ) 523 523 switch_to_blog( bp_get_root_blog_id() ) ?> 524 524 525 525 <?php echo wp_dropdown_pages( array( 526 526 'name' => 'bp_pages[' . esc_attr( $name ) . ']', … … 538 538 539 539 <?php endif; ?> 540 541 <?php if ( !bp_is_root_blog() ) 540 541 <?php if ( !bp_is_root_blog() ) 542 542 restore_current_blog() ?> 543 543 … … 552 552 </tbody> 553 553 </table> 554 554 555 555 <?php 556 556
Note: See TracChangeset
for help on using the changeset viewer.