'; ?>
";
endif;
endwhile;
endif;
wp_reset_postdata();
print $after_widget;
}
/**
* Prepares the content. Not.
*
* @param array $new_instance New content
* @param array $old_instance Old content
* @return array New content
*/
public function update( $new_instance, $old_instance ){
$new_instance_array = array( 'title', 'limit' );
foreach( $new_instance_array as $val )
$old_instance[ $val ] = $new_instance[ $val ];
return $old_instance;
}
/**
* Tell WP we want to use this widget.
*
* @wp-hook widgets_init
* @return void
*/
public static function register(){
register_widget( __CLASS__ );
}
}