Retrieving Information from the WordPress Codex

While working on the Extended Super Admins plugin for WordPress, I decided to try to pull information out of the WordPress Codex and use it in the plugin. I did a little Googling, but didn’t come up with much.

Then, I decided to look for API information about MediaWiki (the script used to present the WordPress Codex). After a bit more Googling, I discovered that there is, in fact, an API built into MediaWiki installations. The API is the same on the WordPress codex as it is on WikiPedia (and most other MediaWiki installations, I’m sure). Thankfully, much of the documentation is built right into the API file itself, so loading it up in your browser gives you pretty good instructions on how to use it.

Identifying External Links – Like Wikipedia

Wikipedia - External Link Identification

I found myself wondering a while back how Wikipedia identifies external links the way they do. I’ve seen the same concept on many other sites, but I had never really looked into how it was done. I always just assumed that an image was dynamically added to any code that included external links.

It turns out that I was wrong, and I was kind of happy to find that out. The answer I found makes much more sense, and is much more simple to implement.