Skip to content

Commit

Permalink
Merge branch 'trunk' of git://core.git.wordpress.org into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
gilzow committed Jan 21, 2025
2 parents 62b38e8 + 51c5e1e commit 1c30251
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59669';
$wp_version = '6.8-alpha-59670';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down
26 changes: 13 additions & 13 deletions wp-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,17 @@
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
wp_register_plugin_realpath( $plugin );

$plugin_data = get_plugin_data( $plugin, false, false );

$textdomain = $plugin_data['TextDomain'];
if ( $textdomain ) {
if ( $plugin_data['DomainPath'] ) {
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] );
} else {
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) );
}
}

$_wp_plugin_file = $plugin;
include_once $plugin;
$plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
Expand All @@ -537,17 +548,6 @@
* @param string $plugin Full path to the plugin's main file.
*/
do_action( 'plugin_loaded', $plugin );

$plugin_data = get_plugin_data( $plugin, false, false );

$textdomain = $plugin_data['TextDomain'];
if ( $textdomain ) {
if ( $plugin_data['DomainPath'] ) {
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] );
} else {
$GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) );
}
}
}
unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain );

Expand Down Expand Up @@ -684,11 +684,11 @@
foreach ( wp_get_active_and_valid_themes() as $theme ) {
$wp_theme = wp_get_theme( basename( $theme ) );

$wp_theme->load_textdomain();

if ( file_exists( $theme . '/functions.php' ) ) {
include $theme . '/functions.php';
}

$wp_theme->load_textdomain();
}
unset( $theme, $wp_theme );

Expand Down

0 comments on commit 1c30251

Please sign in to comment.