Add 2nd param to contact retrieval filter
authorLaury GvR <laury@gaslightmedia.com>
Tue, 20 Mar 2018 15:00:59 +0000 (11:00 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 20 Mar 2018 15:00:59 +0000 (11:00 -0400)
Apply_filters is used in header.php to get the logged-in contact.
This function requires a second parameter even if this parameter
is an empty string. That is exactly what's been added with this
change, to avoid errors indicating such.

sections/header.php

index c4db577..7bfa85e 100644 (file)
@@ -11,7 +11,7 @@
                 <?php if (current_user_can("glm_members_main_menu")) { ?>
                     <div class="member-box">
                         <?php 
-                            $currentUser = apply_filters("glma_get_logged_in_contact");
+                            $currentUser = apply_filters("glma_get_logged_in_contact", "");
                             if ( $currentUser ) {
 
                                 //echo $currentUser["fname"] . " " . $currentUser["lname"];  // This is the CONTACT name
@@ -45,7 +45,7 @@
                 <?php if (current_user_can("glm_members_main_menu")) { ?>
                     <div class="member-box">
                         <?php 
-                            $currentUser = apply_filters("glma_get_logged_in_contact");
+                            $currentUser = apply_filters("glma_get_logged_in_contact", "");
                             if ( $currentUser ) {
                                 //echo $currentUser["fname"] . " " . $currentUser["lname"];  // This is the CONTACT name
                                 echo "<span class='name-member'>Name: " . apply_filters("glma_get_member_name", $currentUser["ref_dest"]) . "</span>";      // This is the MEMBER name