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

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

「関数リファレンス/get role」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(en:Function_Reference/get_role 09:52, 3 December 2013‎ Mistercat 版)
(相違点なし)

2015年3月30日 (月) 12:08時点における版

Description

Fetch a Role definition.

Usage

%%% <?php get_role( $role ); ?> %%%

Parameters

role
string) (必須) role name
初期値: なし

Returns

(mixed) 
Returns a WP_Role object on success, null on failure.

Sample Returned Object

WP_Role Object
(
    [name] => administrator
    [capabilities] => Array
        (
            [switch_themes] => 1
            [edit_themes] => 1
            [activate_plugins] => 1
            [edit_plugins] => 1
            [edit_users] => 1
            [edit_files] => 1
            [manage_options] => 1
            [moderate_comments] => 1
            [manage_categories] => 1
            [manage_links] => 1
            [upload_files] => 1
            [import] => 1
            [unfiltered_html] => 1
            [edit_posts] => 1
            [edit_others_posts] => 1
            [edit_published_posts] => 1
            [publish_posts] => 1
            [edit_pages] => 1
            [read] => 1
            [level_10] => 1
            [level_9] => 1
            [level_8] => 1
            [level_7] => 1
            [level_6] => 1
            [level_5] => 1
            [level_4] => 1
            [level_3] => 1
            [level_2] => 1
            [level_1] => 1
            [level_0] => 1
            [edit_others_pages] => 1
            [edit_published_pages] => 1
            [publish_pages] => 1
            [delete_pages] => 1
            [delete_others_pages] => 1
            [delete_published_pages] => 1
            [delete_posts] => 1
            [delete_others_posts] => 1
            [delete_published_posts] => 1
            [delete_private_posts] => 1
            [edit_private_posts] => 1
            [read_private_posts] => 1
            [delete_private_pages] => 1
            [edit_private_pages] => 1
            [read_private_pages] => 1
            [delete_users] => 1
            [create_users] => 1
            [unfiltered_upload] => 1
            [edit_dashboard] => 1
            [update_plugins] => 1
            [delete_plugins] => 1
            [install_plugins] => 1
            [update_themes] => 1
            [install_themes] => 1
            [update_core] => 1
            [list_users] => 1
            [remove_users] => 1
            [add_users] => 1
            [promote_users] => 1
            [edit_theme_options] => 1
            [delete_themes] => 1
            [export] => 1
            [edit_comment] => 1
            [approve_comment] => 1
            [unapprove_comment] => 1
            [reply_comment] => 1
            [quick_edit_comment] => 1
            [spam_comment] => 1
            [unspam_comment] => 1
            [trash_comment] => 1
            [untrash_comment] => 1
            [delete_comment] => 1
            [edit_permalink] => 1
        )
)

Example

Notes

Changelog

Source Code

get_role() is located in wp-includes/capabilities.php.

Related

権限グループと権限:



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

最新英語版: WordPress Codex » Function_Reference/get_role最新版との差分