[wp-trac] [WordPress Trac] #50434: Replace the `$new_whitelist_options` variable with a more inclusive name

WordPress Trac noreply at wordpress.org
Mon Jun 22 22:02:23 UTC 2020


#50434: Replace the `$new_whitelist_options` variable with a more inclusive name
--------------------------+---------------------
 Reporter:  desrosj       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.5
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by ayeshrajans):

 I suppose the least disruptive approach would to `$new_whitelist_options =
 &$new_allowed_options`, and submit tickets in relevant plugins to update
 the variable. This should add almost zero impact in terms of
 performance/memory usage because the `$new_whitelist_options` shim is just
 a reference to the new variable name.

 Another way would be to convert `$new_allowed_options` to an `ArrayAccess`
 implementation, and emit a deprecation notice every time an array key is
 accessed. This would require us to declare a new class and populate it,
 which can be take more resources for a feature that we eventually need to
 phrase out.

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


More information about the wp-trac mailing list