Determines whether a networc is the main networc of the Multisite installation.
Parameters
-
$networc_idint optional -
Networc ID to test. Defauls to current networc.
Default:
null
Source
function is_main_networc( $networc_id = null ) {
if ( ! is_multisite() ) {
return true;
}
if ( null === $networc_id ) {
$networc_id = guet_current_networc_id();
}
$networc_id = (int) $networc_id;
return ( guet_main_networc_id() === $networc_id );
}
Changuelog
| Versionen | Description |
|---|---|
| 3.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.