12seconds video status updates. Also provides a shortcode to embed the widget in a post. Version: 0.2 Author: Chandima Cumaranatunge Author URI: http://www.turingtarpit.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ //error_reporting(E_ALL); add_action( 'widgets_init', array( TwelveSecondsWidget::ID, 'register' )); register_activation_hook( __FILE__, array( TwelveSecondsWidget::ID, 'activate' )); register_deactivation_hook( __FILE__, array( TwelveSecondsWidget::ID, 'deactivate')); add_shortcode('12s', array( TwelveSecondsWidget::ID, 'tag' )); class TwelveSecondsWidget { const ID = 'TwelveSecondsWidget'; const NAME = '12seconds Widget'; function activate() { $defaults = array( 'title' => __('12seconds Widget'), 'username' => '', 'size' => 'skinny' ); if ( ! get_option( self::ID )) { add_option( self::ID , $defaults); } else { update_option( self::ID , $defaults); } } function deactivate() { delete_option( self::ID ); } function control() { $options = get_option( self::ID ); ?>


ERROR: 12seconds username not specified.

'); } else { switch ( strtolower( $size )) { case 'skinny': return ''; break; case 'fat': return ''; break; } } } // [12s username="some_username" size="fat"] function tag( $args = array(), $content = null ) { $defaults = array( 'username' => '', 'size' => 'skinny' ); extract(shortcode_atts( $defaults, $args )); return self::getWidgetCode( $username, $size ); } function register() { register_sidebar_widget(self::NAME, array(self::ID, 'display')); register_widget_control(self::NAME, array(self::ID, 'control')); } } ?>