ReduxFramework_raw

The Gravity Forms Advanced File Uploader ReduxFramework raw class.

Defined (1)

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

/inc/ReduxFramework/ReduxCore/inc/fields/raw/field_raw.php  
  1. class ReduxFramework_raw { 
  2.  
  3. /** 
  4. * Field Constructor. 
  5. * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function 
  6. * @since ReduxFramework 3.0.4 
  7. */ 
  8. function __construct( $field = array(), $value = '', $parent ) { 
  9. $this->parent = $parent; 
  10. $this->field = $field; 
  11. $this->value = $value; 
  12.  
  13. /** 
  14. * Field Render Function. 
  15. * Takes the vars and outputs the HTML for the field in the settings 
  16. * @since ReduxFramework 1.0.0 
  17. */ 
  18. function render() { 
  19.  
  20. // If align value is not set, set it to false, the default 
  21. if ( ! isset( $this->field['align'] ) ) { 
  22. $this->field['align'] = false; 
  23.  
  24. // Set align flag. 
  25. $doAlign = $this->field['align']; 
  26.  
  27. // The following could needs to be omitted if align is true. 
  28. // Only print it if allign is false. 
  29. if ( false == $doAlign ) { 
  30. echo '<style>#' . $this->parent->args['opt_name'] . '-' . $this->field['id'] . ' {padding: 0;}</style>'; 
  31. echo '</td></tr>'; 
  32. echo '</table>'; 
  33. echo '<table id="' . $this->parent->args['opt_name'] . '-' . $this->field['id'] . '" class="form-table no-border redux-group-table redux-raw-table" style="margin-top: -20px; overflow: auto;">'; 
  34. echo '<tbody><tr><td>'; 
  35.  
  36. echo '<fieldset id="' . $this->parent->args['opt_name'] . '-' . $this->field['id'] . '" class="redux-field redux-container-' . $this->field['type'] . ' ' . $this->field['class'] . '" data-id="' . $this->field['id'] . '">'; 
  37.  
  38. if ( ! empty( $this->field['include'] ) && file_exists( $this->field['include'] ) ) { 
  39. require_once( $this->field['include'] ); 
  40.  
  41. if ( ! empty( $this->field['content'] ) && isset( $this->field['content'] ) ) { 
  42. if ( isset( $this->field['markdown'] ) && $this->field['markdown'] == true ) { 
  43. require_once dirname( __FILE__ ) . "/parsedown.php"; 
  44. $Parsedown = new Parsedown(); 
  45. echo $Parsedown->text( $this->field['content'] ); 
  46. } else { 
  47. echo $this->field['content']; 
  48.  
  49. do_action( 'redux-field-raw-' . $this->parent->args['opt_name'] . '-' . $this->field['id'] ); 
  50.  
  51. echo '</fieldset>'; 
  52.  
  53. // Only print is align is false. 
  54. if ( false == $doAlign ) { 
  55. echo '</td></tr></table><table class="form-table no-border" style="margin-top: 0;"><tbody><tr style="border-bottom: 0;"><th></th><td>';