Ticket #36717: 36717.6.diff
File 36717.6.diff, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/ms-deprecated.php
506 506 $results = array(); 507 507 508 508 foreach ( $_sites as $_site ) { 509 $results[] = (array) get_site( $_site ); 509 $_site = get_site( $_site ); 510 $results[] = $_site->to_array(); 510 511 } 511 512 512 513 return $results; -
tests/phpunit/tests/multisite/wpGetSites.php
3 3 if ( is_multisite() ) : 4 4 5 5 /** 6 * @group wp-get-site 6 7 * @group ms-site 7 8 * @group multisite 8 9 */ … … 33 34 34 35 /** 35 36 * @expectedDeprecated wp_get_sites 37 */ 38 public function test_wp_get_sites_site_is_expected_array() { 39 40 $keys = array( 41 'blog_id', 42 'site_id', 43 'domain', 44 'path', 45 'registered', 46 'last_updated', 47 'public', 48 'archived', 49 'mature', 50 'spam', 51 'deleted', 52 'lang_id' 53 ); 54 $sites = wp_get_sites(); 55 56 $missing_keys = array_diff_key( array_flip( $keys ), $sites[0] ); 57 58 $this->assertEquals( array(), $missing_keys, 'Keys are missing from site arrays.' ); 59 } 60 61 /** 62 * @expectedDeprecated wp_get_sites 36 63 * @dataProvider data_wp_get_sites 37 64 * 38 65 * @param $expected