mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Fix notices when the Recent_Comments widget has no settings
git-svn-id: http://svn.automattic.com/wordpress/trunk@11228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
51ff5245cf
commit
99c157dbaf
@ -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
Block a user