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() { |
1140 | 1140 | ); |
1141 | 1141 | |
1142 | 1142 | $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( |
1144 | 1149 | '<p><a href="%1$s" class="bp-help-sidebar-links">%2$s</a></p>', |
1145 | 1150 | esc_url( 'https://buddypress.org/support/' ), |
1146 | 1151 | esc_html__( 'BuddyPress Support Forums', 'buddypress' ) |
1147 | 1152 | ); |
| 1153 | $bp_links = $bp_docs . $bp_forums; |
1148 | 1154 | |
1149 | 1155 | $screen->set_help_sidebar( $help_sidebar . $bp_links ); |
1150 | 1156 | wp_add_inline_script( |
… |
… |
function bp_core_admin_debug_information_add_help_tab() { |
1154 | 1160 | |
1155 | 1161 | document.onreadystatechange = function () { |
1156 | 1162 | 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 | } ); |
1159 | 1167 | } |
1160 | 1168 | } |
1161 | 1169 | |
… |
… |
function bp_core_admin_debug_information_add_help_tab() { |
1163 | 1171 | function( a ) { |
1164 | 1172 | a.addEventListener( \'click\', function ( e ) { |
1165 | 1173 | 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 | } ); |
1167 | 1177 | } else { |
1168 | | bpHelpSidebarLinks.style.display = \'none\'; |
| 1178 | bpHelpSidebarLinks.forEach( ( bpHelpSidebarLink ) => { |
| 1179 | bpHelpSidebarLink.parentNode.style.display = \'none\'; |
| 1180 | } ); |
1169 | 1181 | } |
1170 | 1182 | } ); |
1171 | 1183 | } |