[wp-trac] [WordPress Trac] #21719: Remove autoembed_urls, embed_size_w, embed_size_h
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 29 08:28:49 UTC 2012
#21719: Remove autoembed_urls, embed_size_w, embed_size_h
-------------------------+-----------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: Embeds | Version: 2.9
Severity: normal | Keywords:
-------------------------+-----------------
Per [https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
ui&day=2012-08-28&sort=asc#m54485 UI discussion] on Tuesday, the oEmbed
settings should all disappear:
* autoembed_urls, the on-off checkbox, goes way, and oEmbed is always
assumed to be on. The only reason to have a UI on/off for oEmbed is if it
was easy to accidentally embed items. But it doesn't parse every link in
the post, just those on their own line or inside an [embed] code.
`add_filter( 'default_option_autoembed_urls', '__return_true' );` could
handle anyone trying to fetch autoembed_urls in a plugin to try to follow
core.
* Width is now determined solely by $content_width, and otherwise is
assumed to be 500. See wp_embed_defaults(), where there is already a
filter.
* Height is assumed to be something, though not sure what yet. Not sure
what yet. wp_embed_defaults() thinks it should be 700, while
populate_options() thinks it should be 600. I'm thinking we do something
more like `min( $content_width * x, y )`, where x is somewhere between 2
and 3, and y is north of 600, probably 1000.
A few reminders for height and width. One, these are defaults only: the
[embed] shortcode accepts 'height' and 'width' manually. Two, while the
provider is "required" to follow the spec, it is based on trust. I brought
up Storify as a good example of an oEmbed endpoint (which, hey, they don't
actually have) that should deliberately ignore maxheight, because of how
it works.
Clearly, height is not a slam-dunk, but we should remove it anyway. Why?
Because you likely got confused when trying to understand the inheritance
and manual overrides I outlined above (I did). Now imagine a user trying
to understand "Maximum embed size" and "If the width value is left blank,
embeds will default to the max width of your theme." They're edge enough
to be best served under the hood.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21719>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list