pre_get_main_site_id

Advertisement

Summery Summery

Filters the main site ID.

Syntax Syntax

apply_filters( 'pre_get_main_site_id', int|null $main_site_id, WP_Network $network )

Description Description

Returning a positive integer will effectively short-circuit the function.

Parameters Parameters

$main_site_id

(int|null) If a positive integer is returned, it is interpreted as the main site ID.

$network

(WP_Network) The network object for which the main site was detected.

Source Source

File: wp-includes/class-wp-network.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.