Custom Field Images: Version 2.0

Version 2.0 adds a feature that should have been there from the beginning: instead of storing the image URL, it stores the image ID (for images uploaded to the site), along with the desired size.

You’ll notice the change when you use the Insert CFI button to add an image. Otherwise, you can still add the URL by hand.

A Default URL option was also added in this version, so that all posts can have an image, making your site more uniform.

The template tags have also changed, for the better, I hope.

These are the declaration for the template tags now:

custom_field_image($post_id = '', $defaults = '');
 
get_custom_field_image($post_id = '', $defaults = '', $format = 'html');

Say you want to override the default alignment. You can do that by adding this code:

If you also wanted to override the alt text, you would do this:

And so on, with any parameter: url, id, size, align, alt, link.

Props to Separatista for taking the time to make a Czech translation.

And props to Mike for pitching in with suggestions.

Baseline Checker Bookmarklet

Update: For your forking pleasure, check out the github repository.

If you’re a web designer, you’re probably familiar with the typographical concept of “baseline rhythm“.

While tackeling the problem on this site, all I could find was baseline rhytm calculators. Sure, that helps a little, but it wasn’t quite what I needed. So I wrote this bookmarklet, creatively named “Baseline Checker”.

screenshot

What it does

It draws equally spaced horizontal lines on top of a webpage. The position and the distance between the lines is calculated in reference to a particular element on that page.

With it, you can see for yourself if the baseline is consistent or not.

How to use it

  1. “Install” the bookmarklet by dragging ( Baseline Checker ) to your bookmarks menu.
  2. Go to a webpage and then click the bookmarklet.
  3. Click an element on the page.

Icon credit: Sam Rayner

PS: You might also want to look at jMetronome.