[wp-trac] [WordPress Trac] #50413: Update code and comments to remove "blacklist" and "whitelist"

WordPress Trac noreply at wordpress.org
Wed Jul 22 19:51:47 UTC 2020


#50413: Update code and comments to remove "blacklist" and "whitelist"
---------------------------------------------+-----------------------
 Reporter:  strangerstudios                  |       Owner:  desrosj
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  5.5
Component:  General                          |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch needs-dev-note commit  |     Focuses:
---------------------------------------------+-----------------------

Comment (by desrosj):

 I also forgot to mention what I was planning to propose for plugins and
 themes.

 {{{

 if ( false === get_option( 'blocklist_keys' ) ) {
     // Assume this is WP < 5.5. Option does not exist.
 } else {
     // Assume this is WP >= 5.5
 }
 }}}

 When upgrading to 5.5, the option key will be added to the database
 automatically and any values in the old key will be moved over. Provided
 the default option for this key is not filtered (which should be extremely
 rare based on the research above), `get_option()` will explicitly return
 `false` when the option does not exist. So the above check could be used
 to determine which key they need to retrieve.

 @SergeyBiryukov @johnjamesjacoby do you have any suggested adjustments for
 this suggested approach?

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


More information about the wp-trac mailing list