Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Unit test for HTML5 support in WordPress 3.6
//* Only turn on HTML5 for comment list
add_theme_support( 'html5', array( 'comment-list' ) );
if ( current_theme_supports( 'html5' ) )
echo 'Supports HTML5' . "\n";
if ( current_theme_supports( 'html5', 'comment-list' ) )
echo 'Supports HTML5 comment list.' . "\n";
if ( current_theme_supports( 'html5', 'search-form' ) )
echo 'Supports HTML5 search form.' . "\n";
if ( current_theme_supports( 'html5', 'comment-form' ) )
echo 'Supports HTML5 comment form.' . "\n";

Result: all 4 conditionals return true and echo their success. Which is, technically, not supposed to happen. Considering WP 3.6 uses the comment form check here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.