/** * Normalize parameters for field * * @param array $field * @return array */ public static function normalize($field) { $field = parent::normalize($field); $field = $field['multiple'] ? SWPMB_Multiple_Values_Field::normalize($field) : $field; $field = wp_parse_args($field, array('size' => $field['multiple'] ? 5 : 0, 'select_all_none' => false)); return $field; }
/** * Normalize parameters for field * * @param array $field * @return array */ public static function normalize($field) { $field = $field['multiple'] ? SWPMB_Multiple_Values_Field::normalize($field) : $field; $field = SWPMB_Input_Field::normalize($field); $field = parent::normalize($field); $field = wp_parse_args($field, array('collapse' => true, 'inline' => null)); $field['flatten'] = $field['multiple'] ? $field['flatten'] : true; $field['inline'] = !$field['multiple'] && !isset($field['inline']) ? true : $field['inline']; return $field; }
/** * Normalize parameters for field * * @param array $field * @return array */ static function normalize($field) { $field = parent::normalize($field); $field = wp_parse_args($field, array('size' => 30)); return $field; }