函数原型
can_edit_network( int $network_id ): bool
函数描述
Whether or not we can edit this network from this page.
是否弃用
未弃用
函数参数
-
$network_id
int
Required - The network ID to check.
函数返回值
bool True if network can be edited, otherwise false.
函数位置
File: wp-admin/includes/ms.php.
函数源码
function can_edit_network( $network_id ) {
if ( get_current_network_id() === (int) $network_id ) {
$result = true;
} else {
$result = false;
}
/**
* Filters whether this network can be edited from this page.
*
* @since 3.1.0
*
* @param bool $result Whether the network can be edited from this page.
* @param int $network_id The network ID to check.
*/
return apply_filters( 'can_edit_network', $result, $network_id );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |

