Skip to:
Content

BuddyPress.org

Ticket #9256: 9256.01.patch

File 9256.01.patch, 2.2 KB (added by emaralive, 3 months ago)

Initial patch

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

    diff --git src/bp-core/admin/bp-core-admin-tools.php src/bp-core/admin/bp-core-admin-tools.php
    index 013d33ce9..2dd25d891 100644
    function bp_core_admin_debug_information_add_help_tab() { 
    11401140                );
    11411141
    11421142                $help_sidebar = $screen->get_help_sidebar();
    1143                 $bp_links     = sprintf(
     1143                $bp_docs      = sprintf(
     1144                        '<p><a href="%1$s" class="bp-help-sidebar-links">%2$s</a></p>',
     1145                        esc_url( 'https://github.com/buddypress/buddypress/blob/master/docs/user/administration/site-health.md' ),
     1146                        esc_html__( 'BuddyPress Site Health Documentation', 'buddypress' )
     1147                );
     1148                $bp_forums    = sprintf(
    11441149                        '<p><a href="%1$s" class="bp-help-sidebar-links">%2$s</a></p>',
    11451150                        esc_url( 'https://buddypress.org/support/' ),
    11461151                        esc_html__( 'BuddyPress Support Forums', 'buddypress' )
    11471152                );
     1153                $bp_links     =  $bp_docs . $bp_forums;
    11481154
    11491155                $screen->set_help_sidebar( $help_sidebar . $bp_links );
    11501156                wp_add_inline_script(
    function bp_core_admin_debug_information_add_help_tab() { 
    11541160
    11551161                                document.onreadystatechange = function ()  {
    11561162                                        if ( document.readyState === "complete" ) {
    1157                                                 bpHelpSidebarLinks = document.querySelector( \'.bp-help-sidebar-links\' ).closest( \'p\')
    1158                                                 bpHelpSidebarLinks.style.display = \'none\';
     1163                                                bpHelpSidebarLinks = document.querySelectorAll( \'.bp-help-sidebar-links\' );
     1164                                                bpHelpSidebarLinks.forEach( ( bpHelpSidebarLink ) => {
     1165                                                        bpHelpSidebarLink.parentNode.style.display = \'none\';
     1166                                                } );
    11591167                                        }
    11601168                                }
    11611169
    function bp_core_admin_debug_information_add_help_tab() { 
    11631171                                        function( a ) {
    11641172                                                a.addEventListener( \'click\', function ( e ) {
    11651173                                                        if ( \'tab-link-bp-debug-settings\' === e.target.parentElement.getAttribute( \'id\' ) ) {
    1166                                                                 bpHelpSidebarLinks.style.display = \'block\';
     1174                                                                bpHelpSidebarLinks.forEach( ( bpHelpSidebarLink ) => {
     1175                                                                        bpHelpSidebarLink.parentNode.style.display = \'block\';
     1176                                                                } );
    11671177                                                        } else {
    1168                                                                 bpHelpSidebarLinks.style.display = \'none\';
     1178                                                                bpHelpSidebarLinks.forEach( ( bpHelpSidebarLink ) => {
     1179                                                                        bpHelpSidebarLink.parentNode.style.display = \'none\';
     1180                                                                } );
    11691181                                                        }
    11701182                                                } );
    11711183                                        }