[wp-trac] [WordPress Trac] #39778: Introduce helper function to validate UUID V4

WordPress Trac noreply at wordpress.org
Fri Feb 3 18:40:49 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:
------------------------------------------+--------------------
Changes (by westonruter):

 * keywords:  has-patch => needs-unit-tests needs-patch
 * milestone:  Awaiting Review => 4.8


Comment:

 Yeah, I opted to not introduce a new global function because WP has enough
 globals. But I was probably being overly conservative.

 Needs unit tests, good to test with `wp_generate_uuid4`, that the function
 returns a valid UUID4.

 The `Tests_Functions::test_wp_generate_uuid4()` test then also should be
 refactored similarly.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39778#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list