[buddypress-trac] [BuddyPress Trac] #5740: Description sould be part of the $field_type->edit_field_html() ? / scope of this function

buddypress-trac noreply at wordpress.org
Tue Jul 8 12:23:40 UTC 2014


#5740: Description sould be part of the $field_type->edit_field_html() ? / scope
of this function
-------------------------+-----------------------------
 Reporter:  WCUADD       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 The `$field_type->edit_field()` function in `bp-xprofile-classes.php`
 deals with the rendering of each xprofile field according to its type :
 * name of the field in a `<label>`
 * text "required" if the field is required
 * mention of the occurred errors if it is the case (see ticket #5595 and
 #5738)
 * call to the `edit_field_options_html()` to print the form inputs

 The description of the field which gives instructions to the user is out
 of the scope of the `edit_field()` function. But in a lot of cases, the
 description must be placed before the <input> in order to be taken into
 account by the user before beginning to fill in the field.

 The fact that the description is out of the scope of the `edit_field()`
 function prevents to place the description as one wants.

 This idea should be extended to the visibility dealing process, which is
 currently taken into account into the templates (`members/register.php`
 and `members/single/profile/edit.php`), whereas it could be more benefic
 to be at least factorised in a single function with its appropriate
 filters and called inside the `edit_field()` ?

 The global idea is to give more flexibility to order or modify the
 different elements which compose the xprofile field without having to
 modify the templates or even the core files (`bp-xprofile-classes.php`).

 It is only a suggestion.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5740>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list