public function update( $new_instance, $old_instance ) {

		$post_types = get_post_types();

		$selected = isset( $_REQUEST[ $this->get_field_id( 'post_type' ) ] )
			? sanitize_text_field( wp_unslash( $_REQUEST[ $this->get_field_id( 'post_type' ) ] ) )
			: false;

		if ( in_array( $selected, $post_types, true ) ) {
			$new_instance['post_type'] = $selected;
		}

		$number = isset( $_REQUEST[ $this->get_field_id( 'number' ) ] )
			? absint( $_REQUEST[ $this->get_field_id( 'number' ) ] )
			: false;

		$new_instance['number'] = $number;

		return $new_instance;
	}