WordPress.org

Make WordPress Core

Changeset 39920


Ignore:
Timestamp:
01/17/2017 03:52:24 AM (16 months ago)
Author:
SergeyBiryukov
Message:

Users: Introduce signup_site_meta and signup_user_meta for filtering signup metadata in wpmu_signup_blog() and wpmu_signup_user(), respectively.

Props Mista-Flo.
Fixes #39223.

File:
1 edited

Legend:

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

    r39887 r39920  
    672672    $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
    673673
     674    /**
     675     * Filters the metadata for a site signup.
     676     *
     677     * The metadata will be serialized prior to storing it in the database.
     678     *
     679     * @since 4.8.0
     680     *
     681     * @param array  $meta       Signup meta data. Default empty array.
     682     * @param string $domain     The requested domain.
     683     * @param string $path       The requested path.
     684     * @param string $title      The requested site title.
     685     * @param string $user       The user's requested login name.
     686     * @param string $user_email The user's email address.
     687     * @param string $key        The user's activation key.
     688     */
     689    $meta = apply_filters( 'signup_site_meta', $meta, $domain, $path, $title, $user, $user_email, $key );
     690
    674691    $wpdb->insert( $wpdb->signups, array(
    675692        'domain' => $domain,
     
    720737    $user_email = sanitize_email( $user_email );
    721738    $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
     739
     740    /**
     741     * Filters the metadata for a user signup.
     742     *
     743     * The metadata will be serialized prior to storing it in the database.
     744     *
     745     * @since 4.8.0
     746     *
     747     * @param array  $meta       Signup meta data. Default empty array.
     748     * @param string $user       The user's requested login name.
     749     * @param string $user_email The user's email address.
     750     * @param string $key        The user's activation key.
     751     */
     752    $meta = apply_filters( 'signup_user_meta', $meta, $user, $user_email, $key );
    722753
    723754    $wpdb->insert( $wpdb->signups, array(
Note: See TracChangeset for help on using the changeset viewer.