[wp-trac] [WordPress Trac] #39778: Introduce helper function to validate UUID V4
WordPress Trac
noreply at wordpress.org
Fri Feb 3 19:15:50 UTC 2017
#39778: Introduce helper function to validate UUID V4
------------------------------------------+--------------------
Reporter: jonathanbardo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses:
------------------------------------------+--------------------
Comment (by jonathanbardo):
It's true that WordPress does have a lot of global functions! I just
recently started using that function in a plugin and was going to
duplicate the regex myself and I thought that it would have been useful to
have a validating function in core since we have a generating function.
Something I noticed while writing the unit test is that the regex used in
`class-wp-customize-manager.php` wasn't the same as in the `functions.php`
unit test and was way more permissive. Any reason for that @westonruter ?
I think the regex that was in the unit test is the right one for UUID v4.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39778#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list