From cdc6bc8ad5f1ed05edae926dca5d626d479bfa6b Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 17 Sep 2015 14:35:26 +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. Built from https://develop.svn.wordpress.org/trunk@34266 git-svn-id: http://core.svn.wordpress.org/trunk@34230 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user-functions.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/user-functions.php b/wp-includes/user-functions.php index 9ee3823341..8015d1c3c1 100644 --- a/wp-includes/user-functions.php +++ b/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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 06acc3d90f..1809c8b321 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34265'; +$wp_version = '4.4-alpha-34266'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.