[wp-trac] [WordPress Trac] #9008: add a home_url() function to enforce http/https scheme

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 6 05:11:04 UTC 2010


#9008: add a home_url() function to enforce http/https scheme
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous  
     Type:  enhancement        |      Status:  new        
 Priority:  high               |   Milestone:  3.0        
Component:  Template           |     Version:  2.7        
 Severity:  major              |    Keywords:  2nd-opinion
-------------------------------+--------------------------------------------

Comment(by nacin):

 ryan and I discussed this briefly on
 [https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
 dev&day=2010-02-05&sort=asc#m65186 IRC] today.

 We can put logic into get_bloginfo(), for sure. (We would need to change a
 few dozen references.) If we are to do it for get_option(), the best idea
 so far I think is this:
  - Add a simple do_action() to the top of the *_url() family (or maybe
 come up with a filter that is actually useful).
  - On WP_DEBUG, attach a filter to pre_option_$option. In the callback,
 call _deprecated_argument(), but first check $wp_current_filter to make
 sure we're not coming from a *_url() function.

 That avoids the backtrace and I feel the benefit would outweigh what I
 think would be minimal cost.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9008#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list