CMB2_Type_Textarea

CMB textarea field type.

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/types/CMB2_Type_Textarea.php  
  1. class CMB2_Type_Textarea extends CMB2_Type_Base { 
  2.  
  3. /** 
  4. * Handles outputting an 'textarea' element 
  5. * @since 1.1.0 
  6. * @param array $args Override arguments 
  7. * @return string Form textarea element 
  8. */ 
  9. public function render( $args = array() ) { 
  10. $args = empty( $args ) ? $this->args : $args; 
  11. $a = $this->parse_args( 'textarea', array( 
  12. 'class' => 'cmb2_textarea',  
  13. 'name' => $this->_name(),  
  14. 'id' => $this->_id(),  
  15. 'cols' => 60,  
  16. 'rows' => 10,  
  17. 'value' => $this->field->escaped_value( 'esc_textarea' ),  
  18. 'desc' => $this->_desc( true ),  
  19. ), $args ); 
  20.  
  21. return $this->rendered( 
  22. sprintf( '<textarea%s>%s</textarea>%s', $this->concat_attrs( $a, array( 'desc', 'value' ) ), $a['value'], $a['desc'] ) 
  23. );