Settings]
Version: .9.8.8.2
Author: Add to Any
Author URI: http://www.addtoany.com/contact/
*/
if( !isset($A2A_javascript) )
$A2A_javascript = '';
if( !isset($A2A_locale) )
$A2A_locale = '';
$A2A_SHARE_SAVE_plugin_basename = plugin_basename(__FILE__);
function A2A_SHARE_SAVE_textdomain() {
global $A2A_SHARE_SAVE_plugin_basename;
load_plugin_textdomain('add-to-any',
PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename),
dirname($A2A_SHARE_SAVE_plugin_basename));
}
add_action('init', 'A2A_SHARE_SAVE_textdomain');
function ADDTOANY_SHARE_SAVE_BUTTON( $args = false) {
global $A2A_SHARE_SAVE_plugin_basename;
if( $args )
extract( $args );
if($output_buffering) ob_start();
$sitename_enc = rawurlencode( get_bloginfo('name') );
$siteurl_enc = rawurlencode( trailingslashit( get_bloginfo('url') ) );
$linkname = ( in_the_loop() ) ? get_the_title() : wp_title('-', false,'right').get_bloginfo('name');
$linkname_enc = rawurlencode( $linkname );
$linkurl = ( in_the_loop() ) ?
/* Current post (if within loop) or current page */
get_permalink() :
"http" . ( ($_SERVER["HTTPS"]=="on") ? 's' : '' ) . "://" .
$_SERVER["HTTP_HOST"] .
( ($_SERVER["SERVER_PORT"] != "80") ? ":". $_SERVER["SERVER_PORT"] : '') .
$_SERVER["REQUEST_URI"] ;
$linkurl_enc = rawurlencode( $linkurl );
$button_target = (get_option('A2A_SHARE_SAVE_button_opens_new_window')=='1' && (get_option('A2A_SHARE_SAVE_onclick')!='1')) ? ' target="_blank"' : '';
if( !get_option('A2A_SHARE_SAVE_button') ) {
$button_fname = 'share_save_120_16.png';
$button_width = ' width="120"';
$button_height = ' height="16"';
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname;
} else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) {
$button_src = get_option('A2A_SHARE_SAVE_button_custom');
$button_width = '';
$button_height = '';
} else if( get_option('A2A_SHARE_SAVE_button') == 'TEXT' ) {
$button_text = stripslashes(get_option('A2A_SHARE_SAVE_button_text'));
} else {
$button_attrs = explode( '|', get_option('A2A_SHARE_SAVE_button') );
$button_fname = $button_attrs[0];
$button_width = ' width="'.$button_attrs[1].'"';
$button_height = ' height="'.$button_attrs[2].'"';
$button_src = trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname;
}
if( $button_attrs[0] == 'favicon.png' || $button_attrs[0] == 'share_16_16.png' ) {
if( !is_feed() ) {
$style_bg = 'background:url('.trailingslashit(get_option('siteurl')).PLUGINDIR.'/'.dirname($A2A_SHARE_SAVE_plugin_basename).'/'.$button_fname.') no-repeat scroll 0px 0px';
$style_bg = ';' . $style_bg . ' !important;';
$style = ' style="'.$style_bg.'padding:1px 5px 5px 22px"';
}
$button = stripslashes(get_option('A2A_SHARE_SAVE_button_text'));
} else if( $button_text ) {
$button = $button_text;
} else
$button = '
';
?>
>
';
$A2A_SHARE_SAVE_external_script_called = true;
}
else
$external_script_call = 'a2a_init("page");';
$A2A_javascript .= '