From: Steve Sutton
Date: Fri, 7 Jul 2017 15:44:41 +0000 (-0400)
Subject: Update the help tab function for other plugins.
X-Git-Tag: v2.10.0^2~5
X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a2c3ed2d98387465da7e3497f92255799fffbcd0;p=WP-Plugins%2Fglm-member-db.git
Update the help tab function for other plugins.
Adding any other help tabs from other plugins into import help.
---
diff --git a/setup/adminHooks.php b/setup/adminHooks.php
index 0f8c9aa5..d9ab22f4 100644
--- a/setup/adminHooks.php
+++ b/setup/adminHooks.php
@@ -291,8 +291,15 @@ function glm_import_add_page() {
}
/**
-https://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus
-https://codex.wordpress.org/Class_Reference/WP_Screen/add_help_tab
+ * glm_admin_import_help_tab
+
+ * Add help tab for the Import CSV sub page.
+ * For info these two url's go over the wordpress codex for them.
+ * https://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus
+ * https://codex.wordpress.org/Class_Reference/WP_Screen/add_help_tab
+ *
+ * @access public
+ * @return void
*/
function glm_admin_import_help_tab () {
$screen = get_current_screen();
@@ -342,6 +349,11 @@ function glm_admin_import_help_tab () {
for the file.' ) . '
'
)
);
+ // Get help tabs from the other plugins using apply_filters.
+ $helpTabs = apply_filters( 'glm-member-db-add-help-for-import', array() );
+ foreach ( $helpTabs as $newTab ) {
+ $screen->add_help_tab( $newTab );
+ }
// Help sidebars
// $screen->set_help_sidebar(
// '' . __( 'For more information:' ) . '
' .