Bring back the media width setting for oEmbed!
I used to be able to set width and height for oEmbed media under Settings>Media. I only ever set the width to the same as the content width of my sites/blogs. That way it easily inserted YouTube videos with nothing more than the plain URL. It was perfect. Then this feature was removed. Now YouTube vidoes and other oEmbed content defaults to something narrower than the width of the content section of my sites an blogs. So I'm forced to use a shortcode, making this solution a lot more manual and less-simple than it was intended to be.
If you want to set it to a default width, you would either edit your theme's function file, or make an MU plugin with this:
if ( ! isset( $content_width ) ) $content_width = 600;
Where 600 is the width you want.
Hmmm.... so if it's so simple, why not just set it to 100%??? or even 95%? If it were set that way by default in WP, it would "just work" in most themes, including responsive themes. And it woul look much nicer than the current which defaults to 600px wide, which is much narrower than the content area of most of today's themes (most older themes too).
Because not all of the oEmbed providers look okay at 100%?
The goal was to make this a part of themes so they would determine what looks 'best' instead of arbitrarily letting users (who for the most part don't know any better) set things differently.
But wouldn't that be true of any generic setting for all oEmbed providers? I mean if the width of my content area is 800px and I use your code to set it to that, aren't some providers (eg. Twitter) going to look bad at that width? I mean what you're saying makes sense, but it almost seems like WP needs to provide code to theme devs and say "include this in your themes or else!" Then have that include code to set the size for the various oEmbed providers, or at least some generic ones. Eg. one setting for all video providers, another for Twitter and similar, etc.
Unfortunately some of the very best theme developers out there are not including this. Thus the removal of the setting appears to be a huge failure on WP's part. Anytime you remove a feature and push responsibility for it to somebody else, you've gotta make sure that somebody else is on-board, and will do it, or instead of an improvement, it's a big step back.
I still think it would be nice if they revived at least the width, as long as theme devs (including many premium ones) are not including this.
it almost seems like WP needs to provide code to theme devs and say "include this in your themes or else!"
They are :)
Just keep in mind, WordPress can only enforce the guidelines for what's hosted here on WordPress.org
RSS feed for this topic
You must log in to post.