[wp-trac] [WordPress Trac] #41950: wp_insert_user() should accept a meta_input argument
WordPress Trac
noreply at wordpress.org
Wed Apr 7 12:53:46 UTC 2021
#41950: wp_insert_user() should accept a meta_input argument
--------------------------------------+------------------------------
Reporter: desrosj | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 2.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by donmhico):
I attached a PR that should address this enhancement requests. One thing
to note though.
I decided to have a separate filter for the `meta_input`, usage -
`apply_filters( 'insert_user_custom_meta', $custom_meta, $user, $update
);` instead of using the existing filter - `apply_filters(
'insert_user_meta', $meta, $user, $update );`.
The main reason is to just not touch that filter and prevent any possible
backward compat issue. And to also have different filters between **built-
in** user meta and **custom** ones.
Any feedback is welcome.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41950#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list