ninja_forms_calc_edit_label_filter

Function that filters the field LI label on the edit field back-end.

Description

($li_label) ninja_forms_calc_edit_label_filter( $li_label, $field_id ); 

Returns ($li_label)

Parameters (2)

0. $li_label
The li label.
1. $field_id
The field id.

Usage

  1. if ( !function_exists( 'ninja_forms_calc_edit_label_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/calc.php'; 
  3.  
  4. // The li label. 
  5. $li_label = null; 
  6.  
  7. // The field id. 
  8. $field_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_calc_edit_label_filter($li_label, $field_id); 
  12.  

Defined (1)

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

/deprecated/includes/fields/calc.php  
  1. function ninja_forms_calc_edit_label_filter( $li_label, $field_id ) { 
  2. $field_row = ninja_forms_get_field_by_id( $field_id ); 
  3. if ( $field_row['type'] == '_calc' ) { 
  4. if ( isset ( $field_row['data']['calc_name'] ) ) { 
  5. $li_label = $field_row['data']['calc_name']; 
  6. } else { 
  7. $li_label = __( 'Calculation', 'ninja-forms' ); 
  8.  
  9. return $li_label;