この記事は最後に更新してから1年以上経過しています。

LevelとCapability

説明

プラグインやテーマの管理ページを作成する際など、ユーザのレベルと権限を確認することがある。ここでは、権限グループ別のレベルと権限の有無を整理してみた。 WordPress 3.1の権限グループ別の所有権限は次の通り。
権限グループ管理者
administrator
編集者
editor
投稿者
author
寄稿者
contributor
購読者
subscriber
レベル107210
テーマの変更'switch_themes'    
テーマの編集'edit_themes'    
プラグインの有効化'activate_plugins'    
プラグインの編集'edit_plugins'    
ユーザーの編集'edit_users'    
ファイルの編集'edit_files'    
設定の管理'manage_options'    
インポート'import'    
コメントの承認'moderate_comments'   
カテゴリーの管理'manage_categories'   
リンクの管理'manage_links'   
フィルターなしのHTML'unfiltered_html'   
他のユーザの記事の編集'edit_others_posts'   
ページの編集'edit_pages'   
投稿された記事の編集'edit_published_posts'  
ファイルアップロード'upload_files'  
記事の投稿'publish_posts'  
記事の編集'edit_post' 
閲覧'read'
なお権限グループ別のレベルと権限は、WordPressのバージョンによって差異があるので、/wp-admin/includes/schema.phpで確認するとよい。

最終更新 : 2024年04月24日 00:00


お勧め

wp_print_inline_script_tag(2021年4月19日 更新)

void wp_print_inline_script_tag( string $javascript [ , array $attributes = array() ] )
インラインJavaScriptを含むscript要素を出力する。

register_rest_route(2022年8月17日 更新)

bool register_rest_route( string $namespace, string $route [ , array $args = array() [ , bool $override = false ] ] )
REST APIのルートを登録する。

wp_determine_option_autoload_value(2024年7月22日 更新)

string wp_determine_option_autoload_value( string $option, mixed $value, mixed $serialized_value, boo l |string $autoload )
自動ロードのトリガー値を取得する。

single_tag_title(2018年5月27日 更新)

string single_tag_title( [ string $prefix = '' [ , bool $display = true ] ] )
投稿タグアーカイブページの投稿タグ名を取得し、パラメータ$displayがtrueならば表示する。$displayがfalseの場合は、文字列として返す。

home_url(2023年3月31日 更新)

string home_url( [ string $path = '' [ , string $scheme = null ] ] )
現在のブログ(サイト)のホームURLを取得する。ホームURLは、管理者ページの「設定」-「一般」の「サイトのアドレス(URL)」のこと。