WP-Drudge v2.5 – tons of features, fixes, and refactors

WP-Drudge version 2.5 represents the largest set of under-the-hood improvements made to the theme since it’s release over 3 years ago. The release has been delayed by about a month (everyone who purchased after May 1st, 2013 will receive the upgrade as a thanks for your patience) but the final product is the strongest I’ve ever released.

This version will be available for download this evening and all users within the upgrade range will receive an email notice with instructions.

I’ve separated the changes out below in sections to make it a little easier to consume the entire list. I’ve added more information where it makes sense but if you have any questions, please let me know in the comments below or directly via email.


These are the big feature adds and improvements to the theme that you’re likely to see.

  • Videos can now be auto-embedded – I added a field for Vimeo and YouTube videos (as well as anything else covered by WordPress’s auto-embed functionality) which will output the media directly in a Posted Link widget.
  • Added “Load more” functionality to Posted Links widgets – if this feature is turned on (new setting on the Other tab of the Options page), a link will appear at the bottom of all Posted Link widgets that loads more links right on the page.
  • Corrected the link color issues – if you saved a link with a new color, then changed the global link color, you’ll see links showing up in the old color and the new color. I built out a script to correct the existing issues and stop the problem from occurring.
  • Major refactoring project to improve security, performance, flexibility, and code quality -this was the bulk of the work for this theme. See details in the sections below for specifics.

Performance and security

  • Changing settings page capability to manage_options – this is an authorization change that should not have any specific effects except improved access control.
  • Limiting WP-Drudge page templates to 50 and mobile pages to 20 – this corrects 2 database queries that are unbounded, improving performance.

Refactoring and code improvements

  • Refactored functions.php and admin-functions.php – improved use of core hooks during startup and better organization
  • Refactored feed widget for better sanitization on save
  • Refectored ad widget to accept new widget field output
  • Refactored subscribe widget for better sanitization of urls on save, cleaner output code, escaping, default URL of linkfeed
  • Refactored and updated wp-drudge-feed.php with newest template in wp-includes, changed description and content:encoded logic – this brings the WP-Drudge feed template up to the same standards as the core version. This will correct a few issues with blurbs and images appearing incorrectly.
  • Refactored static links widget to improve input sanitization, output escaping
  • Refactored Posted Link widget for new format, better sanitization, escaping
  • Refactored Advertising module

Style changes

  • Fixed no border and double-border issue with Posted and Static Link widgets – these two widgets would double up their borders if both link border options were selected.
  • Increased fixed width to 980px – A little wider to account for typically larger screens
  • More specific CSS for body content editor removal in wp-admin
  • Removed support for < 3.4 for header and background UI
  • Improved mobile CSS
  • Added “spacious” and “tight” spacing CSS fixes
  • Adjusting admin.css for select widget fields in wp-admin
  • Core category widget styling – small improvement to the core category widget display
  • Restructuring list view for archive pages to put the thumbnail on the left
  • CSS tweaks for alignleft/right, subscribe widget imgs, fix for incorrect border handling

Bug fixes

  • Fixed the font stack function to return the original font name if no stack is found – this fixes a bug with the filter used for the font setting
  • Fixed domain name HTML appearing in image alt attribute for Posted Link widget – this created invalid HTML and possible layout issues
  • Fixed mobile redirect and prompt banner for sites that automatically redirect mobile users – a user reported issues with the mobile redirect not working in some cases and the banner that appeared everywhere
  • Fixed random ordering bug in the Static Link widgets – “Random” order was not working properly
  • Fixed bug with quick edit removing featured status
  • Removed broken blurb display option in the Google News widget – this option has been removed as it was not working properly to begin with
  • Making post title required to avoid not saving a post without a title when ‘add new’ is selected

Advanced and developer features

  • Added settings output filter to style.php, changing settings filter name
  • Created a wpdrudge_display_posted_link() function that can be overridden in a child theme or plugin
  • Adding wpdrudge_widget_output_fields to inc/widget-master.php to standardize widget field output
  • Added options callback ability to widget-master.php
  • Added wpdrudge_options_link_cat to helper.php to pull link categories
  • Added default value functionality to wpd_get_key; refactored to catch !isset cases; default settings saved for first activation – long story short, there were not coherent defaults set for certain settings fields and for people installing for the first time
  • Moved options array out of the settings object and into its own function, wpdrudge_get_options_array
  • Updated user agents in mobile.php – pulled, as always, from here

Leave a Reply

Your email address will not be published. Required fields are marked *