original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Save the post type
  
  @param array $new_instance
  @param array $old_instance
  @return array
docstring_tokens: Save the post type