allow_subdirectory_install()
最后更新于:2021-11-25 19:47:19
allow_subdirectory_install()Allow subdirectory installation.
响应
(bool) Whether subdirectory installation is allowed
源文件
文件: gc-admin/includes/network.php
function allow_subdirectory_install() {
global $gcdb;
/**
* 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.
*/
if ( apply_filters( 'allow_subdirectory_install', false ) ) {
return true;
}
if ( defined( 'ALLOW_SUBDIRECTORY_INSTALL' ) && ALLOW_SUBDIRECTORY_INSTALL ) {
return true;
}
$post = $gcdb->get_row( "SELECT ID FROM $gcdb->posts WHERE post_date < DATE_SUB(NOW(), INTERVAL 1 MONTH) AND post_status = 'publish'" );
if ( empty( $post ) ) {
return true;
}
return false;
}