Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created March 15, 2017 15:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Shelob9/acba92b7fe05c21cb409d89e3c430110 to your computer and use it in GitHub Desktop.
<?php
/**
Change the classes assigned to notices in Caldera Forms
IMPORTANT: These are arrays of individual classes at this point. array( 'hi', 'roy ) will become class="hi roy"
*/
add_filter( 'caldera_forms_render_note_classes', function( $classes ){
//change error class to alert-danger for Bootstrap 4
$classes[ 'error' ] = array( 'alert', 'alert-danger' );
//add an extra class to success
$classes[ 'success'][] = 'caldera-victory';
return $classes;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment