Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r46660 r47122  
    227227        foreach ( (array) $blogs as $key => $details ) {
    228228            $most_active[ $details['blog_id'] ] = $details['postcount'];
    229             $blog_list[ $details['blog_id'] ] = $details; // array_slice() removes keys!!
     229            $blog_list[ $details['blog_id'] ] = $details; // array_slice() removes keys!
    230230        }
    231231        arsort( $most_active );
     
    372372            $blogname = substr( $domain, 0, strpos( $domain, '.' ) );
    373373            $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;
    374             // we're not installing the main blog
     374            // We're not installing the main blog.
    375375            if ( $blogname != 'www.' )
    376376                $url .= $blogname . '/';
    377         } else { // main blog
     377        } else { // Main blog.
    378378            $url = 'http://' . $domain . $path;
    379379        }
     
    404404        return __( '<strong>ERROR</strong>: Site URL already taken.' );
    405405
    406     // Need to back up wpdb table names, and create a new wp_blogs entry for new blog.
    407     // Need to get blog_id from wp_blogs, and create new table names.
    408     // Must restore table names at the end of function.
     406    /*
     407     * Need to back up wpdb table names, and create a new wp_blogs entry for new blog.
     408     * Need to get blog_id from wp_blogs, and create new table names.
     409     * Must restore table names at the end of function.
     410     */
    409411
    410412    if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
     
    495497    $args = wp_parse_args( $args, $defaults );
    496498
    497     // Backwards compatibility
     499    // Backward compatibility.
    498500    if( is_array( $args['network_id'] ) ){
    499501        $args['network__in'] = $args['network_id'];
     
    606608    _deprecated_function( __FUNCTION__, '5.1.0' );
    607609
    608     // Cast for security
     610    // Cast for security.
    609611    $blog_id = (int) $blog_id;
    610612
     
    619621    $url = get_blogaddress_by_id( $blog_id );
    620622
    621     // Set everything up
     623    // Set everything up.
    622624    make_db_current_silent( 'blog' );
    623625    populate_options();
     
    651653    update_option( 'admin_email', '' );
    652654
    653     // remove all perms
     655    // Remove all permissions.
    654656    $table_prefix = $wpdb->get_blog_prefix();
    655     delete_metadata( 'user', 0, $table_prefix . 'user_level', null, true ); // delete all
    656     delete_metadata( 'user', 0, $table_prefix . 'capabilities', null, true ); // delete all
     657    delete_metadata( 'user', 0, $table_prefix . 'user_level', null, true );   // Delete all.
     658    delete_metadata( 'user', 0, $table_prefix . 'capabilities', null, true ); // Delete all.
    657659}
    658660
Note: See TracChangeset for help on using the changeset viewer.