caldera_forms_grid_row_class

Alter row class attribute in Caldera Grid.

Description

apply_filters( 'caldera_forms_grid_row_class', (string) $rowclass, (int) $row, (array) $this_config ); 

STRONGLY recommended you use this to add, but not subtract classes.

Parameters (3)

0. $rowclass (string)
The row's classes
1. $row (int)
Row number
2. $this_config (array)
Grid config. Contains form ID in form_id key.

Usage

To run the hook, copy the example below.
  1. $rowclass = apply_filters( 'caldera_forms_grid_row_class', $rowclass, $row, $this_config ); 
  2.  
  3. if ( !empty( $rowclass ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the caldera_forms_grid_row_class callback 
  2. function filter_caldera_forms_grid_row_class( $rowclass, $row, $this_config ) { 
  3. // make filter magic happen here... 
  4. return $rowclass
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'caldera_forms_grid_row_class', 'filter_caldera_forms_grid_row_class', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'caldera_forms_grid_row_class', 'filter_caldera_forms_grid_row_class', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/classes/caldera-grid.php  
  1. $rowClass = apply_filters( 'caldera_forms_grid_row_class', $rowClass, $row, $this->config );