Make WordPress Core

Ticket #39223: 39223.4.patch

File 39223.4.patch, 3.7 KB (added by Mista-Flo, 8 years ago)

add signup_site_meta filter to wpmu_signup_blog() and keep consistency with filter names

  • wp-includes/ms-functions.php

    diff --git wp-includes/ms-functions.php wp-includes/ms-functions.php
    index ad8330a..3193129 100644
    function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = a 
    671671
    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,
    676693                'path' => $path,
    function wpmu_signup_user( $user, $user_email, $meta = array() ) { 
    720737        $user_email = sanitize_email( $user_email );
    721738        $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
    722739
     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 );
     753
    723754        $wpdb->insert( $wpdb->signups, array(
    724755                'domain' => '',
    725756                'path' => '',