| @@ -278,8 +278,11 @@ | ||
| 278 | 278 | return $cache[ $locale ]; |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | if ( ! is_textdomain_loaded( 'booktics' ) ) { |
| 282 | + // Registers the plugin's own /languages path. Just-in-time loading only | |
| 283 | + // finds WP.org language packs, so without this a bundled .mo is ignored. | |
| 284 | + // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound | |
| 282 | 285 | load_plugin_textdomain( 'booktics', false, dirname( plugin_basename( BOOKTICS_FILE ) ) . '/languages' ); |
| 283 | 286 | } |
| 284 | 287 | |
| 285 | 288 | $translations = get_translations_for_domain( 'booktics' ); |