' . esc_html__( 'More', 'rebalance' ) . ''; } } add_filter( 'excerpt_more', 'rebalance_excerpt_more' ); /** * Add conditional classes to posts */ function rebalance_slug_post_classes( $classes ) { /** * Adds clear fix to single posts */ if ( is_single() ) { $classes[] = 'clear-fix'; } /** * Use card display on archive and search pages */ if ( is_archive() || is_search() ) { $classes[] = 'card'; } /* * '.card' class not needed when using default page templates on front page * - default page template conditional src: https://goo.gl/QOMYWP */ if ( ( is_page() && ! is_page_template() ) && is_front_page() ) { $classes[] = ''; } elseif ( is_page_template( 'portfolio-page.php' ) ) { $classes[] = 'card'; } elseif ( ( is_home() && ! is_page_template() ) || ( is_front_page() && ! is_page_template() ) ) { $classes[] = 'card'; } else { $classes[] = ''; } return $classes; } add_filter( 'post_class', 'rebalance_slug_post_classes', 10, 3 ); add_filter( 'comment_form_default_fields', 'rebalance_comment_placeholders' ); /** * Change default fields, add placeholder and change type attributes. * * @param array $fields * @return array */ function rebalance_comment_placeholders( $fields ) { $fields['author'] = str_replace( '