protected function replacePatternParameterWithPlaceholder( $matches, &$parameters ) {
		$name = $matches['name'];
		$optional = ! empty( $matches['optional'] );

		$replacement = '/(?P<' . $name . '>' . $this->parameter_pattern . ')';

		if ( $optional ) {
			$replacement = '(?:' . $replacement . ')?';
		}

		$hash = sha1( implode( '_', [
			count( $parameters ),
			$replacement,
			uniqid( 'wpemerge_', true ),
		] ) );
		$placeholder = '___placeholder_' . $hash . '___';
		$parameters[ $placeholder ] = $replacement;

		return $placeholder;
	}
protected function replacePatternParameterWithPlaceholder( $matches, &$parameters ) {
		$name = $matches['name'];
		$optional = ! empty( $matches['optional'] );

		$replacement = '/(?P<' . $name . '>' . $this->parameter_pattern . ')';

		if ( $optional ) {
			$replacement = '(?:' . $replacement . ')?';
		}

		$hash = sha1( implode( '_', [
			count( $parameters ),
			$replacement,
			uniqid( 'wpemerge_', true ),
		] ) );
		$placeholder = '___placeholder_' . $hash . '___';
		$parameters[ $placeholder ] = $replacement;

		return $placeholder;
	}
protected function replacePatternParameterWithPlaceholder ( $ matches , & $ parameters ) { $ name = $ matches [ 'name' ] ; $ optional = ! empty ( $ matches [ 'optional' ] ) ; $ replacement = '/(?P<' . $ name . '>' . $ this -> parameter_pattern . ')' ; if ( $ optional ) { $ replacement = '(?:' . $ replacement . ')?' ; } $ hash = sha1 ( implode ( '_' , [ count ( $ parameters ) , $ replacement , uniqid ( 'wpemerge_' , true ) , ] ) ) ; $ placeholder = '___placeholder_' . $ hash . '___' ; $ parameters [ $ placeholder ] = $ replacement ; return $ placeholder ; }
Validation pattern replace callback.

@param  array  $matches
@param  array  $parameters
@return string
Validation pattern replace callback .