WordPress.org

Make WordPress Core

Ticket #39223: 39223.2.patch

File 39223.2.patch, 4.6 KB (added by Mista-Flo, 3 years ago)

Fix php doc

  • wp-includes/ms-functions.php

    diff --git wp-includes/ms-functions.php wp-includes/ms-functions.php
    index d0cada3..c617f16 100644
    function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = a 
    711711 *
    712712 * @param string $user       The user's requested login name.
    713713 * @param string $user_email The user's email address.
    714  * @param array  $meta       By default, this is an empty array.
     714 * @param array  $meta       Additional signup meta. Default empty array.
    715715 */
    716716function wpmu_signup_user( $user, $user_email, $meta = array() ) {
    717717        global $wpdb;
    function wpmu_signup_user( $user, $user_email, $meta = array() ) { 
    720720        $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
    721721        $user_email = sanitize_email( $user_email );
    722722        $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
    723         $meta = serialize($meta);
     723
     724        /**
     725         * Filters the metadata for a user signup
     726         *
     727         * The metadata will be serialized prior to storing it in the database
     728         *
     729         * @since 4.8.0
     730         *
     731         * @param array  $meta       Additional signup meta. Default empty array.
     732         * @param string $user       The user's requested login name.
     733         * @param string $user_email The user's email address.
     734         * @param string $key        The user's activation key.
     735         */
     736        $meta = apply_filters( 'signup_user_meta', $meta, $user, $user_email, $key );
    724737
    725738        $wpdb->insert( $wpdb->signups, array(
    726739                'domain' => '',
    function wpmu_signup_user( $user, $user_email, $meta = array() ) { 
    730743                'user_email' => $user_email,
    731744                'registered' => current_time('mysql', true),
    732745                'activation_key' => $key,
    733                 'meta' => $meta
     746                'meta' => serialize( $meta ),
    734747        ) );
    735748
    736749        /**
    function wpmu_signup_user( $user, $user_email, $meta = array() ) { 
    740753         *
    741754         * @param string $user       The user's requested login name.
    742755         * @param string $user_email The user's email address.
    743          * @param string $key        The user's activation key
    744          * @param array  $meta       Additional signup meta. By default, this is an empty array.
     756         * @param string $key        The user's activation key.
     757         * @param array  $meta       Additional signup meta. Default empty array.
    745758         */
    746759        do_action( 'after_signup_user', $user, $user_email, $key, $meta );
    747760}