Disable shortcode modules
-
So, in the latest Jetpack versions it’s not possible to disable Responsive Embeds or Shortcodes modules from the admin.
Thus Jetpack will always override embed markup in your posts. People activate Jetpack and they no longer get responsive videos. Because Jetpacks overrides the HTML and adds a wrapper .embed-youtube for example. However Jetpack people obviously forgot to enqueue the responsive CSS for the class. So there’s just a wrapper around the iframes and no styles. Okay.
So, we decide to disable all shortcodes added (automatically!) by Jetpack, like this:
`
// Remove all Jetpack shortcodes
function prefix_jetpack_remove_your_shortcodes( $shortcodes ) {
$shortcodes = array();
return $shortcodes;
}
add_filter( ‘jetpack_shortcodes_to_include’, ‘prefix_jetpack_remove_your_shortcodes’ );
`
This filter won’t work from a theme.
Could you please advise, how we can disable Jetpack “responsive” (yeah, without styles) embeds from a theme?
- The topic ‘Disable shortcode modules’ is closed to new replies.