Added check for numeric image data on member featured images
authorLaury GvR <laury@gaslightmedia.com>
Thu, 11 Jan 2018 21:14:22 +0000 (16:14 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 11 Jan 2018 21:14:22 +0000 (16:14 -0500)
functions.php

index 799f340..c4492e2 100644 (file)
@@ -83,7 +83,7 @@ function glm_get_header($memberID = false) {
         } else {
             $image_data = apply_filters('member_images',$memberID,true);
         }
-        if (empty($image_data)) {
+        if (empty($image_data) || is_numeric($image_data)) {
             echo ' style="background-image: url('.get_template_directory_uri().'/assets/default.jpg);height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';
         } else {
             echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:22%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 420px; "';