Settings) Version: 2.3.1 Author: AddInto Author URI: http://www.addinto.com */ if (!defined('ADDINTOPLUGINDEFINE')) define('ADDINTOPLUGINDEFINE', 1); else return; // Pre-2.6 compatibility if ( !defined('WP_CONTENT_URL') ) define('WP_CONTENT_URL', get_option('siteurl').'/wp-content'); if ( !defined('WP_PLUGIN_URL') ) define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins'); $addIntoPluginPath = WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)); function addIntoPluginInit () { global $addIntoPluginPath; add_filter('admin_menu', 'addIntoPluginAdminMenu'); load_plugin_textdomain('addinto', $addIntoPluginPath.'/lang', plugin_basename(dirname(__FILE__)).'/lang'); add_option('ai2_button_logo', 'text_button'); add_option('ai2_text_button', __('Bookmark / Share', 'addinto')); add_option('ai2_url_button'); add_option('ai2_align', 'left'); add_option('ai2_on_home', 'yes'); add_option('ai2_on_pages', 'no'); add_option('ai2_on_archives', 'yes'); add_option('ai2_on_categories', 'yes'); add_option('ai2_button_type', 'dropdown'); add_option('ai2_hide_embeds', 'no'); add_option('ai2_dd_onclick', 'onmouseover_dd'); add_option('ai2_nb_srvs'); add_option('ai2_nb_columns'); add_option('ai2_srv'); add_option('ai2_srvs'); add_option('ai2_sharebox_srvs'); add_filter('the_content', 'addIntoPluginDisplayButton'); add_filter('the_excerpt', 'addIntoPluginDisplayButton'); if($_POST['addinto']) addIntoPluginUpdateOptions($_POST['addinto']); } function addIntoPluginUpdateOptions ($vars) { foreach($vars as $key => $value) update_option($key, $value); } function addIntoPluginAdminMenu () { add_options_page('AddInto Options', 'AddInto', 8, __FILE__, 'addIntoPluginOptions'); } function addIntoPluginOptions () { global $addIntoPluginPath; $lang = explode(",", get_bloginfo('language')); $lang = StrToLower(substr(chop($lang[0]),0,2)); $lang = ($lang == 'fr') ? 'fr' : 'en'; ?>
';
}
// colsing anchor
$button .= '';
}
else // ShareBox
{
$sharebox_servs = (get_option('ai2_sharebox_srvs') != '') ? strtolower(get_option('ai2_sharebox_srvs')) : 'bookmark,facebook,twitter,google_buzz,separator,more';
$arr_dd_servs = explode(",", $sharebox_servs);
$button .= '
';
}
}
$button .= '';
}
else
{
$button .= '';
}
}
$button .= '