add_filter('bp_get_form_field_attributes', 'hp_xprofile_add_attributes', 11, 2);
function hp_xprofile_add_attributes($attributes, $name){
switch($name) {
case 'yourbusinessdescription':
$new_attribute['maxlength']= '160';
$attributes = array_merge($new_attribute, $attributes);
break;
}
return $attributes;
}
↧
Reply To: adding html attributes to Xprofile fields – code check
↧