Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.

git-svn-id: https://develop.svn.wordpress.org/trunk@20023 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave
2012-02-28 20:29:33 +00:00
parent 21630b2828
commit cafa8dab24
9 changed files with 21 additions and 30 deletions
+3 -5
View File
@@ -196,17 +196,15 @@ function update_recently_edited( $file ) {
*
* @since 2.1.0
*
* @param unknown_type $old_value
* @param unknown_type $value
* @param string $old_value
* @param string $value
*/
function update_home_siteurl( $old_value, $value ) {
global $wp_rewrite;
if ( defined( "WP_INSTALLING" ) )
return;
// If home changed, write rewrite rules to new location.
$wp_rewrite->flush_rules();
flush_rewrite_rules();
}
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );