Skip to content

Commit

Permalink
Merge pull request #58 from tollmanz/feature/wp-4.6-i18n-update
Browse files Browse the repository at this point in the history
Defer to just in time language loading for WP 4.6+.
  • Loading branch information
jrfnl committed Jun 26, 2017
2 parents 53a367b + c684c23 commit f795bda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion class-zt-debug-bar-cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ class ZT_Debug_Bar_Cron extends Debug_Bar_Panel {
* @return void
*/
public function init() {
load_plugin_textdomain( 'debug-bar-cron' );
if ( ! function_exists( '_load_textdomain_just_in_time' ) ) {
load_plugin_textdomain( 'debug-bar-cron' );
}

$this->title( __( 'Cron', 'debug-bar-cron' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ) );
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Yes

= Trunk =
* Fix compatibility with the [Plugin Dependencies](http://wordpress.org/plugins/plugin-dependencies/) plugin
* Defer to just in time loading of translations for WP > 4.5.

= 0.1.3 =

Expand Down

0 comments on commit f795bda

Please sign in to comment.