Created
August 2, 2013 20:05
-
-
Save nathanrice/6143003 to your computer and use it in GitHub Desktop.
Unit test for HTML5 support in WordPress 3.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Only turn on HTML5 for comment list | |
add_theme_support( 'html5', array( 'comment-list' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-includes/comment-template.php.source.html#l1610