Skip to content

Commit

Permalink
Fix loading of localized labels with WordPress 6.7.0 (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
albig authored Nov 13, 2024
1 parent c33cd17 commit d154c27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion functions/s.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ function sunflower_setup() {
* If you're building a theme based on sunflower, use a find and replace
* to change 'sunflower' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'sunflower', get_template_directory() . '/languages' );
// Hack for WordPress 6.7.0.
if ( version_compare( $GLOBALS['wp_version'], '6.7', '<' ) ) {
load_theme_textdomain( 'sunflower', get_template_directory() . '/languages' );
} else {
load_textdomain( 'sunflower', 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

0 comments on commit d154c27

Please sign in to comment.