Add help files
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Jun 2019 19:13:48 +0000 (15:13 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Jun 2019 19:13:48 +0000 (15:13 -0400)
For plugin help section.

setup/help.php
setup/help/messages-list.html [deleted file]
setup/help/messages.html [new file with mode: 0644]
setup/help/search.html [new file with mode: 0644]
setup/help/templates.html [new file with mode: 0644]

index bebd2e2..bb247d3 100644 (file)
@@ -53,23 +53,26 @@ add_action( 'current_screen',
             array(
                 'name'  => 'dashboard',
                 'title' => 'Dashboard',
-                'subs'  => array(
-                    array(
-                        'name'  => 'list',
-                        'title' => 'Email Messages',
-                    ),
-                    array(
-                        'name'  => 'listTemplates',
-                        'title' => 'Email Templates',
-                    ),
-                ),
+            ),
+            array(
+                'name'  => 'search',
+                'title' => 'Search',
+            ),
+            array(
+                'name'  => 'messages',
+                'title' => 'Email Messages',
+            ),
+            array(
+                'name'  => 'templates',
+                'title' => 'Email Templates',
             ),
         );
 
         foreach ( $helpTabs as $tab ) {
-            $glmAction = isset( $_REQUEST['glm_action'] ) ? filter_var( $_REQUEST['glm_action'] ) : 'dashboard';
-            if ( $glmAction === $tab['name'] ) {
-                $fileName = GLM_MEMBERS_BILLING_PLUGIN_SETUP_PATH . '/help/' . $tab['name'] . '.html';
+            // $glmAction = isset( $_REQUEST['glm_action'] ) ? filter_var( $_REQUEST['glm_action'] ) : 'dashboard';
+            // if ( $glmAction === $tab['name'] ) {
+                $fileName = GLM_MEMBERS_MESSAGES_PLUGIN_SETUP_PATH . '/help/' . $tab['name'] . '.html';
+                // echo '<pre>$fileName: ' . print_r( $fileName, true ) . '</pre>';
                 if ( is_file( $fileName ) ) {
                     $screen->add_help_tab(
                         array(
@@ -83,23 +86,26 @@ add_action( 'current_screen',
                 }
                 $option = isset( $_REQUEST['option'] ) ? filter_var( $_REQUEST['option'] ) : 'dashboard';
                 // Check for subs
-                if ( isset( $tab['subs'] ) && is_array( $tab['subs'] ) ) {
-                    foreach ( $tab['subs'] as $sub ) {
-                        $fileName = GLM_MEMBERS_BILLING_PLUGIN_SETUP_PATH . '/help/' . $option . '-' . $sub['name'] . '.html';
-                        if ( is_file( $fileName ) ) {
-                            $screen->add_help_tab(
-                                array(
-                                    'id'       => 'glm-member-db-messages-help-'. $option . '-' . $sub['name'],
-                                    'title'    => __( $sub['title'] ),
-                                    'content'  => '',
-                                    'callback' => 'glm\messages\help\loadHelpFile',
-                                    'extra'    => $option . '-' . $sub['name'],
-                                )
-                            );
-                        }
-                    }
-                }
-            }
+                // if ( isset( $tab['subs'] ) && is_array( $tab['subs'] ) ) {
+                //     foreach ( $tab['subs'] as $sub ) {
+                //         $fileName = GLM_MEMBERS_MESSAGES_PLUGIN_SETUP_PATH . '/help/' . $option . '-' . $sub['name'] . '.html';
+                //         echo '<pre>$fileName: ' . print_r( $fileName, true ) . '</pre>';
+                //         $isFile = is_file($fileName);
+                //         var_dump($isFile);
+                //         if ( is_file( $fileName ) ) {
+                //             $screen->add_help_tab(
+                //                 array(
+                //                     'id'       => 'glm-member-db-messages-help-'. $option . '-' . $sub['name'],
+                //                     'title'    => __( $sub['title'] ),
+                //                     'content'  => '',
+                //                     'callback' => 'glm\messages\help\loadHelpFile',
+                //                     'extra'    => $option . '-' . $sub['name'],
+                //                 )
+                //             );
+                //         }
+                //     }
+                // }
+            // }
         }
 
         // Help sidebars
diff --git a/setup/help/messages-list.html b/setup/help/messages-list.html
deleted file mode 100644 (file)
index f7e3770..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Help
diff --git a/setup/help/messages.html b/setup/help/messages.html
new file mode 100644 (file)
index 0000000..f5abb27
--- /dev/null
@@ -0,0 +1,9 @@
+<h2>Email Messages</h2>
+<p>This tab show all active messages that you have</p>
+<p>You'll also see the last updated, queued and sent times.</p>
+<p>Queued time is when your mesage was queued.</p>
+<p>Sent time is when your mesage was proccessed and sent.</p>
+<p>To preview the message click Preview. This will show the template with test message data.</p>
+<h3>Images</h3>
+<p>Most email clients will not properly align images right or left of text.</p>
+<p>Images that need to be aligned left or right of content will have to be done in a table. To add a table click Insert > Table.</p>
diff --git a/setup/help/search.html b/setup/help/search.html
new file mode 100644 (file)
index 0000000..699e4c9
--- /dev/null
@@ -0,0 +1,9 @@
+<h2>Search</h2>
+
+<ul>
+    <li>Search Member Info</li>
+    <li>Search Contact Info</li>
+    <li>Search Member Profile Info</li>
+</ul>
+
+
diff --git a/setup/help/templates.html b/setup/help/templates.html
new file mode 100644 (file)
index 0000000..b4434d9
--- /dev/null
@@ -0,0 +1,3 @@
+<h2>Email Templates</h2>
+<p>Here you'll see each email template for the message system</p>
+<p>To preview the template click Preview. This will show the template with test message data.</p>