Local Weather

/* Launch the plugin. */
add_action( 'plugins_loaded', 'yahoo_weather_plugins_loaded' );

/* Initializes the plugin and it's features. */
function yahoo_weather_plugins_loaded() {

// Set constant
define( 'YAHOO_WEATHER_VERSION', '2.0.2' );
define( 'YAHOO_WEATHER_DIR', plugin_dir_path( __FILE__ ) );
define( 'YAHOO_WEATHER_URL', plugin_dir_url( __FILE__ ) );

load_plugin_textdomain( 'yahoo!-weather-forecasts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

/* Loads and registers the new widgets. */
add_action( 'widgets_init', 'yahoo_weather_load_widgets' );
}

/* Register the extra widgets. Each widget is meant to replace or extend the current default */
function yahoo_weather_load_widgets() {

/* Load widget file. */
require_once( trailingslashit( YAHOO_WEATHER_DIR ) . 'yahoo!-weather.php' );

/* Register widget. */
register_widget( 'Yahoo_Weather_Forecasts_Pl461n' );
}

?>