buddypress/tests/phpunit/assets
Mathieu Viet fa7902171e 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



git-svn-id: https://buddypress.svn.wordpress.org/trunk@12868 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2021-03-21 14:17:21 +00:00
..
templates Pass extra args to template loading files. 2020-09-19 18:19:45 +00:00
attachment-extensions.php Allow class extending the BP_Attachment class to get the original WordPress upload dir within their upload_dir_filter() method. 2015-10-06 23:53:33 +00:00
bp-rest-api-controllers.php Prepare the inclusion of the BP REST API remaining endpoints 2020-03-31 11:33:35 +00:00
bptest-xprofile-field-type.php Field Types can now declare supported features & field visibility 2021-03-21 14:17:21 +00:00
canola.jpg PHPUnit: fix failing tests about media 2021-02-06 19:15:14 +00:00
group-extensions.php Groups: Make sure BP_Group_Extension::widget_display() can be used 2016-06-27 03:07:47 +00:00
invitations-extensions.php Groups: Avoid a PHP 8.0 deprecated notice about optional function arg. 2020-11-19 12:50:44 +00:00
phpunit-wp-config.php Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
test-image-large.jpg PHPUnit: fix failing tests about media 2021-02-06 19:15:14 +00:00
upside-down.jpg Add Unit Tests for BP_Attachment_Avatar->shrink() and BP_Attachment_Cover_Image->fit() methods. 2015-10-03 21:55:08 +00:00