Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 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/tests/phpunit/tests/multisite/site.php

    r47013 r47122  
    145145            $prefix = $wpdb->get_blog_prefix( $blog_id );
    146146
    147             // $get_all = false, only retrieve details from the blogs table
     147            // $get_all = false, only retrieve details from the blogs table.
    148148            $details = get_blog_details( $blog_id, false );
    149149
     
    153153            $this->assertEquals( $details, wp_cache_get( $blog_id . 'short', 'blog-details' ) );
    154154
    155             // get_blogaddress_by_name()
     155            // get_blogaddress_by_name().
    156156            $this->assertEquals( 'http://' . $details->domain . $details->path, get_blogaddress_by_name( trim( $details->path, '/' ) ) );
    157157
    158             // These are empty until get_blog_details() is called with $get_all = true
     158            // These are empty until get_blog_details() is called with $get_all = true.
    159159            $this->assertEquals( false, wp_cache_get( $blog_id, 'blog-details' ) );
    160160            $this->assertEquals( false, wp_cache_get( $key, 'blog-lookup' ) );
    161161
    162             // $get_all = true, populate the full blog-details cache and the blog slug lookup cache
     162            // $get_all = true, populate the full blog-details cache and the blog slug lookup cache.
    163163            $details = get_blog_details( $blog_id, true );
    164164            $this->assertEquals( $details, wp_cache_get( $blog_id, 'blog-details' ) );
     
    188188            }
    189189
    190             // update the blog count cache to use get_blog_count()
     190            // Update the blog count cache to use get_blog_count().
    191191            wp_update_network_counts();
    192192            $this->assertEquals( 2, (int) get_blog_count() );
     
    351351            wpmu_delete_blog( $blog_id, false );
    352352
    353             // update the blog count cache to use get_blog_count()
     353            // Update the blog count cache to use get_blog_count().
    354354            wp_update_network_counts();
    355355            $this->assertEquals( 1, get_blog_count() );
     
    365365            wpmu_delete_blog( $blog_id, true );
    366366
    367             // update the blog count cache to use get_blog_count()
     367            // Update the blog count cache to use get_blog_count().
    368368            wp_update_network_counts();
    369369            $this->assertEquals( 1, get_blog_count() );
     
    406406            wpmu_update_blogs_date();
    407407
    408             // compare the update time with the current time, allow delta < 2
     408            // Compare the update time with the current time, allow delta < 2.
    409409            $blog            = get_site( get_current_blog_id() );
    410410            $current_time    = time();
     
    920920            remove_filter( 'domain_exists', array( $this, '_domain_exists_cb' ), 10, 4 );
    921921
    922             // Make sure the same result is returned with or without a trailing slash
     922            // Make sure the same result is returned with or without a trailing slash.
    923923            $this->assertEquals( $exists1, $exists2 );
    924924        }
     
    23552355         */
    23562356        public function populate_options_callback() {
    2357             // Cache blog details
     2357            // Cache blog details.
    23582358            $blog_id = get_current_blog_id();
    23592359            get_blog_details( $blog_id );
    23602360            get_site( $blog_id )->siteurl;
    2361             // Set siteurl
     2361            // Set siteurl.
    23622362            update_option( 'siteurl', 'http://testsite1.example.org/test' );
    23632363        }
     
    24212421        protected function _get_next_site_id() {
    24222422            global $wpdb;
    2423             //create an entry
     2423            // Create an entry.
    24242424            static::factory()->blog->create();
    2425             //get the ID after it
     2425            // Get the ID after it.
    24262426            return (int) $wpdb->get_var( 'SELECT blog_id FROM ' . $wpdb->blogs . ' ORDER BY blog_ID DESC LIMIT 1' ) + 1;
    24272427        }
     
    24392439                    array(),
    24402440                    array(
    2441                         'public' => 0, // `public` is one of the defaults metas in `wpmu_create_blog' function prior WordPress 5.1.0
    2442                         'WPLANG' => 'en_US', // WPLANG is another default meta in `wpmu_create_blog` function prior WordPress 5.1.0.
     2441                        'public' => 0, // `public` is one of the default metas in `wpmu_create_blog()' function prior to WordPress 5.1.0.
     2442                        'WPLANG' => 'en_US', // WPLANG is another default meta in `wpmu_create_blog()` function prior to WordPress 5.1.0.
    24432443                    ),
    24442444                ),
Note: See TracChangeset for help on using the changeset viewer.