Title: PHP warning: Function called incorrectly
Last modified: March 23, 2025

---

# PHP warning: Function called incorrectly

 *  [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/)
 * We’re getting a PHP warning that the function ‘_load_textdomain_just_in_time()’
   is being called incorrectly by this plugin, caught by the Query Monitor plugin:
 *     ```wp-block-code
       Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the responsive-lightbox 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. (This message was added in version 6.7.0.)_load_textdomain_just_in_time()Plugin: responsive-lightbox
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/#post-18418117)
 * Can I get a response on this from the plugin authors? It’s an issue that really
   should be addressed. Thank you.
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/#post-18418144)
 * Okay, I saw another post on this, and they suggested a fix that works. Other 
   plugins are suddenly having the same issue (ninja-forms, tweet-old-post), I suppose
   it has something to do with a recent WP update.
 * The line to fix is in the `responsive-lightbox.php` file, line 365. Replace:
 * `add_action( 'plugins_loaded', [ $this, 'plugins_loaded_init' ] );`
 * with:
 * `add_action( 'init', [ $this, 'plugins_loaded_init' ], 5 );`
 * I am leaving this unresolved, as the plugin authors have not announced they have
   fixed it yet.
 *  [slewisma](https://wordpress.org/support/users/slewisma/)
 * (@slewisma)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/#post-18418437)
 * Every other plugin maker of plugins I use on client sites that had this issue
   fixed it months ago. It’d be really nice to have it officially fixed in the repository
   version Responsive Lightbox soon.
 *  [Josh Journey](https://wordpress.org/support/users/ljosh/)
 * (@ljosh)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/#post-18424977)
 * There is hope:
   [https://wordpress.org/support/topic/function-_load_textdomain_just_in_time-was-called-incorrectly-100/#post-18419426](https://wordpress.org/support/topic/function-_load_textdomain_just_in_time-was-called-incorrectly-100/#post-18419426)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP warning: Function called incorrectly’ is closed to new replies.

 * ![](https://ps.w.org/responsive-lightbox/assets/icon-256x256.png?rev=3460874)
 * [Responsive Lightbox & Gallery](https://wordpress.org/plugins/responsive-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-lightbox/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 4 replies
 * 3 participants
 * Last reply from: [Josh Journey](https://wordpress.org/support/users/ljosh/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/php-warning-function-called-incorrectly/#post-18424977)
 * Status: not resolved