RWMB_Select_Field::get_attributes PHP Method

get_attributes() public static method

Get the attributes for a field
public static get_attributes ( array $field, mixed $value = null ) : array
$field array
$value mixed
return array
    public static function get_attributes($field, $value = null)
    {
        $attributes = parent::get_attributes($field, $value);
        $attributes = wp_parse_args($attributes, array('multiple' => $field['multiple'], 'size' => $field['size']));
        return $attributes;
    }

Usage Example

Esempio n. 1
0
 /**
  * Get the attributes for a field
  *
  * @param array $field
  * @param mixed $value
  *
  * @return array
  */
 public static function get_attributes($field, $value = null)
 {
     $attributes = parent::get_attributes($field, $value);
     $attributes['multiple'] = false;
     $attributes['id'] = false;
     return $attributes;
 }
All Usage Examples Of RWMB_Select_Field::get_attributes