From b08a1764881d8b940263952a652b3b095b3d6835 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 17 Sep 2015 14:34:49 +0000 Subject: [PATCH] Tell the `insert_user_meta` filter whether user is being updated. `insert_user_meta` was introduced in [33708]. This changeset passes the `$update` parameter to it. Props tharsheblows, geminorum. Fixes #31549. git-svn-id: https://develop.svn.wordpress.org/trunk@34266 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user-functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/user-functions.php b/src/wp-includes/user-functions.php index 9ee3823341..8015d1c3c1 100644 --- a/src/wp-includes/user-functions.php +++ b/src/wp-includes/user-functions.php @@ -1451,9 +1451,10 @@ function wp_insert_user( $userdata ) { * @type bool $show_admin_bar_front Whether to show the admin bar on the front end for the user. * Default true. * } - * @param WP_User $user User object. + * @param WP_User $user User object. + * @param bool $update Whether the user is being updated rather than created. */ - $meta = apply_filters( 'insert_user_meta', $meta, $user ); + $meta = apply_filters( 'insert_user_meta', $meta, $user, $update ); // Update user meta. foreach ( $meta as $key => $value ) {