Skip to content

Instantly share code, notes, and snippets.

@GaryJones
Created January 31, 2012 00:42
Show Gist options
  • Save GaryJones/1707860 to your computer and use it in GitHub Desktop.
Save GaryJones/1707860 to your computer and use it in GitHub Desktop.
Remove aria-required attributes from Genesis comment form
<?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