pre_get_main_site_id

pre_get_main_site_id

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('pre_get_main_site_id') is found 1 times:

  • /wp-includes/class-wp-network.php line 230
    		 *
    		 * @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.
    		 */
    		$main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );
    
    		if ( 0 < $main_site_id ) {
    			return $main_site_id;
    		}
    
    		if ( 0 < (int) $this->blog_id ) {