<?php // Miscellaneous

// JS detection. Adds js class to <html>.
function js_detect() {
	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
}
add_action( 'wp_head', 'js_detect', 0 );
// End

// Excerpt Length
function custom_excerpt_length( $length ) {
	return 25;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

// Excerpt Text
function new_excerpt_more( $more ) {
	return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');

// Contact Form 7 auto <p> tag removal
add_filter('wpcf7_autop_or_not', '__return_false');

// Deregister SatisPress authentication servers
add_filter( 'satispress_authentication_servers', '__return_empty_array' );