Changeset 13586 for trunk/src/bp-core/admin/bp-core-admin-functions.php
- Timestamp:
- 09/28/2023 02:18:35 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-functions.php
r13549 r13586 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 ) { … … 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 688 699 // Help panel - sidebar links. 689 700 $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>' 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 718 // Help panel - sidebar links. 719 $screen->set_help_sidebar( 720 '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' . 721 '<p>' . $bp_forum . '</p>' 693 722 ); 694 723 break; … … 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 … … 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 … … 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' ); … … 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; … … 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
Note: See TracChangeset
for help on using the changeset viewer.