can_edit_network
函数
can_edit_network ( $network_id )
- 参数
-
-
(int)
$network_id
The network ID to check.- Required: 是
-
(int)
- 返回值
-
- (bool) True if network can be edited, otherwise false.
- 定义位置
-
-
wp-admin/includes/ms.php
, line 806
-
wp-admin/includes/ms.php
- 引入
- 3.1.0
- 弃用
- –
Whether or not we can edit this network from this page.
By default editing of network is restricted to the Network Admin for that `$network_id`.
This function allows for this to be overridden.
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 ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。