[buddypress-trac] [BuddyPress Trac] #5741: Add a "required" class to the xprofile fields
buddypress-trac
noreply at wordpress.org
Tue Jul 8 12:54:12 UTC 2014
#5741: Add a "required" class to the xprofile fields
-------------------------+-----------------------------
Reporter: WCUADD | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: normal | Keywords:
-------------------------+-----------------------------
This can currectly be done as a snippet
{{{
function add_mandatory_xprofile_field_class( $css_classes ) {
global $profile_template;
if ( bp_get_the_profile_field_is_required() ) $css_classes[] =
‘mandatory’;
return $css_classes;
}
add_filter( ‘bp_field_css_classes’, ‘add_mandatory_xprofile_field_class’
);
}}}
'''but it makes sense to include it directly in the `bp_field_css_class()`
in `bp-xprofile-template.php`'''.
Please refer to ticket #5739 to take into account the other sections of
the registration form in order to have a "required" class for all the
fields in this form whatever section it belongs.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5741>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list