post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> ' . __( 'Author: ', 'codon' ) . get_the_author() . ''; $author_name = apply_filters ('codon_authorbox_name', $author_name ); } if ( get_avatar ( get_the_author_meta( 'ID' ), 250 ) != null ) { $author_avatar = '
' . get_the_author_meta('description') . '
'; } else { $author_bio = null; } echo ' '; } endif; if ( ! function_exists( 'codon_post_meta' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function codon_post_meta() { // builds css class if ( is_single() ) { $meta_class = 'single-meta'; } else { $meta_class = 'archive-meta'; } $time_string = ''; $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $date_year = get_the_date ('Y'); $date_month = get_the_date ('m'); $date_day = get_the_date ('d'); $posted_on = sprintf( _x( '%s', 'post date', 'codon' ), ' ' ); $posted_on = apply_filters ('codon_posted_on' , $posted_on ); $byline = sprintf( _x( '%s', 'post author', 'codon' ), ' ' ); $byline = apply_filters ('codon_byline', $byline ); $cat_links = get_the_category_list(', '); $post_categories = ' '; $post_categories = apply_filters ('codon_category', $post_categories ); $post_format = get_post_format(); if ( $post_format == 'image' || 'gallery' ) { $format_icon = 'fa-picture-o'; } if ( $post_format == 'aside' ) { $format_icon = 'fa-asterisk'; } if ( $post_format == 'link' ) { $format_icon = 'fa-link'; } if ( $post_format == 'video' ) { $format_icon = 'fa-video-camera'; } if ( $post_format == 'quote' ) { $format_icon = 'fa-quote-left'; } if ( $post_format == 'status' ) { $format_icon = 'fa-tasks'; } if ( $post_format == 'audio' ) { $format_icon = 'fa-headphones'; } if ( $post_format == 'chat' ) { $format_icon = 'fa-comments-o'; } if ( $post_format != null ) { $post_format_link = ' '; $post_format_link = apply_filters ('codon_post_format', $post_format_link ); } else { $post_format_link = null; } echo ' '; } endif; if ( ! function_exists ( 'codon_featured_image' ) ): function codon_featured_image() { // checks for the post thumbnail // then checks for a default image if ( has_post_thumbnail() && get_theme_mod ('archive-post-thumbnails' ) != 'off' ) { if ( get_theme_mod('archive-post-thumbnails' ) == 'thumbnail' ) { $thumbnail = 'thumbnail'; } elseif ( get_theme_mod('archive-post-thumbnails' ) == 'medium' ) $thumbnail = 'medium'; elseif ( get_theme_mod('archive-post-thumbnails' ) == 'full' ) $thumbnail = 'codon-wide-thumb'; if ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'left' ) { $alignment = 'alignleft'; } elseif ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'center' ) $alignment = 'aligncenter'; elseif ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'right' ) $alignment = 'alignright'; echo '' . the_post_thumbnail($thumbnail, array ('class' => $alignment . ' codon-thumbnail') ) . ''; } if ( get_theme_mod ('default-image') != '' && ! has_post_thumbnail() && get_theme_mod ('archive-post-thumbnails' ) != 'off' ) { if ( get_theme_mod('archive-post-thumbnails' ) == 'thumbnail' ) { $thumbnail = 'thumbnail'; } elseif ( get_theme_mod('archive-post-thumbnails' ) == 'medium' ) $thumbnail = 'medium'; elseif ( get_theme_mod('archive-post-thumbnails' ) == 'full' ) $thumbnail = 'codon-wide-thumb'; if ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'left' ) { $alignment = 'alignleft'; } elseif ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'center' ) $alignment = 'aligncenter'; elseif ( get_theme_mod('archive-post-thumbnails-alignment' ) == 'right' ) $alignment = 'alignright'; if ( $thumbnail == 'thumbnail' ) { $image_size = get_option( 'thumbnail_size_w' ); } if ( $thumbnail == 'medium' ) { $image_size = get_option( 'medium_size_w' ); } if ( $thumbnail == 'codon-wide-thumb' ) { $image_size = '366'; $image_size = apply_filters ('codon_wide_thumb_size', $image_size ); } echo ''; } } endif; if ( ! function_exists( 'codon_the_attached_image' ) ) : /** * Prints the attached image with a link to the next attached image. */ function codon_the_attached_imaged() { $post = get_post(); $attachment_size = apply_filters( 'codon_attachment_size', array( 1200, 1200 ) ); $next_attachment_url = wp_get_attachment_url(); /** * Grab the IDs of all the image attachments in a gallery so we can get the URL * of the next adjacent image in a gallery, or the first image (if we're * looking at the last image in a gallery), or, in a gallery of one, just the * link to that image file. */ $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); // If there is more than 1 attachment in a gallery... if ( count( $attachments ) > 1 ) { foreach ( $attachments as $k => $attachment ) { if ( $attachment->ID == $post->ID ) break; } $k++; // get the URL of the next image attachment... if ( isset( $attachments[ $k ] ) ) $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); // or get the URL of the first image attachment. else $next_attachment_url = get_attachment_link( $attachments[0]->ID ); } printf( '%3$s', esc_url( $next_attachment_url ), the_title_attribute( array( 'echo' => false ) ), wp_get_attachment_image( $post->ID, $attachment_size ) ); } endif; if ( ! function_exists ( 'codon_category_heading' ) ): function codon_category_heading() { $title = '' . $desc . '
'; } else { $cat_desc = null; } echo $title . $cat_desc; } endif; if ( ! function_exists ( 'codon_footer_copyright' ) ): function codon_footer_copyright() { $output = '©' . date('Y') . ' - ' . get_bloginfo('name') . '' . $desc . '
'; } else { $tag_desc = null; } echo $title . $tag_desc; } endif; if ( ! function_exists ( 'codon_archive_heading' ) ): function codon_archive_heading() { if ( is_day() ) { echo ' '; _e( 'Daily Archives: ', 'codon' ); echo get_the_time('l, F j, Y'); } elseif ( is_month() ) { echo ' '; _e( 'Monthly Archives: ', 'codon' ); echo get_the_time('F Y'); } elseif ( is_year() ) { echo ' '; _e( 'Yearly Archives: ', 'codon' ); echo get_the_time('Y'); } // post formats elseif ( is_tax( 'post_format', 'post-format-aside' ) ) { _e( ' Asides', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) { _e( ' Galleries', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-image' ) ) { _e( ' Images', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-video' ) ) { _e( ' Videos', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-quote' ) ) { _e( ' Quotes', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-link' ) ) { _e( ' Links', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-status' ) ) { _e( ' Statuses', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-audio' ) ) { _e( ' Audios', 'codon' ); } elseif ( is_tax( 'post_format', 'post-format-chat' ) ) { _e( ' Chats', 'codon' ); } else { _e( ' Archives', 'codon' ); } } endif; if ( ! function_exists ( 'codon_post_breadcrumbs' ) ) : function codon_post_breadcrumbs() { if ( 'post' == get_post_type() ) { $home_url = home_url( '/' ); $home_label = __('Home', 'codon' ); $post_category = get_the_category_list(' | '); $post_title = get_the_title(); echo ' '; } } endif; if ( ! function_exists ( 'codon_page_breadcrumbs' ) ) : function codon_page_breadcrumbs() { if ( 'page' == get_post_type() ) { global $post; $home_url = home_url( '/' ); $home_label = __('Home', 'codon' ); $post_category = get_the_category_list(' | '); $post_title = get_the_title(); if ( $post->post_parent == true ) { $parent_title = get_the_title ($post->post_parent); $parent_link = get_the_permalink ($post->post_parent); $parent_output = '' . $parent_title . ' › '; } else { $parent_output = null; } echo ' '; } } endif; if ( ! function_exists( 'codon_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function codon_entry_footer() { // Hide category and tag text for pages. if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list && get_theme_mod ('single-post-meta') == 'on' ) { printf( ' ' . __( '%1$s', 'codon' ) . '', $tags_list ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'codon' ), __( '1 Comment', 'codon' ), __( '% Comments', 'codon' ) ); echo ''; } edit_post_link( __( 'Edit', 'codon' ), '', '' ); } endif; if ( ! function_exists( 'codon_top_return' ) ): // loads the top return link // also see codon-scripts.js function codon_top_return() { $top_return = ''; $top_return = apply_filters ('codon_return_to_top', $top_return ); echo $top_return; } endif; if (!function_exists ( 'codon_social_links' ) ): // builds list items function codon_social_links() { if ( get_theme_mod ('footer-facebook' ) != '' ) { $facebook = '