' . __( 'Continue reading ', 'autofocus' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and autofocus_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * */ function autofocus_auto_excerpt_more( $more ) { return ' …' . autofocus_continue_reading_link(); } add_filter( 'excerpt_more', 'autofocus_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * */ function autofocus_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= autofocus_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'autofocus_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * Customise the AutoFocus Two comments fields with HTML5 form elements * * Adds support for placeholder * required * type="email" * type="url" * */ function autofocus_comments() { global $commenter, $aria_req; $req = get_option('require_name_email'); $fields = array( 'author' => '
', 'email' => '' . ( $req ? '*' : '' ) . '
', 'url' => '' . '
' ); return $fields; } function autofocus_commentfield() { $commentArea = ''; return $commentArea; } add_filter('comment_form_default_fields', 'autofocus_comments'); add_filter('comment_form_field_comment', 'autofocus_commentfield'); /** * Adds post count and sticky classes to post_class */ function autofocus_post_classes($classes) { global $post, $autofocus_post_alt; if ( is_sticky($post->ID) && is_single($post->ID) ) $classes[] = 'sticky'; $autofocus_post_alt++; // Adds a post number (p1, p2, etc) to the .hentry DIVs $classes[] = 'p' . $autofocus_post_alt; return $classes; } add_filter('post_class', 'autofocus_post_classes'); // Define the num val for 'alt' classes (in post DIV and comment LI) $autofocus_post_alt = 0; ?>