[wp-trac] [WordPress Trac] #56849: Modify `_config_wp_home()` and `_config_wp_siteurl()` to become pre_option filters

WordPress Trac noreply at wordpress.org
Mon Jan 23 03:35:26 UTC 2023


#56849: Modify `_config_wp_home()` and `_config_wp_siteurl()` to become pre_option
filters
--------------------------------+---------------------
 Reporter:  flixos90            |       Owner:  (none)
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  6.2
Component:  Options, Meta APIs  |     Version:  2.2
 Severity:  normal              |  Resolution:
 Keywords:  has-patch commit    |     Focuses:
--------------------------------+---------------------

Comment (by peterwilsoncc):

 Both `site_url` and `home_url` options are autoloaded, if they are defined
 during the install are the options created or left out of the options
 table?

 The thought behind the question: there are two potential for back-compat
 breaks:

 * sites removing the filters using `remove_filter( 'option_...` in the
 manner of `ms-default-filters.php`
 * an order of operations issue for sites already filtering
 `pre_option_...` in a plugin -- there's a risk the existing code's return
 value will be replaced with the value of `_config_wp_...()`.

 On enterprise sites, the latter is more likely than the former as the
 options are often hardcoded in an `mu-plugin` to allow for them to be
 transferred between different environments more easily.

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


More information about the wp-trac mailing list