[wp-trac] [WordPress Trac] #28216: Allow to register pre-instantiated widgets

WordPress Trac noreply at wordpress.org
Fri Apr 29 05:41:01 UTC 2016


#28216: Allow to register pre-instantiated widgets
-------------------------------+--------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  westonruter
     Type:  defect (bug)       |      Status:  accepted
 Priority:  normal             |   Milestone:  4.6
Component:  Widgets            |     Version:  3.9.1
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+--------------------------
Changes (by westonruter):

 * keywords:   => has-patch


Comment:

 @PeterRKnight How fortunate that `spl_object_hash()` is available in PHP
 5.2! However, I see it is used in `_wp_filter_build_unique_id()` but has
 an alternate case for handling if the function is not defined. This
 worried me in that perhaps the function could be disabled in 5.2. But see
 [https://core.trac.wordpress.org/ticket/21267#comment:4 #21267]:

 > Since PHP 5.2 (the required version for WP is 5.2.4),
 {{{spl_object_hash}}} exists, which means the {{{else}}} statement and
 {{{function_exists()}}} check are completely useless in
 {{{_wp_filter_build_unique_id()}}}

 So I think we're safe.

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


More information about the wp-trac mailing list