Changeset 59670
- Timestamp:
- 01/21/2025 11:42:19 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-settings.php
r59488 r59670 526 526 wp_register_plugin_realpath( $plugin ); 527 527 528 $plugin_data = get_plugin_data( $plugin, false, false ); 529 530 $textdomain = $plugin_data['TextDomain']; 531 if ( $textdomain ) { 532 if ( $plugin_data['DomainPath'] ) { 533 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] ); 534 } else { 535 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) ); 536 } 537 } 538 528 539 $_wp_plugin_file = $plugin; 529 540 include_once $plugin; … … 538 549 */ 539 550 do_action( 'plugin_loaded', $plugin ); 540 541 $plugin_data = get_plugin_data( $plugin, false, false );542 543 $textdomain = $plugin_data['TextDomain'];544 if ( $textdomain ) {545 if ( $plugin_data['DomainPath'] ) {546 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] );547 } else {548 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) );549 }550 }551 551 } 552 552 unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain ); … … 685 685 $wp_theme = wp_get_theme( basename( $theme ) ); 686 686 687 $wp_theme->load_textdomain(); 688 687 689 if ( file_exists( $theme . '/functions.php' ) ) { 688 690 include $theme . '/functions.php'; 689 691 } 690 691 $wp_theme->load_textdomain();692 692 } 693 693 unset( $theme, $wp_theme );
Note: See TracChangeset
for help on using the changeset viewer.