can_edit_network( int $site_id )
Whether or not we can edit this network from this page.
描述
By default editing of network is restricted to the Network Admin for that $site_id
this allows for this to be overridden.
参数
- $site_id
-
(int)
(Required)
The network/site ID to check.
返回值
(bool) True if network can be edited, otherwise false.
源代码
File: wp-admin/includes/ms.php
function can_edit_network( $site_id ) {
global $wpdb;
if ( $site_id == $wpdb->siteid )
$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 $site_id The network/site ID to check.
*/
return apply_filters( 'can_edit_network', $result, $site_id );
}
更新日志
Version | 描述 |
---|---|
3.1.0 | Introduced. |
相关函数
Uses
-
wp-admin/includes/ms.php:
can_edit_network -
wp-includes/plugin.php:
apply_filters()
Used By
-
wp-admin/includes/class-wp-ms-users-list-table.php:
WP_MS_Users_List_Table::column_blogs()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数get_author_template()用法示例
- wordpress函数get_author_name()用法示例
- wordpress函数get_author_posts_url()用法示例
- wordpress函数get_author_rss_link()用法示例
- wordpress函数get_author_feed_link()用法示例
- wordpress函数get_author_link()用法示例
- wordpress函数get_attachment_taxonomies()用法示例
- wordpress函数get_attachment_template()用法示例
- wordpress函数get_attachment_innerHTML()用法示例
- wordpress函数get_attachment_link()用法示例
- wordpress函数get_attachment_icon_src()用法示例
- wordpress函数get_attachment_icon()用法示例
- wordpress函数get_attached_media()用法示例
- wordpress函数get_attachment_fields_to_edit()用法示例
如有疑问,请前往问答中心反馈!
反馈