Created
January 31, 2012 00:42
-
-
Save GaryJones/1707860 to your computer and use it in GitHub Desktop.
Remove aria-required attributes from Genesis comment form
This file contains hidden or 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 | |
add_filter( 'genesis_comment_form_args', 'child_remove_aria_required' ); | |
/** | |
* Remove aria-required attributes from comment form. | |
* | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/remove-aria-required-attribute/ | |
* | |
* @param array $args Comment form arguments. | |
* | |
* @return array Amended arguments | |
*/ | |
function child_remove_aria_required( $args ) { | |
$args = str_replace( ' aria-required="true"', '', $args ); | |
$args[fields] = str_replace( ' aria-required="true"', '', $args[fields] ); | |
$args[fields] = str_replace( " aria-required='true'", '', $args[fields] ); // Genesis <= 1.3 | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment