Customizer WP_DEBUG notices (script loading)
-
Ver. 1.4.12
The Customizer in Dashboard triggers Notices (written to
error_logif enabled):PHP Notice: Function WP_Scripts::add was called incorrectly. The script with the handle "flash-color-scheme-control" was enqueued with dependencies that are not registered: iris.The problem is in
flash/inc/customizer.php. The functionflash_customize_preview_scripts()handles two hooks:
‘customize_controls_enqueue_scripts’
‘customize_preview_init’It should be split into two functions.
The first hook runs with
is_admin() = true, and the dependency “iris”, a core script, is available towp_enqueue_script().The second hook runs with
is_admin() = false, because it is simulating a front end render. The dependency “iris” is not loaded, because it’s admin only.Here is a fix, probably right: https://gist.github.com/kitchin/17948e5fb30aee118018d73f2d132d27
You must be logged in to reply to this topic.
