Filter hook 'pre_get_main_site_id'

in WP Core File wp-includes/class-wp-network.php at line 230

Description

Filters the main site ID. Returning a positive integer will effectively short-circuit the function.

Occurrences

Filename Line Number
wp-includes/class-wp-network.php 230

Parameters

Type Name Description
int|null $main_site_id If a positive integer is returned, it is interpreted as the main site ID.
WP_Network $network The network object for which the main site was detected.

PHP Doc

/**
		 * Filters the main site ID.
		 *
		 * Returning a positive integer will effectively short-circuit the function.
		 *
		 * @since 4.9.0
		 *
		 * @param int|null   $main_site_id If a positive integer is returned, it is interpreted as the main site ID.
		 * @param WP_Network $network      The network object for which the main site was detected.
		 */