Open Letter to Congressman Lamar Smith Regarding SOPA Championing

An email sent to the House Judiciary Committee Chairman, Rep. Lamar Smith (R-TX), who insists on pushing the SOPA bill through committee.

Dear Mr. Smith-

This is an open letter which will be published online, and promoted on Facebook, Twitter and other networks.

As a Texas resident, I find it egregious that you have decided to sell out so uniformly to the entertainment industry. It is so transparent, in fact, that federal records show that your biggest donor are from the holding company for Clear Channel and your biggest campaign contributions come from the entertainment industry itself. Shockingly, the records also show that a Texas elected representative has taken less money from the powerful energy industry that directly effects his constituents, than from an industry who has tried for over a decade to protect their own interests at the expense of your constituents.

This same industry has consistently bullied law-abiding citizens across this country with exorbitant lawsuits and heavy-handed scare tactics.

Your colleagues, in both the House and the Senate, have realized that the Stop Online Piracy Act (SOPA) and the Protect IP Act (PIPA), while idealistic in nature, are destructive to the innovative and stable nature of the Internet – the same nature that has created great economic vitality and growth over the past 20 years.

Your own majority leader, Mr. Eric Cantor, has expressed that SOPA will not come to a vote on the House floor without significant thought, intention, and consensus. This is clearly not happening as your colleagues have backed away from support, going the exact opposite direction from consensus – some even removing their names as co-sponsors.

Sir, you must listen to me and the American public. We see your transparent appeasement to your most significant donors. We understand campaign contributions are important for you and your efforts on behalf of the great State of Texas. However, attempting to ramrod this legislation through will be harmful to Texas, Texas innovation, Texas business as well as collaboration, security and health of the Internet, and business across the nation and globe.

You must abandon your single-sighted focus on ramming this legislation through the House of Representatives with the transparent motive of appeasing your donors. This is a democracy, not a business. You represent us.

Very respectfully,

Aaron Brazell

TUTORIAL: Adding an oEmbed Provider to WordPress

I don’t often write tutorials. I probably should. But normally it’s only when someone asks me something and I think, “Hey, self… you should write up how to do this”. As if a book wasn’t enough.

Last night I was at the Austin Web Holiday party, a gathering of some 15+ technical meetup groups cross-pollinating over beer and socializing. I was introduced to one guy (can’t remember his name!) who had built a video site and enabled it for oEmbed. He couldn’t understand why WordPress wouldn’t just automatically let users use his videos, like it does for YouTube, Vimeo, etc. The full list of default oEmbed providers are listed here.

WordPress doesn’t allow automatic use of oEmbed for security reasons. Otherwise, someone could build a video service stuffed with malicious code that could potentially access your database or create a man in the middle attack or worse. certainly doesn’t allow arbitrary oEmbed sites and the dot-org open source software doesn’t allow arbitrary stuff automatically. But it can be done, on the dot-org side, with a plugin. All it is a hook.

Here’s an example. If you want to register an oEmbed video site that is, say, at (randomly) http:/ and your videos are of the format*, it’s as simple as adding a function in your plugin (or more properly from a PHP perspective, a method in a class – but that’s a personal preference. The method/function should call the  wp_oembed_add_provider() function.

In it’s simplest form, all you have to do is:

class My_Plugin {

  var $oembed_endpoint;
  var $oembed_format;

  function __construct()
    $this->oembed_endpoint = '';
    $this->oembed_format = '*';


  function __destruct() {}

  function new_oembed()
    wp_oembed_add_provider( $this->oembed_format, $this->oembed_endpoint );


Then, to make this code work, just instantiate the class somewhere.

$my_plugin = new My_Plugin;