Luc Betheder wrote a handy little widget for Sean McBride’s SparkStats plugin, which I recently started to use. I noticed, though, that whenever I made changes to my widgets the custom title I set for the Sparks plugin would get wiped out. So I fixed the problem in the plugin and thought I’d send the patch to Luc. Turns out, I can’t get in touch with him. You have to be registered on his blog to comment, but he has registrations turned off. Also, his email address was nowhere to be found. Hmm…slightly frustrating. I’m not giving up though, so here’s my patch (I’m also testing out the Google Syntax Highlighter):

--- sparks.php	2008-02-16 14:14:22.000000000 -0500
+++ sparks.php.mine	2008-02-16 14:14:58.000000000 -0500
@@ -63,13 +63,13 @@
 			// Clean up control form submission options
 			$newoptions['title'] = strip_tags(stripslashes($_POST['Sparks-title']));
 			$newoptions['text'] = strip_tags(stripslashes($_POST['Sparks-text']));
-		}

-		// If original widget options do not match control form
-		// submission options, update them.
-		if ( $options != $newoptions ) {
-			$options = $newoptions;
-			update_option('widget_Sparks', $options);
+			// If original widget options do not match control form
+			// submission options, update them.
+			if ( $options != $newoptions ) {
+				$options = $newoptions;
+				update_option('widget_Sparks', $options);
+			}
 		}

 		// Format options as valid HTML. Hey, why not.

Download the patch: SparkStats Widget Patch