Ejemplo n.º 1
0
 /**
  * Modify the attributes for this field.
  *
  * @param  object $field the field to work with.
  * @return array
  */
 public static function get_attributes($field)
 {
     $attributes = parent::get_attributes($field);
     $attributes = wp_parse_args($attributes, array('value' => parent::get_value($field)));
     return $attributes;
 }
Ejemplo n.º 2
0
 /**
  * Modify the attributes for this field.
  *
  * @param  object $field the field to work with.
  * @return array
  */
 public static function get_attributes($field)
 {
     $attributes = parent::get_attributes($field);
     $attributes = wp_parse_args($attributes, array('value' => parent::get_value($field), 'min' => 0, 'max' => false, 'step' => 1));
     return $attributes;
 }