Skip to content

Fix translations loading timing#71

Open
KristoferN wants to merge 1 commit intolesterchan:masterfrom
KristoferN:master
Open

Fix translations loading timing#71
KristoferN wants to merge 1 commit intolesterchan:masterfrom
KristoferN:master

Conversation

@KristoferN
Copy link

Pull request summary

This pull request fixes the timing error of loading text domains in the main file of the plugin by wrapping it in an init action, postponing the execution of the translations of the options.

Error:

Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the 
wp-pagenavi domain was triggered too early. This is usually an indicator for some code in 
the plugin or theme running too early. Translations should be loaded at the init action or 
later.

Fix in wp-pagenavi.php:

add_action('init', function() {
    scb_init( '_pagenavi_init' );
});

Changelog

  • FIXED: Translations now runs at the proper timing, not causing triggered too early notices.

@lesterchan
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants