Ticket #37215: get_sites_by_path_patch.diff
File get_sites_by_path_patch.diff, 830 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/ms-load.php
239 239 'number' => 1, 240 240 ); 241 241 242 if ( count( $domains ) > 1 && count( $paths ) > 1 ) { 243 $args['orderby'] = 'domain_length path_length'; 244 $args['order'] = 'DESC DESC'; 245 } elseif ( count( $domains ) > 1 ) { 246 $args['orderby'] = 'domain_length'; 247 $args['order'] = 'DESC'; 248 } elseif ( count( $paths ) > 1 ) { 249 $args['orderby'] = 'path_length'; 250 $args['order'] = 'DESC'; 242 if ( count( $domains ) > 1 ) { 243 $args['orderby']['domain_length'] = 'DESC'; 251 244 } 252 245 246 if ( count( $paths ) > 1 ) { 247 $args['orderby']['path_length'] = 'DESC'; 248 } 249 253 250 $result = get_sites( $args ); 254 251 $site = array_shift( $result ); 255 252