WP_Network::_set_site_name()privateWP 4.4.0

Sets the site name assigned to the network if one has not been populated.

Method of the class: WP_Network{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->_set_site_name();

Changelog

Since 4.4.0 Introduced.

WP_Network::_set_site_name() code WP 6.5.2

private function _set_site_name() {
	if ( ! empty( $this->site_name ) ) {
		return;
	}

	$default         = ucfirst( $this->domain );
	$this->site_name = get_network_option( $this->id, 'site_name', $default );
}