Miscellany
public php v1 · immutable function wid_wpaudioscrobbler($args){ extract($args); echo $before_widget . $before_title . "Recent Tracks" . $after_title; wpaudioscrobbler(); echo $after_widget; } function widget_wpaudioscrobler(){ //Prevent failure if Widget plugin isnt loaded. if ( !function_exists('register_sidebar_widget') ) return; //Register this plugin as a Widget register_sidebar_widget('AudioScrobler', 'wid_wpaudioscrobbler'); } add_action('widgets_init', 'widget_wpaudioscrobler');