[buddypress-trac] [BuddyPress Trac] #7162: xprofile field support for WordPress Profile Fields

buddypress-trac noreply at wordpress.org
Sun Mar 21 14:17:28 UTC 2021


#7162: xprofile field support for WordPress Profile Fields
---------------------------------------------+---------------------
 Reporter:  DJPaul                           |       Owner:  (none)
     Type:  feature request                  |      Status:  new
 Priority:  strategic                        |   Milestone:  8.0.0
Component:  Extended Profile                 |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |
---------------------------------------------+---------------------

Comment (by imath):

 In [changeset:"12868" 12868]:
 {{{
 #!CommitTicketReference repository="" revision="12868"
 Field Types can now declare supported features & field visibility

 - Edit the JavaScript file used by the xProfile Create field
 Administration screen to handle Field types requirements by showing/hiding
 screen metaboxes according to feature supports and to get ride of some
 jQuery deprecated methods.
 - Improve the xProfile Field API to take in account xProfile Field Types
 declared feature supports by adding two new methods to get
 (`BP_XProfile_Field->get_field_type_supports()`) & check
 (`BP_XProfile_Field->field_type_supports( $feature_name )`) the field type
 supported features.
 - The xProfile Create field Administration Screen Metaboxes displayed to
 set the field properties can now be disabled by the Field Type using the
 static variable `$supported_features`. See `tests/phpunit/assets/bptest-
 xprofile-field-type.php` for an example of use.
 - Improve the xProfile Field API to take in account the xProfile Field
 Types `visibility` property to use as default field visibility. NB:
 setting this Field Type visibility and its `allow_custom_visibility`
 feature support to `false`, a Field Type can now enforce the visibility to
 use for a field.
 - Introduce a new xProfile Fields loop argument `$hide_field_types` to
 avoid displaying fields according to an array of Field types. To customize
 this new argument you can use the `bp_before_has_profile_parse_args`
 filter for existing xProfile loop. For instance you can avoid to list
 xProfile fields according to their type from the WP-Admin/Extended profile
 screen checking the corresponding Administration Screen ID.
 - Add PHP unit tests to verify these improvements are working the right
 way.

 Props DJPaul, Offereins, needle, netweb, vapvarun

 See #7162
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7162#comment:27>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list