[buddypress-trac] [BuddyPress Trac] #8339: Codebase language improvements for a better contributors inclusivity

buddypress-trac noreply at wordpress.org
Wed Jul 29 19:01:12 UTC 2020

#8339: Codebase language improvements for a better contributors inclusivity
 Reporter:  imath         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  7.0.0
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
Changes (by boonebgorges):

 * keywords:  needs-patch => dev-feedback


 In [12694] I made the easy changes.

 The remaining instances are a bit more complicated, so I was hoping for
 review or feedback before moving forward.

 == `BP_XProfile_Field_Type`

 See [attachment:"8339-xprofile.diff"].

 This class has a method `set_whitelist_values()`, a filter
 `'bp_xprofile_field_type_set_whitelist_values'` and a property
   a. I've changed the method to `set_allowed_values()`, and changed
 `set_whitelist_values()` to a wrapper that calls `_deprecated_function()`.
   b. I wrapped the old filter in `apply_filters_deprecated()` and added a
 new, appropriately-named filter.
   c. The property is the tricky bit. I renamed it to
 `validation_allowed_values`. This could break compatibility if a
 `BP_XProfile_Field_Type` extending class references the protected
 `validation_whitelist` property. I thought about a magic `__get()` but
 this will cause visibility issues, since the property should be
 `protected` and `__get()` will make it `public`. Our own core field types
 do *not* directly reference `validation_whitelist` - we only use the
 wrapper methods - so I think it's very unlikely that any plugins do so
 either, which means that this is probably an acceptable break.

 == Activity and core keyword moderation

 See [attachment:"8339-activity.diff"].

 The language in WP is 'disallowed keys', so that's what I've used

 A few function names contained `blacklist`. I deprecated them in
 `7.0.php`. As above, I also deprecated filters, and added new ones with
 more appropriate names.

 [12694] already contains the necessary changes to accommodate the new
 `disallowed_keys` option in WP. See

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8339#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list