Members only phrasing & styling edits, more parts
authorLaury GvR <laury@gaslightmedia.com>
Tue, 7 Jun 2016 17:02:10 +0000 (13:02 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 7 Jun 2016 17:02:10 +0000 (13:02 -0400)
Members only template changed to use member db terms through our
new filters. Several buttons for the members only section restyled
to suit theme. Share button removed. Sunrise now default for any
user who has access to the member admin but who is not an
administrator. Split theme into more parts as per our standards to
avoid needless code duplication.

css/app.css
functions.php
parts/bread-crumbs.php
parts/glm-members-only-login-form.php
parts/glm-members-only-top-bar.php
scss/plugins/_glm-member-db.scss

index 9ebc8af..4c7579a 100644 (file)
@@ -7909,7 +7909,22 @@ ul.social {
   padding: 20px 0; }
 
 body #glm-member-login-form {
-  width: 250px; }
+  width: 250px;
+  margin-bottom: 40px; }
+body #glm-member-login-form .button-primary, body #glm-member-password-lost-form .lostpassword-button {
+  background-color: #57b649;
+  border: 0 none;
+  border-radius: 5px;
+  color: white;
+  font-size: 14px;
+  padding: 10px 15px;
+  min-width: 90px;
+  cursor: pointer; }
+body #glm-member-password-lost-form {
+  width: 400px; }
+body #glm-member-password-lost-link {
+  color: #d2222a;
+  margin-top: 40px; }
 body #glm-member-password-lost-form {
   display: none; }
 body .glm-member-db-list-view #glm-member-list-map-toggle {
index 4ad743f..d84f2aa 100644 (file)
@@ -188,6 +188,17 @@ function remove_admin_bar() {
     }
 }
 
+/*
+ * If the current user is not an admin and is a member, 
+ * return 'sunrise' as the default admin color 
+ */
+add_filter('get_user_option_admin_color', function($result) {
+    if (!current_user_can('administrator') && current_user_can("glm_members_member")) {
+        return 'sunrise';
+    }
+    return $result;
+});
+
 /*
  * This function returns true when the current page is the page given by ID
  *  or a descendent thereof.
index 65c72d2..b0ebbd0 100644 (file)
@@ -1,8 +1,10 @@
-<?php echo '<span id="shareThisOrange" class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'">+ Share</span>'; ?>
+<?php if (!is_in_tree(get_option("glm_members_database_option_members_only_id"))) { ?>
+    <?php echo '<span id="shareThisOrange" class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'">+ Share</span>'; ?>
+<?php } ?>
 <?php if(function_exists('bcn_display') && !is_front_page())
 {
     echo "<div class=\"breadcrumbs\">";
     bcn_display();
     echo "</div>";
 }
-?>
+?>
\ No newline at end of file
index 1f079aa..d21a4a7 100644 (file)
@@ -6,7 +6,8 @@
                             else if( isset( $_GET['login'] ) && $_GET['login'] == 'empty' ) { ?>
                                 Please enter both username and password.
                             <?php } else { ?>
-                                Please log in to gain access to this page
+                                <?php $glmAssociateTerms = apply_filters('glm_associate_terms');?>
+                                Please log in with your <?php echo $glmAssociateTerms['term_member']; ?> username and password. If you need assistance, email (xxxxx@yyyy.zzz) or call (###-###-####)
                             <?php } ?>
                             </p>
                         </div> 
index 64faa4b..f9ad26c 100644 (file)
@@ -2,6 +2,7 @@
     <div class='glm-member-greeting'>Hello,     <?php $current_user = wp_get_current_user();echo $current_user->user_login ?>.</div>
     <a class='button glm-button' href="<?php echo wp_logout_url( home_url() ); ?>">Logout</a>
     <?php if (current_user_can("glm_members_member")) { ?>
-        <a class='button glm-button' href='<?php echo get_admin_url() ?>admin.php?page=glm-members-admin-menu-member'>Enter Member Admin Area</a>                        
+        <?php $glmAssociateTerms = apply_filters('glm_associate_terms');?>
+        <a class='button glm-button' href='<?php echo get_admin_url() ?>admin.php?page=glm-members-admin-menu-member'>Enter <?php echo $glmAssociateTerms['term_member_cap']; ?> Admin Area</a>                        
     <?php } ?>
 </div>
\ No newline at end of file
index 1e850eb..958db74 100644 (file)
@@ -11,6 +11,25 @@ body {
 // 1.0 General
 #glm-member-login-form {
     width: 250px;
+    margin-bottom: 40px;
+}
+#glm-member-login-form .button-primary,
+#glm-member-password-lost-form .lostpassword-button {
+  background-color: $green;
+  border: 0 none;
+  border-radius: 5px;
+  color: white;
+  font-size: 14px;
+  padding: 10px 15px;
+  min-width: 90px;
+  cursor: pointer;
+}
+#glm-member-password-lost-form {
+    width: 400px;
+}
+#glm-member-password-lost-link {
+    color: $red;
+    margin-top: 40px;
 }
 #glm-member-password-lost-form {
     display: none;