adjusted the comicpress_post_class to ignore some entries if is_page()

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-24 15:28:58 -08:00
parent 24ccd0ab84
commit 781b16dbf6
1 changed files with 23 additions and 21 deletions

View File

@ -111,6 +111,7 @@ function comicpress_post_class($classes = '') {
/* Post alt class. */
if (!is_page()) {
$classes[] = 'postonpage-' . ++$post_alt;
if ( $post_alt % 2 )
@ -126,16 +127,17 @@ function comicpress_post_class($classes = '') {
if ( !is_attachment() )
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
/* Password-protected posts. */
if ( post_password_required() )
$classes[] = 'protected';
/* User-created classes. */
if ( !empty( $class ) ) :
if ( !is_array( $class ) )
$class = preg_split( '#\s+#', $class );
$classes = array_merge( $classes, $class );
endif;
}
/* Password-protected posts. */
if ( post_password_required() )
$classes[] = 'protected';
return $classes;
}