We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Podcast Block in Jetpack is always loading the following stylesheets even if there is no Podcast block present or if it's being used.
http://localhost/wp-includes/js/mediaelement/wp-mediaelement.min.css?ver=5.8 http://localhost/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css?ver=4.2.16
If I'm not using the Podcast block, I don't need these styles being loaded.
They loaded.
Screenshots
What's happening is that here we're declaring the style for the block:
jetpack/projects/plugins/jetpack/extensions/blocks/podcast-player/podcast-player.php
Line 54 in cf8864a
This passes through wp_enqueue_registered_block_scripts_and_styles here which actually does a wp_enqueue_style for the styles passed, regardless if the block is being used or not: https://github.com/WordPress/WordPress/blob/60c39d780530ac8e8c29d3619e0fbc4a88ee9eb6/wp-includes/script-loader.php#L2398
wp_enqueue_registered_block_scripts_and_styles
wp_enqueue_style
The text was updated successfully, but these errors were encountered:
Site Editor Compatibility: register wp-mediaelement styles for Podcas…
cf8864a
…t Player (#20193)
This is also noted in this forums post with the user looking for a fix or how to prevent these from loading.
Sorry, something went wrong.
This seems to be fixed now. Closing.
No branches or pull requests
The Podcast Block in Jetpack is always loading the following stylesheets even if there is no Podcast block present or if it's being used.
Steps to reproduce the issue
What I expected
If I'm not using the Podcast block, I don't need these styles being loaded.
What happened instead
They loaded.
Screenshots
![Screen Shot on 2021-07-22 at 14:56:29](https://user-images.githubusercontent.com/3220162/126714557-d3c9aba1-12ee-438f-988a-4374d45104ea.png)
What is happening
What's happening is that here we're declaring the style for the block:
jetpack/projects/plugins/jetpack/extensions/blocks/podcast-player/podcast-player.php
Line 54 in cf8864a
This passes through
wp_enqueue_registered_block_scripts_and_styles
here which actually does awp_enqueue_style
for the styles passed, regardless if the block is being used or not:https://github.com/WordPress/WordPress/blob/60c39d780530ac8e8c29d3619e0fbc4a88ee9eb6/wp-includes/script-loader.php#L2398
The text was updated successfully, but these errors were encountered: