Admin Javascript Error
-
I’ve noticed that your plugin enqueues its javascript across the whole admin.
However it requires the acf scripts to run first so on many of the pages it causes an error.
Instead of enqueueing everywhere could you only enqueue with ACF
I believe you could achieve this by changing the follow
classes/main.php line 9 – 10
add_action( 'admin_footer', [ $this, 'register_assets' ], 1 ); add_action( 'admin_footer', [ $this, 'enqueue_assets' ] );
to
add_action( 'acf/enqueue_scripts', [ $this, 'register_assets' ], 1 ); add_action( 'acf/enqueue_scripts', [ $this, 'enqueue_assets' ] );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Admin Javascript Error’ is closed to new replies.