- This topic has 1 reply, 2 voices, and was last updated 3 years, 10 months ago by .
The topic ‘WP_Scripts::localize was called incorrectly’ is closed to new replies.
Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST
Be sure we're doing our best to manage your topic as soon as possible.
Find Answers and Get Support › Forums › Gorgo – Multi-Purpose Gutenberg Blog & Magazine Theme › Website Setup › Pages › WP_Scripts::localize was called incorrectly
Hello, why am I seeing this warning?
WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead…public_html/wp-includes/functions.php on line 5313
How can i fix it?
Hi Mohammad,
Thank you for reaching out! We’re sorry for the late answer. We’re experiencing a much larger number of requests than usual.
No worries. These are PHP warnings, not errors. Unlike errors, warnings won’t break your website. They’re just messages aimed at developers to improve their code.
My best guess is that this issue is related with your php version. Please check the WordPress prerequisites here:
WordPress requirements
For more about this, please click on the following link:
Getting notice is wordpress “WP_Scripts::localize was called incorrectly”
To hide this message, I suggest that you activate error logging on your website. Please keep WP_DEBUG to true and just paste the following code lines in your wp-config.php file, just before the line that says ‘That’s all, stop editing! Happy blogging.’:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
More on this in the following topic: Debugging in WordPress
You will still be able to consult the warnings and errors triggered by your website but these won’t appear on your pages anymore.
Regards,
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘WP_Scripts::localize was called incorrectly’ is closed to new replies.
You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.
Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️
Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.
To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.
Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.