Created
September 18, 2015 05:50
-
-
Save reasonstousegenesis/c0710faf639c27188892 to your computer and use it in GitHub Desktop.
Check if the child theme is accessible with Genesis
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 | |
// Paste the code BELOW this line into your child theme functions. | |
/** | |
* Check if the child theme is accessible with Genesis | |
* | |
* @author Reasons to Use Genesis | |
* @link http://reasonstousegenesis.com/genesis-a11y/ | |
*/ | |
add_action( 'genesis_entry_content', 'rtug_semantic_headings' ); | |
function rtug_semantic_headings() { | |
if ( genesis_a11y( 'headings' ) ) | |
echo '<h3>Semantic Heading</h3>'; | |
else | |
echo '<h4>Non-Semantic Heading</h4>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment