Settings - on the Widgets page] Version: .9 Author: MicroPat Author URI: http://www.addtoany.com/contact/ */ class Add_to_Any_Subscribe_Widget { // static init callback function init() { // Check for the required plugin functions. This will prevent fatal // errors occurring when you deactivate the dynamic-sidebar plugin. if ( !function_exists('register_sidebar_widget') ) return; $widget = new Add_to_Any_Subscribe_Widget(); // This registers our widget so it appears with the other available // widgets and can be dragged and dropped into any active sidebars. register_sidebar_widget('Add to Any Subscribe', array($widget,'display')); //Registering the control form. register_widget_control('Add to Any Subscribe', 'A2A_SUBSCRIBE_options_page', 450); } function display() { $sitename = get_bloginfo('name'); $sitename_enc = rawurlencode( $sitename ); $feedurl = get_bloginfo('rss2_url'); $feedurl_enc = rawurlencode( $feedurl ); if( !get_option('A2A_SUBSCRIBE_button') ) { $button_fname = 'subscribe_120_16.gif'; $button_width = '120'; $button_height = "16"; } else { $button_attrs = explode( '|', get_option('A2A_SUBSCRIBE_button') ); $button_fname = $button_attrs[0]; $button_width = $button_attrs[1]; $button_height = $button_attrs[2]; } $button = 'Subscribe'; ?>