W3cubDocs

/WordPress

WP_User::get_site_id(): int

Gets the ID of the site for which the user’s capabilities are currently initialized.

Return

int Site ID.

Source

public function get_site_id() {
	return $this->site_id;
}

Changelog

Version Description
4.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user/get_site_id