WordPress开发函数allow_subdirectory_install()

WordPress开发函数allow_subdirectory_install(),允许安装子目录。

用法:

allow_subdirectory_install()

返回

(bool) 是否允许子目录安装

来源:

文件: wp-admin/includes/network.php

function allow_subdirectory_install() {

global $wpdb;

/**

* 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 = $wpdb->get_row( “SELECT ID FROM $wpdb->posts WHERE post_date < DATE_SUB(NOW(), INTERVAL 1 MONTH) AND post_status = ‘publish'” );

if ( empty( $post ) ) {

return true;

}

return false;

}

更新日志:

WordPress开发函数allow_subdirectory_install() (https://www.wp-admin.cn/) WordPress开发教程 第1张

相关推荐

发表回复

房先生
我们将24小时内回复。
2024-07-21 21:12:45
您好,有任何疑问请与我们联系!
您的工单我们已经收到,我们将会尽快跟您联系!
[QQ客服]
2781198
加我微信
[电话联系]
13585372227
[电子邮件]
chaoneo@163.com
取消

选择聊天工具: