• When this plugin is active and the advanced mode is enabled, I get an error message on the widgets page that is :

    Notice: wp_enqueue_script() was called?incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).

    In the file functions/enqueue.php around line 62 I have changed the function from:

    function bodhi_svgs_block_editor() {

        if ( bodhi_svgs_advanced_mode() ) {

            wp_enqueue_script(‘bodhi-svgs-gutenberg-filters’, BODHI_SVGS_PLUGIN_URL . ‘/js/gutenberg-filters.js’, [‘wp-edit-post’]);

        }

    }

    To:

    function bodhi_svgs_block_editor() {

        global $pagenow;

        if ( bodhi_svgs_advanced_mode() && $pagenow !== ‘widgets.php’) {

            wp_enqueue_script(‘bodhi-svgs-gutenberg-filters’, BODHI_SVGS_PLUGIN_URL . ‘/js/gutenberg-filters.js’, [‘wp-edit-post’]);

        }

    }

    And this removes the error message.

  • The topic ‘Notice: wp_enqueue_script() was called incorrectly.’ is closed to new replies.