[theme-reviewers] Shortcodes

Otto otto at ottodestruct.com
Sun Feb 19 16:10:41 UTC 2012

On Sun, Feb 19, 2012 at 9:45 AM, Bruce Wampler <weavertheme at gmail.com> wrote:
> I take this for agreement that using per page view for $content-width will
> only work for one area of the page (the content). Well -

Umm.. Yes, the $content_width specifies the width of the content.
That's sorta the whole point of it. I don't understand what it is that
you think you're proving with this statement, but I think this
reasonably falls under the "fucking-duh" category.

> 1. I personally believe that one goal of WordPress and a given theme is to
> make life easier for the site builder. Why should a user have to figure out
> what that width is - ever?

They don't. The theme developer does.

> From a theme user's viewpoint, a shortcode should
> do all that automatically: in the content area, in a header, in a sidebar, a
> single column of a multi-column content area layout - maybe all on the same
> page.

Shortcodes don't work in headers, sidebars, or anywhere but in the
content. That's not what shortcodes do.

> 2. I can give an example of a common, everyday situation where forcing the
> user to provide a width for the video in a sidebar or other non-content area
> simply will not work correctly - an iPad.

Having the user provide the width isn't what I suggested or said. I
said it was possible for the embed shortcode to define the width
manually. It's equally possible for code using the  embed system to
provide the width itself as well. If the sidebar had a video in it and
you use the built in embed system to process it, then the theme can
override the width manually to fit whatever space it's in. This
doesn't require the user to specify a thing, it requires the theme to
be smarter about it than most are.

Most importantly, it does not require the theme to use theme-specific
shortcodes or widgets or anything else. What it does require the theme
to do is to adapt pre-existing functionality in the core to meet the
needs of the theme.

Which is kind of my whole point. Why reinvent the wheel? We have a
shortcode for embedding videos. We have a large set of library code
for embedding videos. It works wonderfully. It's easy to adapt, to
change, to modify, to filter. You don't need special theme shortcodes
to do videos, videos are built in and easily adjustable by themes to
fit the theme automatically and "magically".

> And theme lock-in doesn't stop at shortcodes. What about theme specific
> widgets, or even widget areas?

Widget areas are indeed theme specific. That one is obvious.

Widgets themselves shouldn't be. Most themes include them though, in
some fashion, although they tend to be minor widgets. The Ephemera
widget in twenty eleven, for example.

> Really, any feature of any theme that provides
> something beyond basic styling would tend to lock one into that theme.

Right. Which is why those features should be moved out of themes and
into plugins.

> I'm really just trying to make a case that there should be minimal WP theme
> restrictions on features provided by a theme.

You seem to be doing the opposite. Your arguments are basically saying
that themes do too much.


More information about the theme-reviewers mailing list