Dashboard Widget JS Dependency Issue
-
Hello there, TinyPNG folks,
The dashboard widget was not working correctly for me. Was receiving the following JS error…
ReferenceError: tinyCompress is not definedOn the WordPress Dashboard, dashboard-widget.js was being loaded before the output of wp_localize_script(), thus the undefined variable. If you add the admin.js as a dependency, thus the localization output, the error is corrected:
File: /tiny-compress-images/src/class-tiny-plugin.php
Line: 460array(self::NAME . '_admin'), self::version(), trueCheers.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Dashboard Widget JS Dependency Issue’ is closed to new replies.