Enqueuing Admin Scripts
-
Please change this from:
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
To this:
add_action('enqueue_block_editor_assets', array($this, 'admin_enqueue_scripts'));
This way the admin scripts are only enqueued on the Editor pages. This needs done because it throws JS errors on other pages.
Thanks!!!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Enqueuing Admin Scripts’ is closed to new replies.