Recently installed localize on our website and spotted that the javascript is running as an expanded file and has a large impact on speed ratings.
Would be great if you can minify – plugins/localizejs/localizejs.js and review the speed impact on page speed on websites.
We are getting this error on our site that has been tracked down to this plugin:
Notice: 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.
]]>This plugin doesn’t work for sub-directory based multisites. Are there any plans to support it?
]]>The following anchor tags get output incorrectly when using the sub-directory option.
<a href="#anchor-link">Test</a>
results in <a href="/">Test</a>
This plugin causes errors if WP_DEBUG
or WP_DEBUG_LOG
is added in wp-config.php
(which is where these sort of constants should be defined, only when needed).
Lines 32-33 in localizejs.php
should be removed, or at least replaced with something like:
if ( ! defined('WP_DEBUG' ) ) {
define( 'WP_DEBUG', true );
}
if ( ! defined('WP_DEBUG_LOG' ) ) {
define( 'WP_DEBUG_LOG', true );
}
Although, personally I don’t think any plugin should be forcing WP_DEBUG
to be enabled.
Hi there,
This plugin does very little and I was wondering if you have any plan to add new functionalities. Localize.js is awesome and I’m sure there is a huge potential for it in the WordPress community but right now the integration is too simple.
If not, I will think about developing my own solution.
Peace.
]]>