Default header image now used for member detail pages
authorLaury GvR <laury@gaslightmedia.com>
Thu, 5 Apr 2018 20:49:17 +0000 (16:49 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 5 Apr 2018 20:49:17 +0000 (16:49 -0400)
functions.php

index 94c0ea2..48d9999 100644 (file)
@@ -73,7 +73,7 @@ function glm_site_scripts()
 /* Header for posts*/
 function glm_get_header($memberID = false) {
     global $post;
-    $default_image_path = get_template_directory_uri().'/assets/default-header.jpg?v=1.1';
+    $default_image_path = get_template_directory_uri().'/assets/default-header.jpg?v=1.0';
     $default_member_image_path = $default_image_path;
     $featured_classes[] = "featured-image";
     $default_background_styles = 'height:0;max-height: 450px;padding:0;padding-bottom:32%;'
@@ -83,18 +83,18 @@ function glm_get_header($memberID = false) {
     if ((has_post_thumbnail() && $post->post_type == 'page') || is_page('member-detail')) {
         if( !$memberID ) {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-            $image_caption = get_the_post_thumbnail_caption();
+//            $image_caption = get_the_post_thumbnail_caption();
             $image_data = $image_data[0];
             $featured_classes[] = $image_data ? "wp-featured" : "";
         } else {
-            $image_data = apply_filters('member_images',$memberID,true,'original');
-            $featured_classes[] = $image_data ? "member-featured" : "";
-            if ( !$image_data ) {
-                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-                $image_caption = get_the_post_thumbnail_caption();
-                $image_data = $image_data[0];
-                $featured_classes[] = $image_data ? "wp-featured" : "";
-            }
+//            $image_data = apply_filters('member_images',$memberID,true,'original');
+//            $featured_classes[] = $image_data ? "member-featured" : "";
+//            if ( !$image_data ) {
+//                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+//                $image_caption = get_the_post_thumbnail_caption();
+//                $image_data = $image_data[0];
+//                $featured_classes[] = $image_data ? "wp-featured" : "";
+//            }
             if ( !$image_data ) {
                 $image_data = $default_member_image_path;
                 $featured_classes[] = $image_data ? "member-default" : "";
@@ -110,13 +110,13 @@ function glm_get_header($memberID = false) {
                 . 'class="' . implode(' ',$featured_classes) . '"';
         echo '>';
         
-        if ($image_caption) {    
-            echo '<div id="header-image-caption-wrap" class="caption-wrap">';
-            echo '<div class="caption">';
-            echo $image_caption;
-            echo '</div>';
-            echo '</div>';
-        }
+//        if ($image_caption) {    
+//            echo '<div id="header-image-caption-wrap" class="caption-wrap">';
+//            echo '<div class="caption">';
+//            echo $image_caption;
+//            echo '</div>';
+//            echo '</div>';
+//        }
     } else {
         $featured_classes[] = "interior-default";
         echo '<div';