- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「関数リファレンス/is super admin」の版間の差分
提供: WordPress Codex 日本語版
< 関数リファレンス
(英語版をコピペ。) |
(各章のタイトルだけ和訳。) |
||
1行目: | 1行目: | ||
− | = | + | <div id="Description"> |
− | + | == 説明 == | |
+ | </div> | ||
Determine if user is a network (super) admin. | Determine if user is a network (super) admin. | ||
Will also check if user is admin if network mode is disabled. | Will also check if user is admin if network mode is disabled. | ||
− | = | + | <div id="Usage"> |
− | + | == 使用法 == | |
− | + | </div> | |
− | + | <?php is_super_admin( $user_id ); ?> %%% | |
− | + | ||
+ | <div id="Parameters"> | ||
+ | == パラメーター == | ||
+ | </div> | ||
{{Parameter|$user_id|integer|The ID of a user.|optional|Defaults to the current user.}} | {{Parameter|$user_id|integer|The ID of a user.|optional|Defaults to the current user.}} | ||
− | = | + | <div id="Returns"> |
− | + | == 戻り値 == | |
+ | </div> | ||
{{Return||boolean|True if the user is network (super) admin. Also returns True if network mode is disabled and the user is an admin.}} | {{Return||boolean|True if the user is network (super) admin. Also returns True if network mode is disabled and the user is an admin.}} | ||
− | == | + | <div id="Examples"> |
− | + | == 例 == | |
+ | </div> | ||
<pre> | <pre> | ||
<?php | <?php | ||
30行目: | 35行目: | ||
</pre> | </pre> | ||
− | == | + | <div id="Change Log"> |
− | + | == 改訂履歴 == | |
− | + | </div> | |
− | + | [[Version 3.0]] にて導入されました。 | |
− | + | ||
+ | <div id="Source File"> | ||
+ | == ソースファイル == | ||
+ | </div> | ||
<code>is_super_admin()</code> is located in {{Trac|wp-includes/capabilities.php}}. | <code>is_super_admin()</code> is located in {{Trac|wp-includes/capabilities.php}}. | ||
− | = | + | <div id="Related"> |
+ | == 関連項目 == | ||
+ | </div> | ||
* Reference: [[Roles and Capabilities]] | * Reference: [[Roles and Capabilities]] | ||
* Action: [[Plugin_API/Action_Reference/grant_super_admin|grant_super_admin]] | * Action: [[Plugin_API/Action_Reference/grant_super_admin|grant_super_admin]] | ||
46行目: | 55行目: | ||
* Function: [[Function_Reference/revoke_super_admin|revoke_super_admin()]] | * Function: [[Function_Reference/revoke_super_admin|revoke_super_admin()]] | ||
* Function: [[Function_Reference/is_super_admin|is_super_admin()]] | * Function: [[Function_Reference/is_super_admin|is_super_admin()]] | ||
+ | |||
+ | |||
+ | {{原文|Function_Reference/is super admin|140945}}<!-- 23:59, February 2, 2014 Djkaz 版 --> | ||
+ | |||
[[Category:Actions]] | [[Category:Actions]] |
2014年2月3日 (月) 00:03時点における版
Determine if user is a network (super) admin. Will also check if user is admin if network mode is disabled.
使用法
<?php is_super_admin( $user_id ); ?> %%%
パラメーター
- $user_id
- (integer) (optional) The ID of a user.
- 初期値: Defaults to the current user.
戻り値
- (boolean)
- True if the user is network (super) admin. Also returns True if network mode is disabled and the user is an admin.
例
<?php //Removes the "Edit" menu for users who are not Super Admins of a multisite network if ( !is_super_admin() ) { add_action( 'admin_init', 'my_remove_edit_menu' ); } function my_remove_edit_menu() { remove_menu_page('edit.php'); } ?>
改訂履歴
Version 3.0 にて導入されました。
ソースファイル
is_super_admin()
is located in wp-includes/capabilities.php
.
関連項目
- Reference: Roles and Capabilities
- Action: grant_super_admin
- Action: revoke_super_admin
- Function: get_super_admins()
- Function: grant_super_admin()
- Function: revoke_super_admin()
- Function: is_super_admin()
最新英語版: WordPress Codex » Function_Reference/is super admin (最新版との差分)
関数リファレンス、テンプレートタグ目次もご覧ください。