• Ver. 1.4.12

    The Customizer in Dashboard triggers Notices (written to error_log if 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 function flash_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 to wp_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

    • This topic was modified 1 day, 19 hours ago by kitchin.

You must be logged in to reply to this topic.