<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Yes, everyone should definitely be doing this. I have a few notes
for this too.<br>
<br>
------<br>
<br>
Widgets should be registered using the register_widget() function
like so:<br>
<br>
register_widget( 'Theme_Widget_Class_Name' );<br>
<br>
------<br>
<br>
Widgets should be coded by extending the WP_Widget class. So, the
first line of the widget code should be something like:<br>
<br>
class Theme_Widget_Class_Name extends WP_Widget {<br>
<br>
------<br>
<br>
For validating/sanitizing on input, you should look in the
"update()" method, which would begin like so:<br>
<br>
function update( $new_instance, $old_instance ) {<br>
<br>
------<br>
<br>
For escaping on output, you should look in the "form()" method,
which would begin like so:<br>
<br>
function form( $instance ) {<br>
<br>
------<br>
<br>
You should also make sure that "$before_widget" and "$after_widget"
are used for outputting the sidebar's HTML within the "widget()"
method. And, make sure widget titles look something like this on
display:<br>
<br>
if ( !empty( $instance['title'] ) )<br>
echo $before_title . apply_filters( 'widget_title',
$instance['title'], $instance, $this->id_base ) . $after_title;<br>
<br>
<br>
On 4/29/2011 11:12 AM, Chip Bennett wrote:
<blockquote
cite="mid:BANLkTimET3_EqTU9N+8-KMA1og_phciQ1A@mail.gmail.com"
type="cite">Good morning, Reviewers!
<div><br>
</div>
<div>Just a quick note: when reviewing Themes that include custom
Widgets, treat such Widgets as if they are Theme Settings. That
is, primarily, ensure that any user input is properly
validated/sanitized on input, and escaped upon output.</div>
<div><br>
</div>
<div>This is something that most of us (including me) may not have
been explicitly looking at...</div>
<div><br>
</div>
<div>Chip</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
theme-reviewers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
</body>
</html>