From 7e2289297cfebe3c70e0d4207533185e85aaeac1 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 4 Aug 2016 16:18:28 -0400 Subject: [PATCH] Add help docs Testing getting some help stuff setup for a plugin. A good start. --- setup/adminMenus.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/setup/adminMenus.php b/setup/adminMenus.php index 33e395f..e7822b1 100644 --- a/setup/adminMenus.php +++ b/setup/adminMenus.php @@ -51,7 +51,7 @@ */ // Add Leads sub-menu for GLM Associate menu -add_submenu_page( +$glm_leads_page_sufix = add_submenu_page( 'glm-members-admin-menu-members', 'Leads', 'Leads', @@ -59,7 +59,31 @@ add_submenu_page( 'glm-members-admin-menu-leads-index', function() {$this->controller('leads');} ); +if ( $glm_leads_page_sufix ) { + add_action( 'load-' . $glm_leads_page_sufix, function(){ + $screen = get_current_screen(); + $screen->add_help_tab( + array( + 'id' => 'glm-member-db-leads-help-search', + 'title' => __( 'Search for Leads' ), + 'content' => '

After the search if there\'s results you\'ll get a download link.

' + ) + ); + $screen->add_help_tab( + array( + 'id' => 'glm-member-db-leads-help-bysource', + 'title' => __( 'Search for Leads By form' ), + 'content' => '

Select a form or source from the drop down called \'Source\'

' + ) + ); + // Help sidebars. + $screen->set_help_sidebar( + '

' . __( 'For more information' ) . '

'. + '

Gaslight Media Website

' + ); + } ); +} // If a contact is logged in (ownEntity isn't false), add Contact Profile menu item if ( $this->config['loggedInUser']['contactUser'] ) { add_submenu_page( -- 2.17.1