Black Out Your Site Against SOPA
It seems like SOPA is almost dead, but there’s still a protest alive and well planned for tomorrow. I wrote a quickie WordPress plugin that redirects any page requests to sopastrike.com/strike. I know I’m late and it’s primitive, but it gets the job done. Here’s the code:
/* Plugin Name: Protest SOPA Plugin Description: A simple plugin to redirect to the Sopa Strike website on page load on January 18, 2012. Date: January 17, 2012 */ function protest_sopa() { $month=date('n'); $day=date('j'); $year=date('Y'); if( ($month=='1') && ($day=='18') && ($year=='2012') ) { header("Location: http://sopastrike.com/strike"); exit; } } if(!is_admin()) { add_action('init', 'protest_sopa'); }Download the source file here.
Categories: Our Blog
