[wp-trac] [WordPress Trac] #44883: Twenty Seventeen: Use simple counter rather than uniqid() for generating unique IDs for HTML elements

WordPress Trac noreply at wordpress.org
Sun Jan 6 20:07:39 UTC 2019


#44883: Twenty Seventeen: Use simple counter rather than uniqid() for generating
unique IDs for HTML elements
------------------------------+----------------------------
 Reporter:  westonruter       |       Owner:  laurelfulford
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  5.0.3
Component:  Bundled Theme     |     Version:  4.7
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+----------------------------

Comment (by desrosj):

 In [changeset:"44407" 44407]:
 {{{
 #!CommitTicketReference repository="" revision="44407"
 General: Introduce `wp_unique_id()`, a PHP implementation of Underscore's
 `uniqueId` method.

 A static variable contains an integer that is incremented with each call.
 This number is returned with the optional prefix.
 As such the returned value is not universally unique, but it is unique
 across the life of the PHP process.

 Props westonruter, dlh.

 Merges [43658] and [44406] to the 5.0 branch.
 See #44883.
 }}}

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


More information about the wp-trac mailing list