update_blog_details()
Updates the details for a blog and the blogs table for a given blog ID.
No Hooks.
Return
true|false
. True if update succeeds, false otherwise.
Usage
update_blog_details( $blog_id, $details );
- $blog_id(int) (required)
- Blog ID.
- $details(array)
- Array of details keyed by blogs table field names.
Default: array()
Changelog
Since 3.0.0 | Introduced. |
update_blog_details() update blog details code WP 6.6.1
function update_blog_details( $blog_id, $details = array() ) { 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; }