May 8, 2009 by Matt | Posted in WordPress
Apparently I’ve been doing things the hard way in my WordPress-related coding. I’ve been using regular expressions to turn URLs into clickable links, when WordPress already has a built-in formatting function to do just that.
Meet make_clickable(). All you have to do is pass a string to it, and it will return the string, but with any web URLs, email addresses or FTP URLs turned into HTML links.
$text = 'This is a cool link: http://www.webmaster-source.com';
echo make_clickable($text);
Will return This is a cool link: http://www.webmaster-source.com
. Easy enough, and certainly a more efficient method than writing your own function to do it.
May 7
A few weeks ago, I happened across NytUrl.com, a sort of TinyURL site that would only redirect to pages on the New York Times website. Why? Well, there are a ton of reasons but the big one is that by using this shortened URL…
May 6
DesignM.ag recently interviewed eight designers in a fantastic group interview. Chris Coyier, Collis Ta’eed, Todd Garland, Jon Phillips, Chris Spooner, Adii Pienaar, Jacob Gube, and Adelle Charles gave their answers to a series of questions, most of them about personal projects. Many designers and…
May 5
Jayvee Fernandez recently wrote on The Blog Herald about WordPress and it’s problems with historical timestamps. A friend on Plurk asked whether it is possible to use actual historical dates on your blog’s CMS (i.e. 4th of July 1776 for Independence Day). I did…
May 4
For the Twitter-obsessed who want to display their follower count on their blogs, ThemeSphere has put together a WordPress plugin that will get it in plain text. Installing the plugin gives you access to a function and a shortcode that will return the follower…
May 3
Domainr is a useful domain-searching tool that helps you find available “domain hacks.” You’ve probably seen URLs like del.icio.us, last.fm, and identi.ca before. Domainr helps you find them. I’ve always liked unusual domains like that (domains in general are fun to register). Domainr makes…
May 2
How to Follow Everyone Back on Twitter Without Ruining Your Experience Announcing WordPress Plugin Competition 2009 (3.0) – In case you were wondering, I will be entering with a new plugin that is currently in the works. The embarrassment of American broadband 12 Excellent…
May 1
wpTweety is yet another one of those “twitterwall” sites (like Helveti-Tweet), where Twitter postings on a certain topic are harvested from the Search API and dumped onto the site. By the name, I’m sure you can realize what topic wpTweety searches Twitter for… WordPress!…
Apr 30
Amazon S3 is a service that allows you to host files of all kinds very cheaply. You can host images and podcast files to take the strain off the server that runs your website; you can hook into the API and use S3 to…
Apr 29
A month or two ago I had an interesting idea involving WordPress permalinks. I realized that is would be very simple to automatically shorten WordPress permalinks for usage on Twitter. With a little .htaccess tweak, you could have something like yourdomain.com/s123 redirect to yourdomain.com?p=123.…