[theme-reviewers] Shortcodes

Otto otto at ottodestruct.com
Sat Feb 18 20:44:06 UTC 2012

On Sat, Feb 18, 2012 at 11:56 AM, Bruce Wampler <weavertheme at gmail.com> wrote:
> 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.

This is correct, it's not using javascript to change sizes on the fly.
However, for "responsive", a static view fits 99% of the cases. The
main goal of responsive-design is to have the design work on any
device, any browser. Having it dynamically change from browser
resizing is an edge case.

> 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?

oEmbed doesn't work anywhere but in the main post, like all shortcodes
do. If you are using special code to process shortcodes, then one can
specify the width manually in an [embed] shortcode. [embed

That said, oembed is very much hookable with actions and filters, and
it's easily possible for a theme to use the built in shortcodes in
compatible ways and then adjust the implementation to fit the details.
In other words, why do you have to use a theme-specific shortcode? Why
not override the existing embed shortcode for your specific cases and
adjustments? Then somebody migrating to your theme from another and
who already has lots of [embed]s will gain the benefits too.

> 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.

While this may be true, I still maintain that such implementations are
bad for the user, due to the problem of vendor-lock-in. It would be
better to separate those out into plugins to the extent possible. Any
theme-specific implementation details could then be handled by the
theme, particularly if the plugins had filters and action hooks in
them which the theme could use to provide special knowledge to the


More information about the theme-reviewers mailing list