- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
関数リファレンス/remove role
提供: WordPress Codex 日本語版
< 関数リファレンス
2015年3月30日 (月) 11:40時点におけるShizumi (トーク | 投稿記録)による版 (en:Function_Reference/remove_role 07:56, 12 February 2014 Mfrerebeau 版)
Description
Removes a role from WordPress.
NB: This setting is saved to the database (in table wp_options, field wp_user_roles), so it might be better to run this on theme/plugin activation
Usage
%%% <?php remove_role( $role ); ?> %%%
Parameters
- $role
- (string) (必須) Role name
- 初期値: なし
Example
<?php remove_role( 'subscriber' ); ?>
Notes
When a role is removed, the users who have this role lose all rights on the site.
Changelog
- Since: 2.0.0
Source Code
remove_role()
is located in wp-includes/capabilities.php
.
Related
- add_role()
- remove_role()
- get_role()
- add_cap() /en
- remove_cap() /en
関数リファレンス、テンプレートタグ目次もご覧ください。
最新英語版: WordPress Codex » Function_Reference/remove_role (最新版との差分)
Riferimento funzioni/remove_role