diff --git src/bp-core/admin/bp-core-admin-functions.php src/bp-core/admin/bp-core-admin-functions.php
index e47889d2b..28ace183d 100644
|
|
|
add_action( 'bp_admin_tabs', 'bp_backcompat_admin_tabs', 1, 2 ); |
| 670 | 670 | */ |
| 671 | 671 | function bp_core_add_contextual_help( $screen = '' ) { |
| 672 | 672 | |
| 673 | | $screen = get_current_screen(); |
| | 673 | $screen = get_current_screen(); |
| | 674 | $bp_forum = sprintf( |
| | 675 | '<a href="%1$s">%2$s</a>', |
| | 676 | esc_url( 'https://buddypress.org/support/' ), |
| | 677 | esc_html__( 'Support Forums', 'buddypress' ) |
| | 678 | ); |
| 674 | 679 | |
| 675 | 680 | switch ( $screen->id ) { |
| 676 | 681 | |
| … |
… |
function bp_core_add_contextual_help( $screen = '' ) { |
| 685 | 690 | ) |
| 686 | 691 | ); |
| 687 | 692 | |
| | 693 | $manage_components = sprintf( |
| | 694 | '<a href="%1$s">%2$s</a>', |
| | 695 | esc_url( 'https://codex.buddypress.org/getting-started/configure-components/' ), |
| | 696 | esc_html__( 'Managing Components', 'buddypress' ) |
| | 697 | ); |
| | 698 | |
| | 699 | // Help panel - sidebar links. |
| | 700 | $screen->set_help_sidebar( |
| | 701 | '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| | 702 | '<p>' . $manage_components . '</p>' . |
| | 703 | '<p>' . $bp_forum . '</p>' |
| | 704 | ); |
| | 705 | break; |
| | 706 | |
| | 707 | // Component page. |
| | 708 | case 'settings_page_bp-rewrites': |
| | 709 | // Help tabs. |
| | 710 | $screen->add_help_tab( |
| | 711 | array( |
| | 712 | 'id' => 'bp-rewrites-overview', |
| | 713 | 'title' => esc_html__( 'Overview', 'buddypress' ), |
| | 714 | 'content' => bp_core_add_contextual_help_content( 'bp-rewrites-overview' ), |
| | 715 | ) |
| | 716 | ); |
| | 717 | |
| 688 | 718 | // Help panel - sidebar links. |
| 689 | 719 | $screen->set_help_sidebar( |
| 690 | | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 691 | | '<p>' . __( '<a href="https://codex.buddypress.org/getting-started/configure-components/">Managing Components</a>', 'buddypress' ) . '</p>' . |
| 692 | | '<p>' . __( '<a href="https://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| | 720 | '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| | 721 | '<p>' . $bp_forum . '</p>' |
| 693 | 722 | ); |
| 694 | 723 | break; |
| 695 | 724 | |
| … |
… |
function bp_core_add_contextual_help( $screen = '' ) { |
| 699 | 728 | $screen->add_help_tab( |
| 700 | 729 | array( |
| 701 | 730 | 'id' => 'bp-settings-overview', |
| 702 | | 'title' => __( 'Overview', 'buddypress' ), |
| | 731 | 'title' => esc_html__( 'Overview', 'buddypress' ), |
| 703 | 732 | 'content' => bp_core_add_contextual_help_content( 'bp-settings-overview' ), |
| 704 | 733 | ) |
| 705 | 734 | ); |
| 706 | 735 | |
| | 736 | $manage_settings = sprintf( |
| | 737 | '<a href="%1$s">%2$s</a>', |
| | 738 | esc_url( 'https://codex.buddypress.org/getting-started/configure-components/#settings-buddypress-settings' ), |
| | 739 | esc_html__( 'Managing Settings', 'buddypress' ) |
| | 740 | ); |
| | 741 | |
| 707 | 742 | // Help panel - sidebar links. |
| 708 | 743 | $screen->set_help_sidebar( |
| 709 | | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 710 | | '<p>' . __( '<a href="https://codex.buddypress.org/getting-started/configure-components/#settings-buddypress-settings">Managing Settings</a>', 'buddypress' ) . '</p>' . |
| 711 | | '<p>' . __( '<a href="https://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| | 744 | '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| | 745 | '<p>' . $manage_settings . '</p>' . |
| | 746 | '<p>' . $bp_forum . '</p>' |
| 712 | 747 | ); |
| 713 | 748 | |
| 714 | 749 | break; |
| … |
… |
function bp_core_add_contextual_help( $screen = '' ) { |
| 724 | 759 | ) |
| 725 | 760 | ); |
| 726 | 761 | |
| | 762 | $manage_profile_fields = sprintf( |
| | 763 | '<a href="%1$s">%2$s</a>', |
| | 764 | esc_url( 'https://codex.buddypress.org/administrator-guide/extended-profiles/' ), |
| | 765 | esc_html__( 'Managing Profile Fields', 'buddypress' ) |
| | 766 | ); |
| | 767 | |
| 727 | 768 | // Help panel - sidebar links. |
| 728 | 769 | $screen->set_help_sidebar( |
| 729 | | '<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| 730 | | '<p>' . __( '<a href="https://codex.buddypress.org/administrator-guide/extended-profiles/">Managing Profile Fields</a>', 'buddypress' ) . '</p>' . |
| 731 | | '<p>' . __( '<a href="https://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>' |
| | 770 | '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' . |
| | 771 | '<p>' . $manage_profile_fields . '</p>' . |
| | 772 | '<p>' . $bp_forum . '</p>' |
| 732 | 773 | ); |
| 733 | 774 | |
| 734 | 775 | break; |
| 735 | 776 | } |
| 736 | 777 | } |
| 737 | 778 | add_action( 'load-settings_page_bp-components', 'bp_core_add_contextual_help' ); |
| | 779 | add_action( 'load-settings_page_bp-rewrites', 'bp_core_add_contextual_help' ); |
| 738 | 780 | add_action( 'load-settings_page_bp-settings', 'bp_core_add_contextual_help' ); |
| 739 | 781 | add_action( 'load-users_page_bp-profile-setup', 'bp_core_add_contextual_help' ); |
| 740 | 782 | |
| … |
… |
function bp_core_add_contextual_help_content( $tab = '' ) { |
| 761 | 803 | $retval = __( 'Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.', 'buddypress' ) . '<br /><br />' . __( 'Note: Drag fields from other groups and drop them on the "Signup Fields" tab to include them into your registration form.', 'buddypress' ); |
| 762 | 804 | break; |
| 763 | 805 | |
| | 806 | case 'bp-rewrites-overview': |
| | 807 | $retval = __( 'Customize the page titles and URL slugs for the BuddyPress screens on your site.', 'buddypress' ) . '<br /><br />' . __( 'The <strong>title</strong> is the page title displayed above the BuddyPress content. For example, the page title "Members" is shown above the members directory.', 'buddypress' ) . '<br /><br />' . __( 'A <strong>slug</strong> is a portion of the URL itself. For instance, "members" is the members directory slug in the following example URL: <code>https://mysite.org/members</code>. Slugs should only include lowercase letters, numbers, and hyphens.', 'buddypress' ); |
| | 808 | break; |
| | 809 | |
| 764 | 810 | default: |
| 765 | 811 | $retval = false; |
| 766 | 812 | break; |
| … |
… |
function bp_core_add_contextual_help_content( $tab = '' ) { |
| 768 | 814 | |
| 769 | 815 | // Wrap text in a paragraph tag. |
| 770 | 816 | if ( ! empty( $retval ) ) { |
| 771 | | $retval = '<p>' . $retval . '</p>'; |
| | 817 | $allowed_tags = array( |
| | 818 | 'br' => true, |
| | 819 | 'code' => true, |
| | 820 | 'strong' => true, |
| | 821 | ); |
| | 822 | |
| | 823 | $retval = '<p>' . wp_kses( $retval, $allowed_tags ) . '</p>'; |
| 772 | 824 | } |
| 773 | 825 | |
| 774 | 826 | return $retval; |