ReduxFramework_raw

The evolve ReduxFramework raw class.

Defined (1)

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

/library/admin/redux-framework/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 ( ! empty( $this->field['include'] ) && file_exists( $this->field['include'] ) ) { 
  21. require_once $this->field['include']; 
  22.  
  23. if ( isset( $this->field['content_path'] ) && ! empty( $this->field['content_path'] ) && file_exists( $this->field['content_path'] ) ) { 
  24. $this->field['content'] = $this->parent->filesystem->execute( 'get_contents', $this->field['content_path'] ); 
  25.  
  26. if ( ! empty( $this->field['content'] ) && isset( $this->field['content'] ) ) { 
  27. if ( isset( $this->field['markdown'] ) && $this->field['markdown'] == true && ! empty( $this->field['content'] ) ) { 
  28. require_once dirname( __FILE__ ) . "/parsedown.php"; 
  29. $Parsedown = new Parsedown(); 
  30. echo $Parsedown->text( $this->field['content'] ); 
  31. } else { 
  32. echo $this->field['content']; 
  33.  
  34. do_action( 'redux-field-raw-' . $this->parent->args['opt_name'] . '-' . $this->field['id'] ); 
  35.