Reintroducing the CUNY Academic Commons Featured Content Widget

For the past two years The CUNY Academic Commons has used a plugin that allows our site administrators to feature specific content from across our community on our home page. This plugin was originally written by Michael McManus of Cast Iron Coding, and served its purpose perfectly. However, as it is with all software projects, updates to the WordPress core in general and to our site specifically, began to wear on the plugin’s internal structure and features. My first assignment upon joining the Commons development team was to bring this plugin back into conformance with WordPress best practices and coding standards, and to add some long awaited features that our admins had been patiently waiting for.

I am happy to announce today that the first version of this rewrite (v1.0.0) is available in the WordPress plugin repository, and I’d like to introduce you to some of the new features and functionality.

 What was wrong with the old version?

Technically there was nothing “wrong” with the previous version. It did its job and it did it well. Any problems the plugin was starting to introduce were due to two years of patching errors while inserting new functionality in a piecemeal fashion. As code evolves, small insertions to address small issues begin to compound exponentially until you reach a point where the original codebase is no longer recognizable and therefore no longer maintainable. Our featured content widget was rapidly approaching an unmaintainable state when I was asked to investigate a complete rewrite.

 What’s so great about the new version?

In a word: everything. Starting from scratch, we created an entirely new structure for the plugin based on a widget skeleton created by Jonathon Byrd at RedRokk Interactive Media. This allowed us to rapidly redesign the entire feature set of the plugin without having to worry about the boilerplate code needed by WordPress when implementing the basic plugin architecture. This decision allowed me to focus on incorporating the specific features of the plugin into a framework that handled all of the display and updating functionality out of the box.

What exactly are these features you keep referring to?

As exciting as the new features are, it’s important to understand all the features of the plugin. Here’s a list of the previous features as well as the new ones we were able to add:

  • Display a featured blog from your multisite install
  • Display a featured post from any blog across your multisite install
  • Display a featured group from your BuddyPress install
  • Display a featured member from your BuddyPress install
  • Display a featured resource from a custom URL
  • Crop the length of the text describing your featured content
  • Choose a custom label for the link to the featured content
  • Use AJAX autocomplete when entering featured content types (new feature)
  • Enter a custom description for your selected content type (new feature)
  • Choose whether or not the widget will display images on the front end (new feature)

The widget’s admin interface has also benefited from an overhaul. We’ve removed some unneccessary text and “tightened up” the layout to make the plugin easier to administer.

CAC Featured Content Widget - Admin Interface
Redesigned Admin Interface

In addition to the new (and existing) features above, the internal structure of the plugin has been both updated and simplified which results in a faster and cleaner plugin. If you’d like more details about the inner workings of the plugin, please check out its Github repo.

Awesome! How do get the new version?

You can download v1.0.0 from the WordPress plugin repository, install it from the plugins page of your WordPress install, clone or fork the plugin’s source code from its Github repo or, if you already have the plugin installed, you can update it through the admin section of your WordPress site.

note: because of the structural changes to the plugin, when updating from v0.8.4 to v1.0.0 you will need to repopulate any existing widgets with your specific featured content.

Please direct any and all support requests to the Github issues page for this plugin. We will attempt to answer and support any issues you may find while switching to the new version.

I hope you find this rewrite as useful as the previous version, and I hope the new features make the plugin both easier to use and more powerful when displaying your featured content to your site’s visitors.

2 thoughts on “Reintroducing the CUNY Academic Commons Featured Content Widget”

Leave a Reply

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

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image