399 | | ?> |
| 399 | /** |
| 400 | * adds contextual help to BuddyPress admin pages |
| 401 | * |
| 402 | * @since BuddyPress (1.7) |
| 403 | * |
| 404 | */ |
| 405 | function bp_core_add_contextual_help( $screen ){ |
| 406 | |
| 407 | $screen = get_current_screen(); |
| 408 | |
| 409 | switch( $screen->id ){ |
| 410 | // compontent page |
| 411 | case 'settings_page_bp-components' : |
| 412 | // help tabs |
| 413 | $screen->add_help_tab( array( |
| 414 | 'id' => 'bp-comp-overview', |
| 415 | 'title' => __('Overview'), |
| 416 | 'content' => bp_core_add_contextual_help_content('bp-comp-overview'), |
| 417 | )); |
| 418 | // help panel - sidebar links |
| 419 | $screen->set_help_sidebar( |
| 420 | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 421 | '<p>' . __( '<a href="http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-components">Managing Components</a>', 'buddypress' ) . '</p>' . |
| 422 | '<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| 423 | ); |
| 424 | break; |
| 425 | |
| 426 | // pages page |
| 427 | case 'settings_page_bp-page-settings' : |
| 428 | // help tabs |
| 429 | $screen->add_help_tab( array( |
| 430 | 'id' => 'bp-page-overview', |
| 431 | 'title' => __('Overview'), |
| 432 | 'content' => bp_core_add_contextual_help_content('bp-page-overview'), |
| 433 | )); |
| 434 | // help panel - sidebar links |
| 435 | $screen->set_help_sidebar( |
| 436 | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 437 | '<p>' . __( '<a href="http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-pages">Managing Pages</a>', 'buddypress' ) . '</p>' . |
| 438 | '<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| 439 | ); |
| 440 | break; |
| 441 | |
| 442 | // settings page |
| 443 | case 'settings_page_bp-settings' : |
| 444 | // help tabs |
| 445 | $screen->add_help_tab( array( |
| 446 | 'id' => 'bp-settings-overview', |
| 447 | 'title' => __('Overview'), |
| 448 | 'content' => bp_core_add_contextual_help_content('bp-settings-overview'), |
| 449 | )); |
| 450 | // help panel - sidebar links |
| 451 | $screen->set_help_sidebar( |
| 452 | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 453 | '<p>' . __( '<a href="http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-settings">Managing Settings</a>', 'buddypress' ) . '</p>' . |
| 454 | '<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| 455 | ); |
| 456 | break; |
| 457 | |
| 458 | // forums page |
| 459 | case 'settings_page_bb-forums-setup' : |
| 460 | // help tabs |
| 461 | $screen->add_help_tab( array( |
| 462 | 'id' => 'bp-forums-overview', |
| 463 | 'title' => __('Overview'), |
| 464 | 'content' => bp_core_add_contextual_help_content('bp-forums-overview'), |
| 465 | )); |
| 466 | // help panel - sidebar links |
| 467 | $screen->set_help_sidebar( |
| 468 | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 469 | '<p>' . __( '<a href="http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-forums">Managing Forums</a>', 'buddypress' ) . '</p>' . |
| 470 | '<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| 471 | ); |
| 472 | break; |
| 473 | |
| 474 | // profile fields page |
| 475 | case 'users_page_bp-profile-overview' : |
| 476 | // help tabs |
| 477 | $screen->add_help_tab( array( |
| 478 | 'id' => 'bp-profile-overview', |
| 479 | 'title' => __('Overview'), |
| 480 | 'content' => bp_core_add_contextual_help_content('bp-profile-overview'), |
| 481 | )); |
| 482 | // help panel - sidebar links |
| 483 | $screen->set_help_sidebar( |
| 484 | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 485 | '<p>' . __( '<a href="http://codex.buddypress.org/getting-started/configure-buddypress-components/#users-profile-fields">Managing Profile Fields</a>', 'buddypress' ) . '</p>' . |
| 486 | '<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| 487 | ); |
| 488 | break; |
| 489 | |
| 490 | default: |
| 491 | return false; |
| 492 | break; |
| 493 | } |
| 494 | } |
| 495 | add_action('contextual_help', 'bp_core_add_contextual_help'); |
| 496 | |
| 497 | |
| 498 | /** |
| 499 | * renders contextual help content to contextual help tabs |
| 500 | * |
| 501 | * @since BuddyPress (1.7) |
| 502 | * |
| 503 | */ |
| 504 | function bp_core_add_contextual_help_content( $tab = '' ){ |
| 505 | |
| 506 | switch( $tab ) { |
| 507 | case 'bp-comp-overview' : |
| 508 | return '<p>' . __( 'By default, all BuddyPress components are enabled. You can selectively disable any of the components by using the form. Your BuddyPress installation will continue to function. However, the features of the disabled components will no longer be accessible to anyone using the site.', 'buddypress' ) . '</p>'; |
| 509 | break; |
| 510 | |
| 511 | case'bp-page-overview' : |
| 512 | return '<p>' . __( 'BuddyPress Components are rendered as WordPress Pages in BuddyPress. You’ll recall that the component Pages were created and associated to respective BuddyPress components in Step 2 of the Installation Wizard. Here you can choose to change the associated pages.', 'buddypress' ) . '</p>'; |
| 513 | break; |
| 514 | |
| 515 | case 'bp-settings-overview' : |
| 516 | return '<p>' . __( 'Extra configuration settings.', 'buddypress' ) . '</p>'; |
| 517 | break; |
| 518 | |
| 519 | case 'bp-forums-overview' : |
| 520 | return '<p>' . __( 'You can choose to install Group Forums only, Sitewide Forums only, or Group and Sitewide Forums. For the best user experience you should choose only one option.', 'buddypress' ) . '</p>'; |
| 521 | break; |
| 522 | |
| 523 | case 'bp-profile-overview' : |
| 524 | return '<p>' . __( 'Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.</br></br>Note: Any fields in the first group will appear on the signup page.', 'buddypress' ) . '</p>'; |
| 525 | break; |
| 526 | |
| 527 | default: |
| 528 | return false; |
| 529 | break; |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | ?> |
| 534 | No newline at end of file |