Make WordPress Core

Changeset 28445


Ignore:
Timestamp:
05/16/2014 02:42:25 PM (10 years ago)
Author:
wonderboymusic
Message:

Eliminate use of extract() in validate_another_blog_signup().

The extracted variables set/overwrite globals. $user does not need to be pulled from validate_blog_form() as it is not used in this function.

See #22400.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-signup.php

    r26120 r28445  
    316316
    317317    $result = validate_blog_form();
    318     extract($result);
     318
     319    // extracted values set/overwrite globals
     320    $domain = $result['domain'];
     321    $path = $result['path'];
     322    $blogname = $result['blogname'];
     323    $blog_title = $result['blog_title'];
     324    $errors = $result['errors'];
    319325
    320326    if ( $errors->get_error_code() ) {
     
    338344     * @param array $blog_meta_defaults An array of default blog meta variables.
    339345     */
    340     $meta = apply_filters( 'signup_create_blog_meta', $blog_meta_defaults );
     346    $meta_defaults = apply_filters( 'signup_create_blog_meta', $blog_meta_defaults );
    341347    /**
    342348     * Filter the new default site meta variables.
     
    351357     * }
    352358     */
    353     $meta = apply_filters( 'add_signup_meta', $meta );
     359    $meta = apply_filters( 'add_signup_meta', $meta_defaults );
    354360
    355361    wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );
Note: See TracChangeset for help on using the changeset viewer.