Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update enqueue for block JS #96

Open
maxinacube opened this issue Jan 23, 2024 · 1 comment
Open

Update enqueue for block JS #96

maxinacube opened this issue Jan 23, 2024 · 1 comment

Comments

@maxinacube
Copy link
Contributor

Update enqueue of post-type-spotlight-block-editor in class-post-type-spotlight-block-editor.php to use https://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/

@maxinacube
Copy link
Contributor Author

@aaronware Can you review these updates?

I updated the init hook to enqueue_block_editor_assets. With that, I also removed the logic within the hooked function (block_scripts) to check for admin and post type. The block editor does not have context to the $_POST and these checks were preventing scripts from loading anywhere.

I noticed console errors for the admin CSS, but the file does not exist within the last few releases. I downloaded an older version and see the admin style we did introduce were very minimal and not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant