post_parent ) && $image->post_parent != $id ) $url .= '#main'; return $url; } add_filter( 'attachment_link', 'bonpress_enhanced_image_navigation', 10, 2 ); /** * Filters wp_title to print a neat
' . '
'; return $fields; } add_filter( 'comment_form_default_fields', 'bonpress_michael_fields' ); /** * Makes the caption as wide as the image. * * @param array $atts Attribute list. * @return array Filtered attributes. */ function bonpress_caption_atts( $atts ) { // Remove 10px that will be added by the caption shortcode. if ( isset( $atts['width'] ) && is_numeric( $atts['width'] ) ) { $atts['width'] = $atts['width'] - 10; } return $atts; } add_filter( 'shortcode_atts_caption', 'bonpress_caption_atts' ); /** * Switches default core markup for search form to output valid HTML5. * * @param string $format Expected markup format, default is `xhtml` * @return string Bonpress loves HTML5. */ function bonpress_searchform_format( $format ) { return 'html5'; } add_filter( 'search_form_format', 'bonpress_searchform_format' );