<div class="entry-meta"> <?php nebula_meta('on'); ?> <?php nebula_meta('by', 0); ?> <?php nebula_meta('cat'); ?> <?php nebula_meta('tags'); ?> <span class="nebulasocialcon"><?php nebula_social(array('facebook', 'twitter', 'google+', 'linkedin', 'pinterest'), is_dev()); ?> </span> </div> <div class="entry-content"> <?php the_content(); ?> <div class="row prevnextcon"> <?php if (get_previous_post_link()) { ?> <div class="<?php echo get_next_post_link() ? 'eight' : 'sixteen';
function nebula_meta($meta, $secondary = 1) { $override = apply_filters('pre_nebula_meta', false, $meta, $secondary); if ($override !== false) { echo $override; return; } if ($meta == 'date' || $meta == 'time' || $meta == 'on' || $meta == 'day' || $meta == 'when') { $the_day = ''; if ($secondary) { //Secondary here is if the day should be shown $the_day = get_the_date('d') . '/'; } echo '<span class="posted-on"><i class="fa fa-calendar"></i> <span class="entry-date">' . '<a href="' . home_url('/') . get_the_date('Y') . '/' . get_the_date('m') . '/' . '">' . get_the_date('F') . '</a>' . ' ' . '<a href="' . home_url('/') . get_the_date('Y') . '/' . get_the_date('m') . '/' . $the_day . '">' . get_the_date('j') . '</a>' . ', ' . '<a href="' . home_url('/') . get_the_date('Y') . '/' . '">' . get_the_date('Y') . '</a>' . '</span></span>'; } elseif ($meta == 'author' || $meta == 'by') { if (nebula_is_option_enabled('authorbios')) { echo '<span class="posted-by"><i class="fa fa-user"></i> <span class="entry-author">' . '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author() . '</a></span></span>'; } } elseif ($meta == 'categories' || $meta == 'category' || $meta == 'cat' || $meta == 'cats' || $meta == 'in') { if (is_object_in_taxonomy(get_post_type(), 'category')) { $post_categories = '<span class="posted-in post-categories"><i class="fa fa-bookmark"></i> ' . get_the_category_list(', ') . '</span>'; } else { $post_categories = ''; } echo $post_categories; } elseif ($meta == 'tags' || $meta == 'tag') { $tag_list = get_the_tag_list('', ', '); if ($tag_list) { $tag_icon = count(get_the_tags()) > 1 ? 'tags' : 'tag'; $post_tags = '<span class="posted-in post-tags"><i class="fa fa-' . $tag_icon . '"></i> ' . $tag_list . '</span>'; } else { $post_tags = ''; } echo $post_tags; } elseif ($meta == 'dimensions' || $meta == 'size') { if (wp_attachment_is_image()) { $metadata = wp_get_attachment_metadata(); echo '<span class="meta-dimensions"><i class="fa fa-expand"></i> <a href="' . wp_get_attachment_url() . '" >' . $metadata['width'] . ' × ' . $metadata['height'] . '</a></span>'; } } elseif ($meta == 'exif' || $meta == 'camera') { $imgmeta = wp_get_attachment_metadata(); if ($imgmeta) { //Check for Bad Data if ($imgmeta['image_meta']['focal_length'] == 0 || $imgmeta['image_meta']['aperture'] == 0 || $imgmeta['image_meta']['shutter_speed'] == 0 || $imgmeta['image_meta']['iso'] == 0) { $output = 'No valid EXIF data found'; } else { //Convert the shutter speed retrieve from database to fraction if (1 / $imgmeta['image_meta']['shutter_speed'] > 1) { if (number_format(1 / $imgmeta['image_meta']['shutter_speed'], 1) == 1.3 || number_format(1 / $imgmeta['image_meta']['shutter_speed'], 1) == 1.5 || number_format(1 / $imgmeta['image_meta']['shutter_speed'], 1) == 1.6 || number_format(1 / $imgmeta['image_meta']['shutter_speed'], 1) == 2.5) { $pshutter = "1/" . number_format(1 / $imgmeta['image_meta']['shutter_speed'], 1, '.', '') . " second"; } else { $pshutter = "1/" . number_format(1 / $imgmeta['image_meta']['shutter_speed'], 0, '.', '') . " second"; } } else { $pshutter = $imgmeta['image_meta']['shutter_speed'] . " seconds"; } $output = '<time datetime="' . date('c', $imgmeta['image_meta']['created_timestamp']) . '"><span class="month">' . date('F', $imgmeta['image_meta']['created_timestamp']) . '</span> <span class="day">' . date('j', $imgmeta['image_meta']['created_timestamp']) . '</span><span class="suffix">' . date('S', $imgmeta['image_meta']['created_timestamp']) . '</span> <span class="year">' . date('Y', $imgmeta['image_meta']['created_timestamp']) . '</span></time>' . ', '; $output .= $imgmeta['image_meta']['camera'] . ', '; $output .= $imgmeta['image_meta']['focal_length'] . 'mm' . ', '; $output .= '<span style="font-style:italic;font-family: Trebuchet MS,Candara,Georgia; text-transform:lowercase">f</span>/' . $imgmeta['image_meta']['aperture'] . ', '; $output .= $pshutter . ', '; $output .= $imgmeta['image_meta']['iso'] . ' ISO'; } } else { $output = 'No EXIF data found'; } echo '<span class="meta-exif"><i class="fa fa-camera"></i> ' . $output . '</span>'; } elseif ($meta == 'comments' || $meta == 'comment') { $comments_text = 'Comments'; if (get_comments_number() == 0) { $comment_icon = 'fa-comment-o'; if ($secondary) { //Secondary here is if no comments should hide $comment_show = ''; } else { $comment_show = 'hidden'; } } elseif (get_comments_number() == 1) { $comment_icon = 'fa-comment'; $comments_text = 'Comment'; } elseif (get_comments_number() > 1) { $comment_icon = 'fa-comments'; } $postlink = is_single() ? '' : get_the_permalink(); echo '<span class="posted-comments ' . $comment_show . '"><i class="fa ' . $comment_icon . '"></i> <a class="nebulametacommentslink" href="' . $postlink . '#nebulacommentswrapper">' . get_comments_number() . ' ' . $comments_text . '</a></span>'; } elseif ($meta == 'social' || $meta == 'sharing' || $meta == 'share') { nebula_social(array('facebook', 'twitter', 'google+', 'linkedin', 'pinterest'), 0); } }