Fix notices when the Recent_Comments widget has no settings
git-svn-id: https://develop.svn.wordpress.org/trunk@11228 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fa31602215
commit
a9fc3bac09
|
@ -659,9 +659,8 @@ class WP_Widget_Recent_Comments extends WP_Widget {
|
|||
}
|
||||
|
||||
function form( $instance ) {
|
||||
$title = esc_attr($instance['title']);
|
||||
if ( !$number = (int) $instance['number'] )
|
||||
$number = 5;
|
||||
$title = isset($instance['title']) ? esc_attr($instance['title']) : '';
|
||||
$number = isset($instance['number']) ? absint($instance['number']) : 5;
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('title'); ?>">
|
||||
<?php _e('Title:'); ?>
|
||||
|
|
Loading…
Reference in New Issue