Ticket #9008: 9008-deprecate-get_option-bloginfo.diff
File 9008-deprecate-get_option-bloginfo.diff, 1.6 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
321 321 function get_option( $setting, $default = false ) { 322 322 global $wpdb; 323 323 324 if ( WP_DEBUG && 'home' == $setting && did_action('init') ) { 325 $backtrace = debug_backtrace(); 326 if ( 'home_url' != $backtrace[1]['function'] ) 327 _deprecated_argument( __FUNCTION__, '3.0', __('Use home_url() instead of get_option(\'home\').') ); 328 } 329 324 330 // Allow plugins to short-circuit options. 325 331 $pre = apply_filters( 'pre_option_' . $setting, false ); 326 332 if ( false !== $pre ) -
wp-includes/general-template.php
297 297 function get_bloginfo( $show = '', $filter = 'raw' ) { 298 298 299 299 switch( $show ) { 300 case 'home' : // DEPRECATED301 case 'siteurl' : // DEPRECATED 302 _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use the \'%2$s\' option instead.'), $show, 'url' ) );303 case 'url' :304 $output =home_url();300 case 'home' : // DEPRECATED in 2.2 301 case 'siteurl' : // DEPRECATED in 2.2 302 case 'url' : // DEPRECATED in 3.0 303 _deprecated_argument( __FUNCTION__, '3.0', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use home_url() instead.'), $show ) ); 304 return home_url(); 305 305 break; 306 306 case 'wpurl' : 307 307 $output = get_option('siteurl');