Anders Norén

The Big Theme Update of 2017

Over the course of the past two-three weeks, I’ve submitted substantial updates to all of my themes on WordPress.org.

This year, I’ve been getting an increasing amount of emails asking about the state of support for my older themes. Some want to know whether they are still safe to use. Others want to know whether there will be support for upcoming functionality, like Gutenberg. Some have seen the lack of updates as an indication that I might be willing to sell the WordPress.org ownership of them, and asked whether they have a pricetag. (The answer to the last one is no, by the way. Always will be.)

The questions are understandable. Most of my themes were first submitted to WordPress.org in the summer of 2014, and a lot of them haven’t been updated since early last year. I’ve still submitted new themes every now and then, but as time has gone on, my older themes have been allowed to languish. It’s been giving me a bad conscience every time I submit a new theme, knowing that I should probably use that time to go back and update my old themes instead. So a couple of weeks ago, I decided to do just that.

During the months of November and December, all of my themes on WordPress.org have been updated. These are not token updates meant only to push the ”Last Updated” dates on the WordPress.org to a more recent date, either. A lot of my themes contained code that was written close to five years ago, and the age was clearly visible to anyone willing to take a peek under the hood. I decided to take this opportunity to do a thorough code review of all of my themes, meaning pretty much every template file in every theme has been modified. Among the many changes:

  • Code formatting and readability has been improved and unified.
  • Comment structure has been improved.
  • Queries have been simplified and optimised.
  • Any pesky leftover notices have been fixed.
  • All functions in functions.php have been updated to be pluggable.

Since a lot of WordPress users have added their own CSS targeting elements in my themes, and created their own child themes that build on top of them, I’ve tried to avoid introducing any changes that break styling or functionality on sites already running my themes. Judging from the lack of complaints on the WordPress.org support forums, I’ve been mostly successful. The ”mostly” part of that sentence is why I owe a special apology to people running child themes on top of Baskerville. Lesson learned: mistakes made in enqueuing structures three years ago are better left alone.

You can find a changelog for each updated theme below. If you want to know exactly what changed and in which files, you can search for the theme names on the WordPress Themes Trac. If something seems broken or just plain bad in the updates, please describe the issue in the WordPress support forum for that individual theme. I get a notification as soon as something is posted in any of the support forums for my themes, and other users of the theme can see that the issue has already been reported. I’ll be extra attentive to those notifications this upcoming week, in case any issues surface after the updates.

It’s been a time consuming process, but I’m very glad that I did it. I can now go back to creating new themes with a clean conscience.

Baskerville

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Removed the old video widget included in the theme, as there’s one in core now
  • Added a demo link to the stylesheet theme description
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Updated enqueue scripts dependency structure
  • Combined all body_class functions into one
  • Added missing function prefixes
  • Made text string translateable
  • Fixed for get_author_meta( 'description' ) now including a paragraph element
  • Updated contributors template to hide email for users that have showemail != true
  • Removed duplicate get_header() in template-fullwidth.php
  • Made all functions in functions.php pluggable

Davis

  • Wrapped the site description output in the header in a conditional
  • Added a demo link to the theme description
  • Code review with formatting improvements and updates for readability
  • Switched from wp_print_styles to wp_enqueue_scripts to enqueue scripts and styles

Fukasawa

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Removed specific post types for add_theme_support( 'post-thumbnails' );
  • Added a deliberate dependency order to the stylesheet enqueueing
  • Same for scripts enqueues
  • Made all functions in functions.php pluggable
  • Replaced a new WP_Query in widgets/recent-posts.php with a get_posts()
  • Fixed genericons path
  • Made a text string in single.php translateable
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Restructured query on the archive page template

Garfunkel

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Removed specific post types for add_theme_support( 'post-thumbnails' );
  • Added a deliberate dependency order to the stylesheet enqueueing
  • Made all functions in functions.php pluggable
  • Replaced a query_posts() in widgets/recent-posts.php with a get_posts()
  • Fixed notices when adding values to dribble-widget.php for the first time
  • Same for scripts enqueues
  • Fixed genericons path
  • Simplified author role output in single.php and made it support other roles than the default WP ones
  • Fixed notice in comments.php
  • Fixed notice in single.php
  • Improved output of author recent comments in the single.php post meta section
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Added word-break to titles on the archive template
  • Restructured query on the archive page template
  • Updated author description on single to work with new wrapping paragraph, added in 4.9

Hamilton

  • Added a flex based CSS fix for a site header layout issue occurring when using the alt navigation in combination with a really big header logo
  • Set the featured image wrapper to position: relative, so it’s displayed over the post header during the scroll transition
  • Switched from wp_print_styles to wp_enqueue_scripts to enqueue scripts and styles
  • Made functions.php functions pluggable

Hemingway

  • Updated to the new readme.txt structure, with changelog included in readme
  • Added demo URL to the stylesheet theme description
  • Removed the video widget, as WordPress core now provides its own
  • Updated comment header structure in functions.php
  • Fixed stylesheet not being included when Hemingway is used as a parent theme
  • Removed comment-reply.js output in header.php (already enqueued in functions)
  • General cleanup and code readability improvements
  • Replaced the_title() with the_title_attribute(), when used for title attributes in link elements
  • Fixed transition on has-children indicator in the main menu
  • Fixed notice in comments.php
  • Cleaned up a bit in archive.php
  • Removed conditionals around the_content() output in single.php, as the conditional was interfering with plugins using the_content() to output stuff
  • The pluggable update: made all functions in functions.php pluggable

Hitchcock

  • Updated readme.txt to follow new guidelines, and incorporated the old changelog.txt into it
  • Fixed a notice in the comments section of the theme
  • Added a link to the demo site in the style.css theme description
  • Fixed an issue where the theme checker mistook the numerical value supplied to _n() (as a named variable) for a text domain
  • Updated comments structure in functions.php
  • Updated functions to be pluggable
  • General code cleanup and readability improvements
  • Updated closing element comments
  • Restructured the related posts function to be more lean
  • Fixed hover effect on related items on single

Hoffman

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • Improved author role output in single.php
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Added word-break to titles on the archive template
  • Restructured query on the archive page template
  • Fixed text domain issue
  • Updated author description on single to work with new wrapping paragraph, added in 4.9

Iwata

  • Updated to the new readme.txt format, with changelog.txt incorporated into readme.txt
  • Added demo link to the theme description in style.css
  • Set the body elements in the theme to antialiased webkit font smoothing
  • Improved the comment structure in functions.php
  • Fixed closing element comments to appear next to the element in browser inspectors
  • Updated title text on the 404 page
  • Removed unneccessary rewind_posts() call in archive.php
  • Fixed notices in comments.php
  • General code cleanup to improve readability
  • Updated comments structure in functions.php
  • Updated functions to be pluggable
  • General code cleanup and readability improvements
  • Updated closing element comments
  • Fixed spelling error on 404.php

Lingonberry

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Removed the old video widget included in the theme, as there’s one in core now
  • Added a demo link to the stylesheet theme description
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Removed conditionals around the_content() output, as the conditional was interfering with plugins using the_content() to output stuff
  • The pluggable update: Made all functions in functions.php pluggable

Lovecraft

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Added a deliberate dependency order to the stylesheet enqueueing
  • Same for scripts enqueues
  • Made all functions in functions.php pluggable
  • Replaced a new WP_Query in widgets/recent-posts.php with a get_posts()
  • Fixed genericons path
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Fixed potential overflow issue on mobile for the blog title and logo

McLuhan (still in review)

  • Switched from wp_print_styles to wp_enqueue_scripts to enqueue scripts and styles

Radcliffe

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Removed duplicate comment-reply enqueueing from the header (already in functions)
  • SEO improvements (title structure, mostly)
  • Better handling of edge cases (missing title, missing content)
  • Added word-break to titles on the archive template
  • Restructured query on the archive page template
  • Fixed the wrong variable being fed into Backstretch on single posts
  • The pluggable update: all functions in functions.php are now pluggable

Rams

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Made all of the functions in functions.php pluggable
  • Better handling of edge cases (missing title)
  • Center post thumbnail images thinner than the featured-media element

Rowling

  • Updated to the new readme.txt format, with changelog.txt incorporated into it
  • Added a demo link to the stylesheet theme description
  • Added a deliberate dependency order to the stylesheet enqueueing
  • Same for scripts enqueues
  • Made all functions in functions.php pluggable
  • Replaced a new WP_Query in widgets/recent-posts.php with a get_posts()
  • Fixed genericons path
  • Fixed notice in comments.php
  • Changed closing element comment structure
  • General code cleanup, improvements in readability
  • Fixed potential overflow issue on mobile for the blog title and logo
  • Restructured the related posts query to be more lean
  • Fixed warnings in comments.php
  • Fixed notices in comments.php
  • Made theme strings translateable in index.php and comments.php
  • Updated author description on single to work with new wrapping paragraph, added in 4.9
  • Added .post-content p.intro to the list of elements targeted by the Customizer accent color setting

Wilson

  • Updated to new readme.txt format, with changelog included in it
  • Removed the theme video widget, as it has been made redundant by the one included in core
  • Removed mentions of included translations in style.css theme description due to the new WordPress.org translation handling
  • Replace the_title() with the_title_attribute() where it was being used in the title attribute of links
  • Wrapped the_content() output in conditionals for empty content edge cases
  • General code cleanup and readability fixes
  • Removed unneccessary wp_reset_query() in template-archives.php
  • Fixed an issue where empty() was being used on a function in archive.php
  • Removed conditionals around the_content() output, as the conditional was interfering with plugins using the_content() to output stuff
  • The pluggable update: made all functions in functions.php pluggable