Introduce get_home_url(), get_site_url(), and get_admin_url() for fetching urls by blog id. see #12119

git-svn-id: https://develop.svn.wordpress.org/trunk@12978 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-02-05 21:49:19 +00:00
parent fdcbef3e84
commit 65b3f1e5e3
4 changed files with 92 additions and 23 deletions
+5 -4
View File
@@ -207,11 +207,12 @@ switch ( $_GET['action'] ) {
}
if ( $_POST['update_home_url'] == 'update' ) {
if ( get_option( 'siteurl' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
update_option( 'siteurl', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
$blog_address = get_blogaddress_by_domain($_POST['blog']['domain'], $_POST['blog']['path']);
if ( get_option( 'siteurl' ) != $blog_address )
update_option( 'siteurl', $blog_address);
if ( get_option( 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
update_option( 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
if ( get_option( 'home' ) != $blog_address )
update_option( 'home', $blog_address );
}
$wp_rewrite->flush_rules();