Ticket #7694: 7694.patch
| File 7694.patch, 1.7 KB (added by , 8 years ago) |
|---|
-
buddypress-functions.php
382 382 383 383 // No need to check child if template == stylesheet. 384 384 if ( is_child_theme() ) { 385 $locations['bp-child'] = array( 385 $locations[] = array( 386 'type' => 'bp-child', 386 387 'dir' => get_stylesheet_directory(), 387 388 'uri' => get_stylesheet_directory_uri(), 389 'file' => $file, 390 ); 391 392 $locations[] = array( 393 'type' => 'bp-child', 394 'dir' => get_stylesheet_directory(), 395 'uri' => get_stylesheet_directory_uri(), 388 396 'file' => str_replace( '.min', '', $file ), 389 ); 397 ); 390 398 } 391 399 392 $locations['bp-parent'] = array( 400 $locations[] = array( 401 'type' => 'bp-parent', 393 402 'dir' => get_template_directory(), 394 403 'uri' => get_template_directory_uri(), 395 404 'file' => str_replace( '.min', '', $file ), 396 405 ); 397 406 398 $locations['bp-legacy'] = array( 407 $locations[] = array( 408 'type' => 'bp-legacy', 399 409 'dir' => bp_get_theme_compat_dir(), 400 410 'uri' => bp_get_theme_compat_url(), 401 411 'file' => $file, … … 410 420 411 421 $retval = array(); 412 422 413 foreach ( $locations as $location _type => $location) {423 foreach ( $locations as $location ) { 414 424 foreach ( $subdirs as $subdir ) { 415 425 if ( file_exists( trailingslashit( $location['dir'] ) . trailingslashit( $subdir ) . $location['file'] ) ) { 416 426 $retval['location'] = trailingslashit( $location['uri'] ) . trailingslashit( $subdir ) . $location['file']; 417 $retval['handle'] = ( $script_handle ) ? $script_handle : "{$location _type}-{$type}";427 $retval['handle'] = ( $script_handle ) ? $script_handle : "{$location['type']}-{$type}"; 418 428 419 429 break 2; 420 430 }