You appear to be a bot. Output may be restricted
Description
Determine if theme support genesis-accessibility is activated by the child theme.
Assumes the presence of a screen-reader-text class in the stylesheet (required generated class as from WordPress 4.2) Adds screen-reader-text by default. Skip links to primary navigation, main content, sidebars and footer, semantic headings and a keyboard accessible dropdown menu can be added as extra features as: 'skip-links', 'headings', 'drop-down-menu'
Usage
$bool = genesis_a11y( $arg );
Parameters
- $arg
- ( string ) optional default: screen-reader-text – Optional. Specific accessibility feature to check for support. Default is screen-reader-text.
Returns
bool true
if current theme supports genesis-accessibility`, or a specific feature of it, `false
otherwise.
Source
File name: genesis/lib/functions/general.php
Lines:
1 to 29 of 29
function genesis_a11y( $arg = 'screen-reader-text' ) { $feature = 'genesis-accessibility'; if ( 'screen-reader-text' === $arg ) { return current_theme_supports( $feature ); } $support = get_theme_support( $feature ); // No support for feature. if ( ! $support ) { return false; } // No args passed in to add_theme_support(), so accept none. if ( ! isset( $support[0] ) ) { return false; } // Support for specific arg found. if ( in_array( $arg, $support[0], true ) ) { return true; } return false; }