[wp-trac] [WordPress Trac] #43339: Global user_options calls should use user_meta instead

WordPress Trac noreply at wordpress.org
Mon May 24 19:58:28 UTC 2021


#43339: Global user_options calls should use user_meta instead
--------------------------------------------------+---------------------
 Reporter:  johnjamesjacoby                       |       Owner:  zkancs
     Type:  enhancement                           |      Status:  closed
 Priority:  normal                                |   Milestone:  5.8
Component:  General                               |     Version:
 Severity:  normal                                |  Resolution:  fixed
 Keywords:  2nd-opinion good-first-bug has-patch  |     Focuses:
--------------------------------------------------+---------------------
Changes (by desrosj):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50981" 50981]:
 {{{
 #!CommitTicketReference repository="" revision="50981"
 General: Avoid unnecessary calls to `update_user_option()`.

 The `update_user_option()` function is a way to update a user meta value
 after adding a blog’s prefix to the beginning of the meta key. But when
 the fourth parameter is `true`, the behavior is exactly the same as
 calling `update_user_meta()` directly.

 This replaces all instances of `update_user_option()` when the fourth
 parameter is `true` in Core with a direct call to `update_user_meta()` to
 prevent an unnecessary call to `update_user_option()`.

 Props johnjamesjacoby, zkancs, obenland, desrosj.
 Fixes #43339.
 }}}

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


More information about the wp-trac mailing list