post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); $css = ''; if ( is_attachment() && 'attachment' == $previous->post_type ) { return; } if ( $previous && has_post_thumbnail( $previous->ID ) ) { $prevThumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'alpha-centauri-navigation-img' ); $css .= ' .post-navigation .nav-previous { background-image: url(' . esc_url( $prevThumb[0] ) . '); } '; } if ( $next && has_post_thumbnail( $next->ID ) ) { $nextThumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'alpha-centauri-navigation-img' ); $css .= ' .post-navigation .nav-next { background-image: url(' . esc_url( $nextThumb[0] ) . '); } '; } wp_add_inline_style( 'alpha-centauri-style', $css ); } add_action( 'wp_enqueue_scripts', 'alpha_centauri_post_nav_background' ); /** * Make all the tags in the tag cloud widget the same size. */ function alpha_centauri_same_size_tags( $args ) { $args['largest'] = 16; //largest tag $args['smallest'] = 16; //smallest tag $args['unit'] = 'px'; //tag font unit return $args; } add_filter( 'widget_tag_cloud_args', 'alpha_centauri_same_size_tags' );