Skip to content

Commit

Permalink
fix: getting translations to load again (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford authored Nov 19, 2024
1 parent 8157d9b commit 110b039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion newspack-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
return;
}


if ( ! function_exists( 'newspack_is_amp' ) ) {
/**
* Determine whether it is an AMP response.
Expand All @@ -41,7 +42,11 @@ function newspack_setup() {
* If you're building a theme based on Newspack Theme, use a find and replace
* to change 'newspack' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'newspack', get_template_directory() . '/languages' );
if ( version_compare( $GLOBALS['wp_version'], '6.7', '<' ) ) {
load_theme_textdomain( 'newspack', get_template_directory() . '/languages' );
} else {
load_textdomain( 'newspack', get_template_directory() . '/languages/' . determine_locale() . '.mo' );
}

// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
Expand Down
2 changes: 1 addition & 1 deletion newspack-theme/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Tested up to: 6.7
Version: 2.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspack-theme
Text Domain: newspack
Tags: Newspack
This theme, like WordPress, is licensed under the GPL.
Expand Down

0 comments on commit 110b039

Please sign in to comment.