• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「関数リファレンス/is super admin」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(英語版をコピペ。)
 
(各章のタイトルだけ和訳。)
1行目: 1行目:
== Description ==
+
<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.
  
== Usage ==
+
<div id="Usage">
 
+
== 使用法 ==
%%% <?php is_super_admin( $user_id ); ?> %%%
+
</div>
 
+
<?php is_super_admin( $user_id ); ?> %%%
== Parameters ==
+
  
 +
<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.}}
  
== Returns ==
+
<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.}}
  
== Example ==
+
<div id="Examples">
 
+
== ==
 +
</div>
 
<pre>
 
<pre>
 
<?php
 
<?php
30行目: 35行目:
 
</pre>
 
</pre>
  
== Changelog ==
+
<div id="Change Log">
 
+
== 改訂履歴 ==
Since: [[Version 3.0|WordPress 3.0.0]]
+
</div>
 
+
[[Version 3.0]] にて導入されました。
== Source Code ==
+
  
 +
<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}}.
  
== Related ==
+
<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.


最新英語版: WordPress Codex » Function_Reference/is super admin最新版との差分


関数リファレンステンプレートタグ目次もご覧ください。