[theme-reviewers] Theme Check update
Otto
otto at ottodestruct.com
Thu Sep 11 23:22:39 UTC 2014
On Thu, Sep 11, 2014 at 5:19 PM, Justin Tadlock <justin at justintadlock.com>
wrote:
>
> 1) "The <title> tags can only contain a call to wp_title(). Use the
> wp_title filter to modify the output."
>
> This is caused by a custom function hooked to `wp_head` to output the
> `<title>` tag. This is should be easy enough to fix for theme check
> though. Here's the code that gets flagged:
>
> printf( "<title>%s</title>\n", wp_title( ':', false ) );
>
IMO, the title should look like this, in the header.php, in all themes:
<title><?php wp_title(whatever); ?></title>
I honestly can't think of any good reason to do it any other way. Certainly
other ways exist, but they're all slower, make things more difficult, and
harder for people to understand.
Why reinvent the wheel and make it octagonal?
> 2) "Sidebars need to be registered in a custom function hooked to the
> widgets_init action. See: register_sidebar()."
>
> This is caused by a wrapper function for `register_sidebar()` that handles
> HTML5 defaults instead of the old-style lists.
>
Actually, that check just sees if register_sidebar() is in the theme and if
widgets_init is not in the theme. If you are registering a sidebar, then it
should be happening in a function hooked to widgets_init, and not anywhere
else. Doesn't matter how it's handling HTML5 or what have you.
So if the theme doesn't contain "widgets_init" anywhere but still registers
sidebars, that's a legitimate issue.
-Otto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140911/26e14d37/attachment.html>
More information about the theme-reviewers
mailing list