Uses
| Uses | Description |
|---|---|
| wp-includes/ms-site.php: wp_update_site() | Updates a site in the database. |
| wp-includes/load.php: is_wp_error() | Check whether variable is a WordPress Error. |
Update the details for a blog. Updates the blogs table for a given blog ID.
(int) (Required) Blog ID.
(array) (Optional) Array of details keyed by blogs table field names.
Default value: array()
(bool) True if update succeeds, false otherwise.
File: wp-includes/ms-blogs.php
function update_blog_details( $blog_id, $details = array() ) {
global $wpdb;
if ( empty( $details ) ) {
return false;
}
if ( is_object( $details ) ) {
$details = get_object_vars( $details );
}
$site = wp_update_site( $blog_id, $details );
if ( is_wp_error( $site ) ) {
return false;
}
return true;
} | Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_blog_details