adf.ly, this plugin able to convert your links to adf.ly, no need to do it manually. Version: 0.1 Author: NinjaPlugins Author URI: http://ninjaplugins.com License: GPL2 */ /* adf.ly WordPress Plugin Options: - Enable adf.ly - Convert outgoing links only/all links to adf.ly - Ad type: Intestitial or banner - adf.ly id (http://adf.ly/tools.php?easylink) */ add_action('wp_footer', 'np_adfly_get_script'); //get options function np_adfly_get_options(){ $explode = explode('/',get_option('home')); $options = array( 'np_adfly_id' => get_option('np_adfly_id'), 'np_adfly_type' => get_option('np_adfly_type'), 'np_adfly_convert' => (get_option('np_adfly_convert') == 'outgoing') ? $explode[2]:'' ); return $options; } function np_adfly_get_script(){ if(!get_option('np_adfly_enable')){ return false; } //get plugin options $options = np_adfly_get_options(); //populate script; $script = "\n"; $script .= "\n"; echo $script; } //Let's create the options menu // create custom plugin settings menu add_action('admin_menu', 'np_adfly_create_menu'); function np_adfly_create_menu() { //create new top-level menu add_options_page('adf.ly Plugin Settings', 'adf.ly Settings', 'administrator', __FILE__, 'np_adfly_settings_page',plugins_url('/images/icon.png', __FILE__)); //call register settings function add_action( 'admin_init', 'np_adfly_register_mysettings' ); } function np_adfly_register_mysettings() { //register our settings register_setting( 'np-adfly-settings-group', 'np_adfly_enable' ); register_setting( 'np-adfly-settings-group', 'np_adfly_id' ); register_setting( 'np-adfly-settings-group', 'np_adfly_convert' ); register_setting( 'np-adfly-settings-group', 'np_adfly_type' ); } function np_adfly_settings_page() { ?>