Skip to:
Content

BuddyPress.org

Ticket #8959: 8959.1.patch

File 8959.1.patch, 2.6 KB (added by dcavins, 10 months ago)

Add help content to the URL settings screen

  • src/bp-core/admin/bp-core-admin-functions.php

    diff --git src/bp-core/admin/bp-core-admin-functions.php src/bp-core/admin/bp-core-admin-functions.php
    index e47889d2b..ff073f61e 100644
    function bp_core_add_contextual_help( $screen = '' ) { 
    693693                        );
    694694                        break;
    695695
     696                // Component page.
     697                case 'settings_page_bp-rewrites':
     698                        // Help tabs.
     699                        $screen->add_help_tab(
     700                                array(
     701                                        'id'      => 'bp-rewrites-overview',
     702                                        'title'   => __( 'Overview', 'buddypress' ),
     703                                        'content' => bp_core_add_contextual_help_content( 'bp-rewrites-overview' ),
     704                                )
     705                        );
     706
     707                        // Help panel - sidebar links.
     708                        $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/">Managing Components</a>', 'buddypress' ) . '</p>' .
     711                                '<p>' . __( '<a href="https://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>'
     712                        );
     713                        break;
     714
    696715                // Settings page.
    697716                case 'settings_page_bp-settings':
    698717                        // Help tabs.
    function bp_core_add_contextual_help( $screen = '' ) { 
    735754        }
    736755}
    737756add_action( 'load-settings_page_bp-components', 'bp_core_add_contextual_help' );
     757add_action( 'load-settings_page_bp-rewrites', 'bp_core_add_contextual_help' );
    738758add_action( 'load-settings_page_bp-settings', 'bp_core_add_contextual_help' );
    739759add_action( 'load-users_page_bp-profile-setup', 'bp_core_add_contextual_help' );
    740760
    function bp_core_add_contextual_help_content( $tab = '' ) { 
    761781                        $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' );
    762782                        break;
    763783
     784                case 'bp-rewrites-overview':
     785                        $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 />' . __( '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' );
     786                        break;
     787
    764788                default:
    765789                        $retval = false;
    766790                        break;