[wp-trac] [WordPress Trac] #17748: Twenty Eleven code review & consistancy
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 10 13:04:39 UTC 2011
#17748: Twenty Eleven code review & consistancy
---------------------------+-----------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.2
Component: Bundled Theme | Version: 3.2
Severity: normal | Keywords:
---------------------------+-----------------
I've just done a review of the Twenty Eleven code looking for anything out
of place or inconsistent with other pages.
attached is a diff of problems which I'm going to walk through:
* archive.php - doesnt need to call the_post(); only uses global query
conditionals.
* author.php - comment typo
* comments.php - has to check get_option( 'page_comments' ) ? Shouldn't
that be included within get_comment_pages_count() instead to short-circuit
it?
* content-aside.php, content-link.php, content-image.php, content-
quote.php, - use get_post_type() instead of $post->post_type
* content-gallery.php - indentation (trivial I know)
* content-image.php & a few others - Doesnt use {{{<span class="sep"> |
</span>}}} between utility entries?
* content-single.php doesnt have a post = post_type conditional on date
meta like most of the rest of the content items.
* content-status.php - Dead code, and avoid using the post type itself
* content.php - Applies to most files, using 'echo=0' on a few items,
$show_sep code is rather convuluted as well, perhaps appending to an array
and imploding it would be cleaner, This style of code is used in a few
places, but not all.
* image.php - Has verbose Comments vs. Trackbacks being closed text, This
text isnt used on other pages, only mention of Trackbacks are on this
template too
* inc/theme-options.php - Use $hook_suffix within an hook name instead of
attaching to the generic action
* single.php() - Dead code
Most of this really just needs a sanity check on what is supposed to
apply, and apply it to the rest of the template files.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17748>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list