Settings - on the Widgets page] Version: .9.2.1 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_widget', 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"; $button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any-subscribe/'.$button_fname; } else if( get_option('A2A_SUBSCRIBE_button') == 'CUSTOM' ) { $button_src = get_option('A2A_SUBSCRIBE_button_custom'); } 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_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/add-to-any-subscribe/'.$button_fname; } $button = 'Subscribe'; ?> onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/subscribe?linkname=&linkurl="> Widgets ) *************************************************/ // This function outputs the options control panel under the admin screen. function A2A_SUBSCRIBE_options_widget() { if( $_POST[ 'A2A_SUBSCRIBE_submit_hidden' ] == 'Y' ) { update_option( 'A2A_SUBSCRIBE_button', $_POST['A2A_SUBSCRIBE_button'] ); update_option( 'A2A_SUBSCRIBE_button_custom', $_POST['A2A_SUBSCRIBE_button_custom'] ); } // Which is checked $subscribe_16_16 = ( get_option('A2A_SUBSCRIBE_button')=='subscribe_16_16.png|16|16' ) ? ' checked="checked" ' : ' '; $subscribe_120_16 = ( !get_option('A2A_SUBSCRIBE_button') || get_option('A2A_SUBSCRIBE_button')=='subscribe_120_16.gif|120|16' ) ? ' checked="checked" ' : ' '; $subscribe_171_16 = ( get_option('A2A_SUBSCRIBE_button')=='subscribe_171_16.gif|171|16' ) ? ' checked="checked" ' : ' '; $subscribe_256_24 = ( get_option('A2A_SUBSCRIBE_button')=='subscribe_256_24.gif|256|24' ) ? ' checked="checked" ' : ' '; $subscribe_custom = ( get_option('A2A_SUBSCRIBE_button')=='CUSTOM' ) ? ' checked="checked" ' : ' '; ?>

More Settings...

Subscribe Button ) *************************************************/ function A2A_SUBSCRIBE_options_page() { if( $_POST[ 'A2A_SUBSCRIBE_submit_hidden' ] == 'Y' ) { update_option( 'A2A_SUBSCRIBE_hide_embeds', ($_POST['A2A_SUBSCRIBE_hide_embeds']=='1') ? '1':'-1' ); update_option( 'A2A_SUBSCRIBE_show_title', ($_POST['A2A_SUBSCRIBE_show_title']=='1') ? '1':'-1' ); update_option( 'A2A_SUBSCRIBE_onclick', ($_POST['A2A_SUBSCRIBE_onclick']=='1') ? '1':'-1' ); update_option( 'A2A_SUBSCRIBE_button', $_POST['A2A_SUBSCRIBE_button'] ); update_option( 'A2A_SUBSCRIBE_button_custom', $_POST['A2A_SUBSCRIBE_button_custom'] ); update_option( 'A2A_SUBSCRIBE_additional_js_variables', trim($_POST['A2A_SUBSCRIBE_additional_js_variables']) ); ?>

Button




Button Placement
If you are using a widget-ready theme, you can use the widgets page to place the button where you want in your sidebar.

Open Widgets Panel

Alternatively, you can place the following code in your template pages (within sidebar.php, index.php, single.php, and/or page.php):
<?php Add_to_Any_Subscribe_Widget::display(); ?>

Menu Style
Using Add to Any's Menu Styler, you can customize the colors of your Subscribe menu! When you're done, be sure to paste the generated code in the Additional Options box below.

Open Menu Styler

Menu Options


Additional Options