Created
January 16, 2015 00:39
-
-
Save natejacobson/fccf376a805c49345a2a to your computer and use it in GitHub Desktop.
Throwing array error.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function spine_excerpt_style_classes( $classes ) { | |
global $post; | |
if ( !is_singular() ) { | |
if ( $post->post_excerpt ) { | |
$classes[] = "summary-excerpted"; | |
} elseif ( strstr( $post->post_content, '<!--more-->' ) ) { | |
$classes[] = "summary-divided"; | |
} elseif ( 'excerpt' === spine_get_option( 'archive_content_display' ) ) { | |
$classes[] = "summary-truncated"; | |
} else { | |
$classes[] = "summary-unabridged"; | |
} | |
return $classes; | |
} | |
} | |
add_filter( 'post_class', 'spine_excerpt_style_classes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment