Created
December 27, 2014 10:15
-
-
Save palpalani/e79c4332a1df2994d51d to your computer and use it in GitHub Desktop.
WordPress - Change default sizes for embedded 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 | |
//Adjust default sizes for embedded content | |
function wps_embed_size($embed_size){ | |
if(is_single()){ | |
$embed_size['height'] = 240; | |
$embed_size['width'] = 380; | |
} | |
return $embed_size; | |
} | |
add_filter('embed_defaults', 'wps_embed_size'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment