Changeset 47122 for trunk/src/wp-includes/ms-deprecated.php
- Timestamp:
- 01/29/2020 12:43:23 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-deprecated.php
r46660 r47122 227 227 foreach ( (array) $blogs as $key => $details ) { 228 228 $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! 230 230 } 231 231 arsort( $most_active ); … … 372 372 $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 373 373 $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path; 374 // we're not installing the main blog374 // We're not installing the main blog. 375 375 if ( $blogname != 'www.' ) 376 376 $url .= $blogname . '/'; 377 } else { // main blog377 } else { // Main blog. 378 378 $url = 'http://' . $domain . $path; 379 379 } … … 404 404 return __( '<strong>ERROR</strong>: Site URL already taken.' ); 405 405 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 */ 409 411 410 412 if ( ! $blog_id = insert_blog($domain, $path, $site_id) ) … … 495 497 $args = wp_parse_args( $args, $defaults ); 496 498 497 // Backward s compatibility499 // Backward compatibility. 498 500 if( is_array( $args['network_id'] ) ){ 499 501 $args['network__in'] = $args['network_id']; … … 606 608 _deprecated_function( __FUNCTION__, '5.1.0' ); 607 609 608 // Cast for security 610 // Cast for security. 609 611 $blog_id = (int) $blog_id; 610 612 … … 619 621 $url = get_blogaddress_by_id( $blog_id ); 620 622 621 // Set everything up 623 // Set everything up. 622 624 make_db_current_silent( 'blog' ); 623 625 populate_options(); … … 651 653 update_option( 'admin_email', '' ); 652 654 653 // remove all perms655 // Remove all permissions. 654 656 $table_prefix = $wpdb->get_blog_prefix(); 655 delete_metadata( 'user', 0, $table_prefix . 'user_level', null, true ); // delete all656 delete_metadata( 'user', 0, $table_prefix . 'capabilities', null, true ); // delete all657 delete_metadata( 'user', 0, $table_prefix . 'user_level', null, true ); // Delete all. 658 delete_metadata( 'user', 0, $table_prefix . 'capabilities', null, true ); // Delete all. 657 659 } 658 660
Note: See TracChangeset
for help on using the changeset viewer.