[theme-reviewers] Shortcodes

Bruce Wampler weavertheme at gmail.com
Sat Feb 18 17:56:09 UTC 2012


In reply to Otto's comments about oEmbed:

Perhaps one could come close to getting auto-adjusting media widths with
that tool, but it is still static adjusting. If you shrink a standard
browser view, I don't think the video window will shrink responsively. It
would seem that the $content-width will not dynamically change with a
shrinking window. On the other hand, my theme based YouTube shortcode will,
as well as providing other specific YouTube control parameters.

And isn't there only one instance of $content-width? What about a situation
where the user wants a video in both the content area and a sidebar or
header or where ever? Will the oEmbed still work? My theme based version
does because it knows exactly which <div> the shortcode is being used from
theme based knowledge.

While in theory this specific example might possibly have theme independent
implementations, I still believe the example supports my point that there
are some shortcodes that can really benefit from a theme's specific
"knowledge", and thus are appropriate tools to provide with the theme.

Bruce Wampler

> So here, you're mistaken. You don't necessarily need to have a special
> shortcode for handling youtube videos, or any other videos that are
> supported by oEmbed. All you have to do is adjust your $content_width
> to one that is appropriate for the device. Then the built in embed
> mechanisms will handle it just fine.
>
> -Otto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120218/f3fafaa5/attachment.htm>


More information about the theme-reviewers mailing list