Created
November 6, 2022 15:54
-
-
Save AndreFCAmorim/aff2f8e29662526e2e7ec0500172b340 to your computer and use it in GitHub Desktop.
Set a max width for the embeds using oEmbed in the content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpcode_snippet_oembed_defaults( $sizes ) { | |
return array( | |
'width' => 400, | |
'height' => 280, | |
); | |
} | |
add_filter( 'embed_defaults', 'wpcode_snippet_oembed_defaults' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment