Closed hacknug closed 6 years ago
Hi!
Seems as if the documentation is incorrect, I'll fix it as soon as possible. This is the way it should be:
<?php
function filter_submit_button_attributes( $attributes, $form, $args ) {
$attributes['class'] .= ' button';
return $attributes;
}
add_filter( 'af/form/button_attributes', 'filter_submit_button_attributes', 10, 3 );
add_filter( 'af/form/button_attributes/id=FORM_ID', 'filter_submit_button_attributes', 10, 3 );
add_filter( 'af/form/button_attributes/key=FORM_KEY', 'filter_submit_button_attributes', 10, 3 );
Thank you for pointing this out to me! :)
Using
filter_submit_button_attributes()
just as it is on the docs, gives the following error: