[wp-trac] [WordPress Trac] #51513: Rename 'wp_is_application_passwords_available' filter and function

WordPress Trac noreply at wordpress.org
Tue Oct 20 02:56:47 UTC 2020


#51513: Rename 'wp_is_application_passwords_available' filter and function
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  5.6
Component:  REST API        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+---------------------

Comment (by SergeyBiryukov):

 Thanks for the additional context!

 I think, at the very least, "is" should be dropped:
 * `wp_application_passwords_available()`
 * `wp_application_passwords_available_for_user()`
 That would be more consistent with other filters. I realize that
 "Application Passwords" is the name of the feature, but without that
 context "is" looks a bit weird to me in these names.

 Still, `wp_application_passwords_available_for_user()` is confusing to me.
 With the "available" vs. "enabled" difference in mind, it's hard to tell
 what exactly if tests for:
 * Is it for application passwords being available for the user, but not
 necessarily enabled?
 * Or is it for application passwords being enabled for the user?

 The description says:
 > Checks if Application Passwords is enabled for a specific user.

 So it seems like `wp_application_passwords_enabled_for_user()` would be a
 more accurate name?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51513#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list