Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: getting translations to load again #2411

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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