Filter hook 'allow_subdirectory_install'

in WP Core File wp-admin/includes/network.php at line 65

View Source

allow_subdirectory_install

Filter Hook
Description
Filters whether to enable the subdirectory installation feature in Multisite.

Hook Information

File Location wp-admin/includes/network.php View on GitHub
Hook Type Filter
Line Number 65

Hook Parameters

Type Name Description
bool $allow Whether to enable the subdirectory installation feature in Multisite. Default false.

Usage Examples

Basic Usage
<?php
// Hook into allow_subdirectory_install
add_filter('allow_subdirectory_install', 'my_custom_filter', 10, 1);

function my_custom_filter($allow) {
    // Your custom filtering logic here
    return $allow;
}

Source Code Context

wp-admin/includes/network.php:65 - How this hook is used in WordPress core
<?php
  60  	 * @since 3.0.0
  61  	 *
  62  	 * @param bool $allow Whether to enable the subdirectory installation feature in Multisite.
  63  	 *                    Default false.
  64  	 */
  65  	if ( apply_filters( 'allow_subdirectory_install', false ) ) {
  66  		return true;
  67  	}
  68  
  69  	if ( defined( 'ALLOW_SUBDIRECTORY_INSTALL' ) && ALLOW_SUBDIRECTORY_INSTALL ) {
  70  		return true;

PHP Documentation

<?php
/**
	 * Filters whether to enable the subdirectory installation feature in Multisite.
	 *
	 * @since 3.0.0
	 *
	 * @param bool $allow Whether to enable the subdirectory installation feature in Multisite.
	 *                    Default false.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/network.php
Related Hooks

Related hooks will be displayed here in future updates.