Feature Request: Filterable xProfile Field Labels
Looking to request a feature for the xProfile fields, if this isn’t the right place to make sure a request can someone point me in the right direction.
I would love the xProfile classes be updated so the field labels are filterable, in my case this would be useful so I can replace the standard (required) denotation specifically when the xProfile field is included on the WooCommerce Checkout form to utilize the standard woocommerce asterisk (*) denotation.
The concept comes from the custom xProfile classes created by @donmik for the Buddypress Xprofile Custom Fields Type plugin;
My specific implementation where the Xprofile fields are incorporated onto the Woocommerce Checkout form comes with the tandem implementation of the paid and free plugins by themekraft
Paid Primary – http://themekraft.com/store/woocommerce-buddypress-integration-wordpress-plugin/
Free Addon – https://wordpress.org/plugins/woocommerce-buddypress-integration-xprofile-checkout-manager/
Together these include the Xprofile fields onto the Checkout, however they don’t quite match with the Woocommerce fields so I had to add classes to them (currently capable through the bp_xprofile_field_edit_html_elements filter) and want to replace the (required) in the label with the appropriate asterisk.
My current workaround involves jQuery to do the label replace, but I would prefer a label filter.
An example how @donmik implemented a label filter for his custom Xprofile fields;
$label = sprintf( '<label for="%s">%s%s</label>', bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), (bp_get_the_profile_field_is_required()) ? ' ' . esc_html__( '(required)', 'buddypress' ) : '' ); // Label. echo apply_filters('bxcft_field_label', $label, bp_get_the_profile_field_id(), bp_get_the_profile_field_type(), bp_get_the_profile_field_input_name(), bp_get_the_profile_field_name(), bp_get_the_profile_field_is_required());
Hoping this is the right channel for this request, otherwise hoping someone can point me to it. Or if the plugin is available on github would be happy to make a fork request and code the change myself.
- The topic ‘Feature Request: Filterable xProfile Field Labels’ is closed to new replies.