Retrieves the current site ID.
function get_current_blog_id() {
global $blog_id;
return absint( $blog_id );
}
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_current_blog_id