Skip to content

Commit

Permalink
Hook into wpml_st_translation_file_updated
Browse files Browse the repository at this point in the history
Fixes #124
  • Loading branch information
swissspidy committed Dec 16, 2023
1 parent c477947 commit ea32ceb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/class-performant-translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static function init() {

// Plugin integrations.
add_action( 'loco_file_written', array( __CLASS__, 'regenerate_translation_file' ) );
add_action( 'wpml_st_translation_file_updated', array( __CLASS__, 'regenerate_translation_file' ) );
}

/**
Expand Down Expand Up @@ -384,6 +385,9 @@ public static function add_generator_tag() {
/**
* Regenerates a PHP translation file from a given MO file.
*
* Useful for plugins such as Loco Translate or WPML which generate custom MO files.
* Prevents stale PHP files in those cases.
*
* This compatibility code is added out of courtesy and is not intended
* to be merged into WordPress core.
*
Expand Down

0 comments on commit ea32ceb

Please sign in to comment.