Some WordPress Gallery Features You Might Not Know About

The other day, I was playing around with the WordPress [

] shortcode, and came across the need to exclude an image that was attached to the page. The image I needed to exclude was kind of like a featured image, and I didn’t want it to appear again in the gallery itself. So, I searched for information about excluding images from the WordPress [

] shortcode, and came across the related WordPress Codex article.

While reading that article, I noticed a handful of features I’d never known about in that particular shortcode. After all, I always basically assumed that the options WordPress gives you when inserting a gallery were probably the only options that were available.

Google Launches Initial Google+ API

googleGoogle’s latest attempt at social networking, Google+, now has a new first-cut at a developer API. The Google+ Platform blog has info on the release of the new API.

Startup blogger Robert Scoble put together a list of some of the feedback on the new API – it seems the reaction is mixed. RSS creator Dave Winer says Google “doesn’t get it”. Why am I surprised that a company who has a VP, Bradley Horowitz, post on Twitter that he only cares about Twitter users with over 100,000 followers might not fully understand how to promote a new API to developers?

The Google Plus team notes that they are using the follow existing standards and best practices where they can:

  • Our API methods are RESTful HTTP requests which return JSON responses.
  • Our payload formats use standard syntax (e.g. PoCo for people info, ActivityStrea.ms for activities).
  • We use OAuth 2 for secure trusted access to user data.

The Google Plus API is located here if you want to start to play with it.

Please Stop Using cURL in WordPress Plugins

WordPress HTTP class usage

Unfortunately, I keep finding WordPress plugins that try to call cURL functions directly. Unfortunately, not only do these plugins fail to work if cURL isn’t installed, it throws a fatal PHP error in the process.

The problem with using cURL in WordPress plugins is that WordPress solved that problem more than 2 years ago by implementing the WP_Http class. WP_Http is a class included in the WordPress core that has multiple options. One of those options is cURL, but it gracefully reverts to other PHP functions if cURL isn’t available.

Basically, anything you can do with cURL can be done with the WP_Http class, and it will allow your plugin to be much more versatile and compatible with more server setups.

Adding an ICS Event File to Google Calendar

If you register for webinars, conferences, meetings, etc. on a somewhat regular basis, you are probably familiar with ICS files. An ICS file is an iCalendar file; and can contain a single event or an entire calendar feed. Online registrations and event notices tend to make use of these files quite a bit, because they offer a one-click method for people to add the events to their calendars.

If you’re using Outlook, Thunderbird, iCal or just about any other desktop calendar program, you simply download the file, open it and save the event to your calendar.

However, if you’re using Google Calendar, things get a little bit trickier. There’s no simple way to open the file and have Google Calendar take over from there. Instead, you basically have to understand how Google Calendar expects ICS files to be used (why the system uses this logic is kind of beyond me; but that’s the way things are). Google Calendar, for some reason, does not seem to expect people to use ICS files to add individual events regularly. Instead, it uses the logic that an ICS file should include a calendar “feed”, similar to a website’s RSS feed, that would contain a complete list of events.

Gmail’s “Add to Calendar”

A while back, Google unveiled a new feature in Gmail that automatically scans the message currently being viewed, checks for a date and time in the message body, and, if found, adds a link allowing you to add the item directly to your Google Calendar (as shown in the image on the right). Lately, I’ve noticed that that algorithm has improved greatly. I used to see the “Add to calendar” feature only appear in very rare cases, but I am now seeing it almost every time I am viewing a message that I want to add to my calendar.

Firefox and HTML5

Earlier this evening, I was reminded of just how primitive the HTML5 support was in Firefox 3.5/3.6. While we have seen three major version releases since 3.5, it was actually still the latest version of Firefox less than 6 months ago (and was that way for almost 2 years). Therefore, Firefox 3.5.x still holds a decent amount of market share (probably as much as, if not more than IE6 did a year or two ago). Looking at a handful of websites for which I have analytics data, versions of Firefox prior to 4 still accounted for anywhere between 2% and 15% of the total visits to those sites last month.¬†With all of that information, it’s probably still important to make sure your sites work in versions of Firefox as far back as 3.5.

There are two somewhat major gotchas in the way Firefox 3.x handled HTML5. The first is easily fixed with a few lines of CSS. The second can only really be fixed if you rewrite some of your HTML.


Useful Things