Members only login form options added
authorLaury GvR <laury@gaslightmedia.com>
Mon, 8 Aug 2016 16:51:52 +0000 (12:51 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 8 Aug 2016 16:51:52 +0000 (12:51 -0400)
parts/glm-members-only-login-form.php

index f8cf1fe..66256b1 100644 (file)
@@ -1,14 +1,31 @@
                         <div class="wp_login_error">
-                            <?php $glmAssociateTerms = apply_filters('glm_associate_terms');?>
                             <p id="glm-member-login-notification">
                                 <?php if( isset( $_GET['login'] ) && $_GET['login'] == 'failed' ) { ?>
                                     The information you entered is incorrect. Please try again.
                                 <?php } 
-                                else if( isset( $_GET['login'] ) && $_GET['login'] == 'empty' ) { ?>
+                                    else if( isset( $_GET['login'] ) && $_GET['login'] == 'empty' ) { ?>
                                     Please enter both username and password.
                                 <?php } else { ?>    
-                                Please log in with your <?php echo $glmAssociateTerms['term_member']; ?> username and password.
-                                <br>If you need assistance, email (xxxxx@yyyy.zzz) or call (###-###-####)
+                                    <?php $glmAssociateConfig = apply_filters('glm_associate_config'); 
+                                        $supportEmail = $glmAssociateConfig['settings']['members_only_support_email'];
+                                        $supportPhone = $glmAssociateConfig['settings']['members_only_support_phone'];
+                                        $glmTerm = $glmAssociateConfig['terms']['term_member'];
+                                    ?>
+                                    Please log in with your <?php echo $glmTerm; ?> username and password.
+
+                                    <?php if ($supportEmail || $supportPhone) {
+                                        echo "<br>If you need assistance, ";
+                                        if ($supportEmail) { 
+                                            echo "email (".$supportEmail.")";
+                                            if ($supportPhone) {
+                                                echo " or ";
+                                            }
+                                        }
+                                        if ($supportPhone) {
+                                            echo "call (".$supportPhone.")";
+                                        }
+                                    }
+                                    ?>
                                 <?php } ?>
                             </p>
                         </div> 
@@ -16,6 +33,6 @@
                             <?php 
                                 update_option('glm_members_database_frontend_login_request', 'true');
                                 wp_login_form(1, get_permalink()); 
-                                ?>
+                            ?>
                         </div>
                         <?php get_template_part('parts/glm-members-only-lostpass-form'); ?>
\ No newline at end of file