RWMB_Text_Field

The Evolved RWMB Text Field class.

Defined (1)

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

/meta-box/inc/fields/text.php  
  1. class RWMB_Text_Field 
  2. /** 
  3. * Get field HTML 
  4. * @param string $html 
  5. * @param mixed $meta 
  6. * @param array $field 
  7. * @return string 
  8. */ 
  9. static function html( $html, $meta, $field ) 
  10. $name = " name='{$field['field_name']}'"; 
  11. $id = isset( $field['clone'] ) && $field['clone'] ? '' : " id='{$field['id']}'"; 
  12. $val = " value='{$meta}'"; 
  13. $size = isset( $field['size'] ) ? $field['size'] : '30'; 
  14. $std = isset( $field['disabled'] ) ? $field['disabled'] : false; 
  15. $disabled = disabled( $std, true, false ); 
  16.  
  17. $html .= "<input type='text' class='rwmb-text'{$name}{$id}{$val}{$disabled} size='{$size}' />"; 
  18.  
  19. return $html;