Make WordPress Core

Changeset 41324


Ignore:
Timestamp:
08/30/2017 07:52:59 PM (9 years ago)
Author:
flixos90
Message:

Multisite: Remove an unnecessary if clause wrapping the added_existing_user filter.

This was accidentally introduced in [41125]. Since the added_existing_user filter has historically accepted either true or a WP_Error object, the clause is not necessary here. The doc block has been adjusted to account for the new possible WP_Error condition.

Fixes #41101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r41289 r41324  
    21112111                $result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] );
    21122112
    2113                 if ( ! is_wp_error( $result ) ) {
    2114                         /**
    2115                          * Fires immediately after an existing user is added to a site.
    2116                          *
    2117                          * @since MU (3.0.0)
    2118                          *
    2119                          * @param int   $user_id User ID.
    2120                          * @param mixed $result  True on success or a WP_Error object if the user doesn't exist.
    2121                          */
    2122                         do_action( 'added_existing_user', $details['user_id'], $result );
    2123                 }
     2113                /**
     2114                 * Fires immediately after an existing user is added to a site.
     2115                 *
     2116                 * @since MU (3.0.0)
     2117                 *
     2118                 * @param int   $user_id User ID.
     2119                 * @param mixed $result  True on success or a WP_Error object if the user doesn't exist
     2120                 *                       or could not be added.
     2121                 */
     2122                do_action( 'added_existing_user', $details['user_id'], $result );
    21242123
    21252124                return $result;
Note: See TracChangeset for help on using the changeset viewer.