Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Last active October 13, 2015 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/9cafb5e1216efdb3a7c7 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/9cafb5e1216efdb3a7c7 to your computer and use it in GitHub Desktop.
Check if the child theme is accessible with Genesis
<?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_screen_reader_text' );
function rtug_screen_reader_text() {
if ( genesis_a11y( 'screen-reader-text' ) ) // to check for screen reader support, argument is optional
echo '<p class="screen-reader-text">This text is intended only for users with vision impairments.</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment