On this page
update_blog_details( int $blog_id, array $details = array() ): bool
Update the details for a blog. Updates the blogs table for a given blog ID.
Parameters
$blog_idint Required-
Blog ID.
$detailsarray Optional-
Array of details keyed by blogs table field names.
Default:
array()
Return
bool True if update succeeds, false otherwise.
Source
File: wp-includes/ms-blogs.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_update_site() wp-includes/ms-site.php | Updates a site in the database. |
| is_wp_error() wp-includes/load.php | Checks whether the given variable is a WordPress Error. |
Used By
| Used By | Description |
|---|---|
| wpmu_update_blogs_date() wp-includes/ms-blogs.php | Update the last_updated field for the current site. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_blog_details