check_import_new_users()
check_import_new_users( string $permission )
检查当前用户是否具有导入新用户的权限。
Checks if the current user has permissions to import new users.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$permission | (string) | 必需 | 要检查的权限。当前未使用。 |
返回(Return)
(bool)如果用户有适当的权限,则为True;如果没有权限,则为false。
源码(Source)
/** * Checks if the current user has permissions to import new users. * * @since 3.0.0 * * @param string $permission A permission to be checked. Currently not used. * @return bool True if the user has proper permissions, false if they do not. */ function check_import_new_users( $permission ) { if ( !is_super_admin() ) return false; return true; } // See "import_allow_fetch_attachments" and "import_attachment_size_limit" filters too.
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.0.0 | wp-admin/includes/ms.php:623 | 0 | 1 function |
check_import_new_users() 为WP2原创文章,链接:https://www.wp2.cn/functions/check_import_new_users/