mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user