Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/14/2024 03:53:05 AM (7 months ago)
Author:
imath
Message:

Add an Help Tab to the Member Types WP Admin screen

Fixes #9122
Closes https://github.com/buddypress/buddypress/pull/254

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-functions.php

    r13728 r13771  
    793793
    794794            break;
     795
     796        case 'edit-bp_member_type' :
     797            // Help tab.
     798            $screen->add_help_tab(
     799                array(
     800                    'id'      => 'bp-member-types-overview',
     801                    'title'   => __( 'Overview', 'buddypress' ),
     802                    'content' => bp_core_add_contextual_help_content( 'bp-member-types-overview' ),
     803                )
     804            );
     805
     806            $manage_member_types = sprintf(
     807                '<a href="%1$s">%2$s</a>',
     808                esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/users/member-types.md' ),
     809                esc_html__( 'Managing Member Types', 'buddypress' )
     810            );
     811
     812            // Help panel - sidebar links.
     813            $screen->set_help_sidebar(
     814                '<p><strong>' . esc_html__( 'For more information:', 'buddypress' ) . '</strong></p>' .
     815                '<p>' . $manage_member_types . '</p>' .
     816                '<p>' . $bp_forum . '</p>'
     817            );
     818
     819            break;
    795820    }
    796821}
     
    799824add_action( 'load-settings_page_bp-settings', 'bp_core_add_contextual_help' );
    800825add_action( 'load-users_page_bp-profile-setup', 'bp_core_add_contextual_help' );
     826add_action( 'bp_admin_load_bp_member_type', 'bp_core_add_contextual_help' );
    801827
    802828/**
     
    829855        case 'bp-rewrites-overview':
    830856            $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' );
     857            break;
     858
     859        case 'bp-member-types-overview':
     860            $retval = __( 'Member Types in BuddyPress provide a powerful way to classify users within your community. By defining various member types, such as "Students", "Teachers", or "Alumni", you can create a more organized and tailored community environment. This feature is especially useful for communities with diverse user groups, allowing customized interactions, content access, and privileges.', 'buddypress' );
    831861            break;
    832862
Note: See TracChangeset for help on using the changeset viewer.