original_string: protected function validate_by_callbacks( array $data, array $callbacks ) {
  		foreach ( $callbacks as $key => $callback ) {
  			$validity = new WP_Error;
  
  			$value = array_key_exists( $key, $data ) ? $data[ $key ] : null;
  			$callback( $validity, $value );
  
  			if ( is_wp_error( $validity ) && count( $validity->errors ) > 0 ) {
  				$this->add_error( $key, $validity->get_error_messages() );
  			}
  		}
  	}
code: protected function validate_by_callbacks( array $data, array $callbacks ) {
  		foreach ( $callbacks as $key => $callback ) {
  			$validity = new WP_Error;
  
  			$value = array_key_exists( $key, $data ) ? $data[ $key ] : null;
  			$callback( $validity, $value );
  
  			if ( is_wp_error( $validity ) && count( $validity->errors ) > 0 ) {
  				$this->add_error( $key, $validity->get_error_messages() );
  			}
  		}
  	}
code_tokens: protected function validate_by_callbacks ( array $ data , array $ callbacks ) { foreach ( $ callbacks as $ key => $ callback ) { $ validity = new WP_Error ; $ value = array_key_exists ( $ key , $ data ) ? $ data [ $ key ] : null ; $ callback ( $ validity , $ value ) ; if ( is_wp_error ( $ validity ) && count ( $ validity -> errors ) > 0 ) { $ this -> add_error ( $ key , $ validity -> get_error_messages ( ) ) ; } } }
docstring: Validate fields use "validate_cb" parameter.
  
  @param array $data
  @param array $callbacks
docstring_tokens: Validate fields use validate_cb parameter .