register_post_type

Sponsored Link

投稿タイプを作成または変更します。 initの前にregister_post_typeを使用しないでください。

Sponsored Link

Create or modify a post type. Do not use register_post_type before init.

タクソノミー

あらゆる方法で、常に投稿タイプを登録する時にタクソノミーの引数を使用しているタクソノミーを登録することに、注意することが重要です。さもなければ、予期しない結果や故障の原因になり、parse_queryやpre_get_postsのようなフィルターを使用している時に接続と認識されないでしょう。

It’s important to note, that you should in every way, always register your taxonomies using the taxonomies argument when you register your post type. Else they won’t get recognized as connected when using filters like parse_query or pre_get_posts, which can lead to unexpected results and failure.

投稿タイプを予約する

次の投稿タイプは、既にWordPressによって使用され予約されています。

The following post types are reserved and used by WordPress already.

  • post
  • page
  • attachment
  • revision
  • nav_menu_item

詳細情報:投稿タイプ

More information: Post Types.

register_post_typeのファンクションタグ使用方法

<?php register_post_type( $post_type, $args ) ?>

register_post_typeのパラメーター

$post_type

(string) (required)投稿タイプ。(最大20文字、大文字やスペースを含めることはできません)
デフォルト:なし

(string) (required) Post type. (max. 20 characters, can not contain capital letters or spaces)
Default: None

$args

(array) (optional) 引数の配列。
デフォルト:なし

(array) (optional) An array of arguments.
Default: None

引数

label

(string) (optional) 翻訳用のためにマークされた投稿タイプの複数の記述名。
デフォルト: $post_type

(string) (optional) A plural descriptive name for the post type marked for translation.
Default: $post_type

labels

(array) (optional) labels – この投稿タイプのためのラベルの配列です。デフォルトでは投稿ラベルは1階層のためのページラベルと非階層タイプのために使用されます。デフォルト;空の場合、名前はラベル値に設定されており、singular_nameは名前の値に設定されています。

(array) (optional) labels – An array of labels for this post type. By default post labels are used for non-hierarchical types and page labels for hierarchical ones.
Default: if empty, name is set to label value, and singular_name is set to name value

  • ‘name’ – 投稿タイプの一般的な名前、通常は複数形です。同じように$post_type_object->labelによって無効になります。
  • ‘singular_name’ – この投稿タイプの1つのオブジェクトの名前。デフォルトは名前の値。
  • ‘menu_name’ – メニュー名のテキスト。この文字列は、メニュー項目に付ける名前です。デフォルトは、名前の値です。
  • ‘all_items’ – メニューに使用されているすべてのアイテムテキストです。デフォルトでは、名前のラベルです。
  • add_new’ – 新しいテキスト。デフォルトでは、階層と非階層の両方のタイプの新規追加します。この文字列を国際化するときに、投稿タイプに一致するテキストの文脈を取得を使用してください。例: _x(‘Add New’, ‘product’);
  • ‘add_new_item’ – 新しいアイテムテキストを追加します。デフォルトは、新しい投稿/新しいページを追加します。
  • ‘edit_item’ – アイテムテキストを編集。デフォルトでは、投稿を編集/ページを編集です。
  • ‘new_item’ – 新しいアイテムテキストです。デフォルトは、新しい投稿/新しいページです。
  • ‘view_item’ – アイテムのテキストを見る。デフォルトは、投稿を見る/ページを見るです。
  • ‘search_items’ – アイテムテキストを検索。デフォルトは、投稿を検索/ページを検索です。
  • ‘not_found’ – テキストを見つかりません。デフォルトは、投稿が見つかりません/ページが見つかりませんです。
  • ‘not_found_in_trash’ – ゴミ箱のテキストに見つかりません。デフォルトは、投稿はゴミ箱に見つかりません/ページはゴミ箱に見つかりませんです。
  • ‘parent_item_colon’ – 親のテキスト。この文字列は、非階層的なタイプでは使用されません。階層的には1つは、デフォルトは親ページです。
  • ‘name’ – general name for the post type, usually plural. The same as, and overridden by $post_type_object->label
  • ‘singular_name’ – name for one object of this post type. Defaults to value of name
  • ‘add_new’ – the add new text. The default is Add New for both hierarchical and non-hierarchical types. When internationalizing this string, please use a gettext context matching your post type.

    : _x(‘Add New’, ‘product’);

  • ‘all_items’ – the all items text used in the menu. Default is the Name label
  • ‘add_new_item’ – the add new item text. Default is Add New Post/Add New Page
  • ‘edit_item’ – the edit item text. Default is Edit Post/Edit Page
  • ‘new_item’ – the new item text. Default is New Post/New Page
  • ‘view_item’ – the view item text. Default is View Post/View Page
  • ‘search_items’ – the search items text. Default is Search Posts/Search Pages
  • ‘not_found’ – the not found text. Default is No posts found/No pages found
  • ‘not_found_in_trash’ – the not found in trash text. Default is No posts found in Trash/No pages found in Trash
  • ‘parent_item_colon’ – the parent text. This string isn’t used on non-hierarchical types. In hierarchical ones the default is Parent Page
  • ‘menu_name’ – the menu name text. This string is the name to give menu items. Defaults to value of name

description

(string) (optional) 投稿タイプが何であるかの短い要約説明。
デフォルト:空白

(string) (optional) A short descriptive summary of what the post type is.
Default: blank

public

(boolean) (optional) 投稿タイプが管理者インターフェースを介してフロントエンドユーザーに公に使用されることを意図しているかどうか。
デフォルト:false

(boolean) (optional) Whether a post type is intended to be used publicly either via the admin interface or by front-end users.
Default: false

  • ‘false’ – 投稿タイプは公共で使用される事を対象としており、通常wp-adminで利用できず、フロントエンドで無い限り明示的に別の場所に対して計画されます。
  • ‘true’ – 投稿タイプは公共利用を対象としています。これはフロントエンド上とwp-admin内で含まれています。
  • ‘false’ – Post type is not intended to be used publicly and should generally be unavailable in wp-admin and on the front end unless explicitly planned for elsewhere.
  • ‘true’ – Post type is intended for public use. This includes on the front end and in wp-admin.

注:exclude_from_search、publicly_queryable、show_ui、そしてshow_in_nav_menusのデフォルト設定は、公共から継承されていますが、それぞれがこの関係に依存しておらず、非常に具体的な目的を制御しています。

Note: While the default settings of exclude_from_search, publicly_queryable, show_ui, and show_in_nav_menus are inherited from public, each does not rely on this relationship and controls a very specific intention.

exclude_from_search

(boolean) (importance) フロントエンドの検索結果からこの投稿タイプで投稿を除外するかどうか。
デフォルト:パブリック引数の反対の値

(boolean) (importance) Whether to exclude posts with this post type from front end search results.
Default: value of the opposite of the public argument

  • ‘true’ – site/?s=search-term は、この投稿タイプの投稿に含まれていません。
  • ‘false’ – site/?s=search-term は、この投稿タイプの投稿に含まれています。
  • ‘true’ – site/?s=search-term will not include posts of this post type.
  • ‘false’ – site/?s=search-term will include posts of this post type.

注:タクソノミーのタームに関連付けられている投稿リストを表示したい場合、falseにexclude_from_searchを設定する必要があります(例:site_domaine/?taxonomy_slug=term_slug または、site_domaine/taxonomy_slug/term_slugを呼び出すため)。trueに設定した場合、タクソノミーページ(例:taxonomy.php)のWordPress上では、記事及び/またはページネーションが404 errorになり見つけることができません…

Note: If you want to show the posts’s list that are associated to taxonomy’s terms, you must set exclude_from_search to false (ie : for call site_domaine/?taxonomy_slug=term_slug or site_domaine/taxonomy_slug/term_slug). If you set to true, on the taxonomy page (ex: taxonomy.php) worpress will not find your posts and/or pagination will make 404 error…

publicly_queryable

(boolean) (optional)クエリーがparse_request()の一部としてフロントエンド上で実行できるかどうか。
デフォルト:パブリック引数の値

(boolean) (optional) Whether queries can be performed on the front end as part of parse_request().
Default: value of public argument

注:影響を受けるクエリーは次のものが含まれます(書き換えが処理される時も起動します)

Note: The queries affected include the following (also initiated when rewrites are handled)

  • ?post_type={post_type_key}
  • ?{post_type_key}={single_post_slug}
  • ?{post_type_query_var}={single_post_slug}

注:FALSEにこれを設定した場合。カスタム投稿をプレビュー/表示することができないということが分かります(404を返します)。

Note: If you set this to FALSE, you will find that you cannot preview/see your custom post (return 404).

show_ui

(boolean) (optional)管理者にこの投稿タイプを管理するためのデフォルトのUIを生成するかどうか。
デフォルト:パブリック引数の値

(boolean) (optional) Whether to generate a default UI for managing this post type in the admin.
Default: value of public argument

  • ‘false’ – この投稿タイプのユーザーインターフェイスを表示しない
  • ‘true’ – この投稿タイプのユーザーインターフェイス(管理パネル)が表示されます。
  • ‘false’ – do not display a user-interface for this post type
  • ‘true’ – display a user-interface (admin panel) for this post type

注:_built-in投稿タイプ、投稿やページのように、意図的にfalseに設定されていることに注意してください。

Note: _built-in post types, such as post and page, are intentionally set to false.

show_in_menu

(boolean or string) (optional) 管理メニュー内に投稿タイプを表示するかどうかと、メニューをどこに表示するか。show_uiがtrueにならなければならないことに注意してください・
デフォルト:null

(boolean or string) (optional) Whether to show the post type in the admin menu and where to show that menu. Note that show_ui must be true.
Default: null

  • ‘false’ – 管理メニュー内に表示しません。
  • ‘true’ – トップレベルメニューとして表示します。
  • ‘some string’ – ‘tools.php’ あるいは ‘edit.php?post_type=page’のようなトップレベルページ
  • ‘false’ – do not display in the admin menu
  • ‘true’ – display as a top level menu
  • ‘some string’ – a top level page like ‘tools.php’ or ‘edit.php?post_type=page’

注:プラグインによって作成されたメニューページのサブメニューとして表示するために’some string’ を使用するとき、このアイテムは最初のサブメニューアイテムになり、トップレベルリンクの場所を置き換えます。これが望ましくない場合、メニューページを作成するプラグインがadmin_menu9以下にadd_actionを優先順位に設定する必要があります。

Note: When using ‘some string’ to show as a submenu of a menu page created by a plugin, this item will become the first submenu item, and replace the location of the top level link. If this isn’t desired, the plugin that creates the menu page needs to set the add_action priority for admin_menu to 9 or lower.

menu_position

(integer) (optional) 投稿タイプが表示すべきメニュー順序内の位置です。
デフォルト:null – デフォルトは下記のコメントです。

(integer) (optional) The position in the menu order the post type should appear.
Default: null – defaults to below Comments

  • 5 – below Posts
  • 10 – below Media
  • 15 – below Links
  • 20 – below Pages
  • 25 – below comments
  • 60 – below first separator
  • 65 – below Plugins
  • 70 – below Users
  • 75 – below Tools
  • 80 – below Settings
  • 100 – below second separator

menu_icon

(string) (optional) このメニューに使用されるアイコンへのURLです。
デフォルト:null -デフォルトでは投稿アイコンです。

(string) (optional) The url to the icon to be used for this menu.
Default: null – defaults to the posts icon

capability_type

(string or array) (optional) 読取、編集、削除機能を構築するために使用する文字列です。例えばarray(‘story’, ‘stories’)のように機能を生成するための基準としてこの引数を使用する場合は、複数形を代替するための許可をするために配列として渡すことができます。デフォルトによっては、the capability_typeは機能を生成するための基準通して使用します。
デフォルト:”post”

(string or array) (optional) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities, e.g. array(‘story’, ‘stories’). By default the capability_type is used as a base to construct capabilities.
Default: “post”

capabilities

(array) (optional) この投稿タイプの機能の配列です。
デフォルト:capability_typeは構築するために使用されています。

(array) (optional) An array of the capabilities for this post type.
Default: capability_type is used to construct

デフォルトでは、7つのキーは、機能の配列の一部として受け入れられています。

By default, seven keys are accepted as part of the capabilities array:

  • edit_post, read_post, and delete_post – これら3つはメタ機能で、文脈に応じて、初期の機能に対応するために一般的に計画されています。例えば、投稿が編集/読み込み/削除してユーザーあるいは役割がチェックされていました。したがって、これらの機能は一般的にユーザーまたは役割に直接付与する必要はありません。
  • edit_posts – この投稿タイプが編集出来るオブジェクトかどうかを制御します。
  • edit_others_posts – 他のユーザーが編集出来ることによって、所有していたこのタイプのオブジェクトかどうかを制御します。著者をサポートしない投稿タイプの場合、edit_postsのように動作します。
  • publish_posts – この投稿タイプの公開しているオブジェクトを制御します。
  • read_private_posts – プライベートオブジェクトが読み込む事ができるかどうかを制御します。
  • edit_post, read_post, and delete_post – These three are meta capabilities, which are then generally mapped to corresponding primitive capabilities depending on the context, for example the post being edited/read/deleted and the user or role being checked. Thus these capabilities would generally not be granted directly to users or roles.
  • edit_posts – Controls whether objects of this post type can be edited.
  • edit_others_posts – Controls whether objects of this type owned by other users can be edited. If the post type does not support an author, then this will behave like edit_posts.
  • publish_posts – Controls publishing objects of this post type.
  • read_private_posts – Controls whether private objects can be read.

注:これらの最後の4つの初期機能は、様々な場所でコアにチェックされます。

Note: those last four primitive capabilities are checked in core in various locations.

map_meta_cap()を覗いて、コアに直接参照されていない7つの他の初期機能もあります。コンテキストに応じて、3つのメタ機能を取得して、ユーザーまたは役割に違反してチェックしなければならない1つ以上の初期機能にそれらを変換します。これらの追加機能は、map_meta_cap()で使用する場合のみです。したがって、投稿タイプがtrue(デフォルトはfalse)に設定された’map_meta_cap’引数に登録されている場合、デフォルトで割り当てられています。

There are also seven other primitive capabilities which are not referenced directly in core, except in map_meta_cap(), which takes the three aforementioned meta capabilities and translates them into one or more primitive capabilities that must then be checked against the user or role, depending on the context. These additional capabilities are only used in map_meta_cap(). Thus, they are only assigned by default if the post type is registered with the ‘map_meta_cap’ argument set to true (default is false).

  • read – この投稿タイプが読み込みすることが出来るオブジェクトかどうかを制御します。
  • delete_posts – この投稿タイプが読み込みすることが出来るオブジェクトかどうかを制御します。
  • delete_private_posts – プライベートオブジェクトが削除できるかどうかを制御します。
  • delete_published_posts – 公開済みオブジェクトが削除できるかどうかを制御します。
  • delete_others_posts – 他のユーザーが所有するオブジェクトが削除出来るかどうかを制御します。投稿タイプが著者のサポートをしていない場合、delete_postsのように動作します。
  • edit_private_posts – プライベートオブジェクトが編集できるかどうかを制御します。
  • edit_published_posts – 公開済みオブジェクトが編集できるかどうかを制御します。
  • read – Controls whether objects of this post type can be read.
  • delete_posts – Controls whether objects of this post type can be deleted.
  • delete_private_posts – Controls whether private objects can be deleted.
  • delete_published_posts – Controls whether published objects can be deleted.
  • delete_others_posts – Controls whether objects owned by other users can be can be deleted. If the post type does not support an author, then this will behave like delete_posts.
  • edit_private_posts – Controls whether private objects can be edited.
  • edit_published_posts – Controls whether published objects can be edited.

map_meta_cap

(boolean) (optional) 内部のデフォルトのメタ機能の処理を使用するかどうか。
デフォルト: false

(boolean) (optional) Whether to use the internal default meta capability handling.
Default: false

hierarchical

(boolean) (optional)投稿タイプが階層構造になっているか。 親を指定することができます。
デフォルト: false

(boolean) (optional) Whether the post type is hierarchical. Allows Parent to be specified.
Default: false

supports

(array) (optional) add_post_type_support() を直接呼び出すための別名。
デフォルト:title と editor

(array) (optional) An alias for calling add_post_type_support() directly.
Default: title and editor

  • ‘title’
  • ‘editor’ (content)
  • ‘author’
  • ‘thumbnail’ (featured image, current theme must also support post-thumbnails)
  • ‘excerpt’
  • ‘trackbacks’
  • ‘custom-fields’
  • ‘comments’ (また、編集画面でコメント数のバルーンが表示されます)
  • ‘revisions’ (リビジョンを格納します。)
  • ‘page-attributes’ (メニューの順序、階層構造は、親のオプションを表示するためにtrueでなければならない)
  • ‘post-formats’ は投稿フォーマットを追加し、投稿フォーマットを参照してください。
  • ‘title’
  • ‘editor’ (content)
  • ‘author’
  • ‘thumbnail’ (featured image, current theme must also support post-thumbnails)
  • ‘excerpt’
  • ‘trackbacks’
  • ‘custom-fields’
  • ‘comments’ (also will see comment count balloon on edit screen)
  • ‘revisions’ (will store revisions)
  • ‘page-attributes’ (menu order, hierarchical must be true to show Parent option)
  • ‘post-formats’ add post formats, see Post Formats

register_meta_box_cb

(string) (optional) 編集フォームのメタボックスを設定する時に呼び出されるコールバック関数を提供します。remove_meta_box() と add_meta_box() はコールバック内で呼び出してください。
デフォルト:なし

(string) (optional) Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback.
Default: None

taxonomies

(array) (optional) この投稿タイプで使用されるカテゴリーやpost_tagのようなタクソノミーを登録した配列です。これは、register_taxonomy_for_object_type() を直接呼び出す代わりに使用することができます。カスタムタクソノミーはまだregister_taxonomy()に登録する必要があります。
デフォルト:なし

(array) (optional) An array of registered taxonomies like category or post_tag that will be used with this post type. This can be use in lieu of calling register_taxonomy_for_object_type() directly. Custom taxonomies still need to be registered with register_taxonomy().
Default: None

permalink_epmask

(string) (optional) デフォルトはエンドポイントのビットマスクを書き換えます。詳細はトラックチケット12605を参照してください。
デフォルト: EP_PERMALINK

(string) (optional) The default rewrite endpoint bitmasks. For more info see Trac Ticket 12605.
Default: EP_PERMALINK

has_archive

(boolean or string) (optional) 投稿タイプのアーカイブを有効にします。アーカイブスラッグとして文字列を使用します。書き換えが有効になっている場合、適切な書き換えルールを生成します。
デフォルト:false

(boolean or string) (optional) Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.
Default: false

rewrite

(boolean or array) (optional) このフォーマットでパーマリンクを書き換えます。書き換えを防止する場合はfalse。
デフォルト:trueとスラッグとして投稿タイプを使用します。

(boolean or array) (optional) Rewrite permalinks with this format. False to prevent rewrite.
Default: true and use post type as slug

$args array
  • ‘slug’ – スラッグ付き投稿を戦闘に追加する – デフォルトでは$post_type – array( ‘slug’ => $slug )を使用するために permastructをカスタマイズします。
  • ‘with_front’ – フロントベースを先頭に追加することになるパーマリンクを許可します(例:パーマリンクの構造が/blog/である場合、あなたのリンクは: false->/news/, true->/blog/news/になるでしょう) – デフォルトはtrueです。
  • ‘feeds’ – デフォルトはhas_archiveの値です。
  • ‘pages’ – デフォルトはtrueです。
  • ‘slug’ – prepend posts with this slug – defaults to $post_type – use array( ‘slug’ => $slug ) to customize permastruct
  • ‘with_front’ – allowing permalinks to be prepended with front base (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/) – defaults to true
  • ‘feeds’ – default to has_archive value
  • ‘pages’ – defaults to true

query_var

(boolean or string) (optional) Falseはクエリーを防ぐためであり、この投稿タイプのために使用するクエリーのvarの文字列です。
デフォルト:true – $post_typeに設定します。

(boolean or string) (optional) False to prevent queries, or string value of the query var to use for this post type.
Default: true – set to $post_type

can_export

(boolean) (optional)このpost_typeをエクスポートすることができます。
デフォルト:true

(boolean) (optional) Can this post_type be exported.
Default: true

show_in_nav_menus

(boolean) (optional) post_typeは、ナビゲーションメニューで選択を利用可能にするかどうか。
デフォルト:パブリック引数の値

(boolean) (optional) Whether post_type is available for selection in navigation menus.
Default: value of public argument

  • ‘false’ – 管理メニュー内に表示しない
  • ‘true’ – トップレベルメニューとして表示する
  • ‘some string’ – ‘tools.php’または’edit.php?post_type=page’のようなトップレベルページが存在する場合、投稿タイプはそのサブメニューとして配置されます。
  • ‘false’ – do not display in the admin menu
  • ‘true’ – display as a top level menu
  • ‘some string’ – If an existing top level page such as ‘tools.php’ or ‘edit.php?post_type=page’, the post type will be placed as a sub menu of that.

注:プラグインによって作成されたメニューページのサブメニューとして表示するために’いくつかの文字列’を使用する時、このアイテムは最初のサブメニューのアイテムとなり、トップレベルリンクの場所に置き換えられます。これが望ましくない場合、メニューページを作成するためのプラグインはadmin_menu9以下にadd_action優先順位を設定する必要があります。

Note: When using ‘some string’ to show as a submenu of a menu page created by a plugin, this item will become the first submenu item, and replace the location of the top level link. If this isn’t desired, the plugin that creates the menu page needs to set the add_action priority for admin_menu to 9 or lower.

注:公共から値を継承するshow_uiからの値を継承する1つとして、決定するための最も信頼性の高い財産であるように見られます。投稿タイプが公に使用可能であることを意味しています。少なくとも_builtin投稿タイプのための動作と投稿とページを返すのみです。

Note: As this one inherits its value from show_ui, which inherits its value from public, it seems to be the most reliable property to determine, if a post type is meant to be publicly useable. At least this works for _builtin post types and only gives back post and page.

show_in_admin_bar

(boolean) (optional)WordPressの管理バーで利用できる投稿タイプにするかどうか。
デフォルト:show_in_menu引数の値

(boolean) (optional) Whether to make this post type available in the WordPress admin bar.
Default: value of the show_in_menu argument

menu_position

(integer) (optional)投稿タイプが表示されるべきメニューの順序内の位置です。show_in_menuはtrueでなければなりません。
デフォルト:null – 以下のコメントをデフォルト

(integer) (optional) The position in the menu order the post type should appear. show_in_menu must be true.
Default: null – defaults to below Comments

  • 5 – below Posts
  • 10 – below Media
  • 15 – below Links
  • 20 – below Pages
  • 25 – below comments
  • 60 – below first separator
  • 65 – below Plugins
  • 70 – below Users
  • 75 – below Tools
  • 80 – below Settings
  • 100 – below second separator

menu_icon

(string) (optional) このメニューに使用されるアイコンのURLです。
デフォルト:null – 投稿アイコンをデフォルト。

(string) (optional) The url to the icon to be used for this menu.
Default: null – defaults to the posts icon

capability_type

(string or array) (optional)読み取り、編集、削除機能を構築するために使用するための文字列です。機能を構築するための基盤としてこの引数を使用する時は、代替複数形を許可するための配列として渡すことができます。例:array(‘story’, ‘stories’)。デフォルトではcapability_typeが機能を構築するための基盤として使用されます。`map_meta_cap`はこの動作を行うには、trueに設定する必要があると思われます。
デフォルト:”post”

(string or array) (optional) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities, e.g. array(‘story’, ‘stories’). By default the capability_type is used as a base to construct capabilities. It seems that `map_meta_cap` needs to be set to true, to make this work.
Default: “post”

使用することができる機能タイプのいくつか。(多分完全なリストではない)

Some of the capability types that can be used (probably not exhaustive list):

  • post (default)
  • page

これらの組み込み型は使用できません。

These built-in types cannot be used:

  • attachment
  • mediapage

capabilities

(array) (optional)この投稿タイプのための機能の配列。
デフォルト:capability_typeは構築するために使用されます。

(array) (optional) An array of the capabilities for this post type.
Default: capability_type is used to construct

デフォルトでは、7つのキーは機能配列の一部として受け入れられます:

By default, seven keys are accepted as part of the capabilities array:

  • edit_post, read_post, and delete_post – これらの3つは一般的にコンテキストに応じて付随している初期の機能を計画していたメタ機能です。例えば、投稿が編集/読み込み/削除されて、ユーザーや役割がチェックされています。従って、これらの機能は一般的にユーザーや役割に直接付与されません。
  • edit_posts – この投稿タイプのオブジェクトが編集することが出来るかどうかを制御します。
  • edit_others_posts – 他のユーザーが編集できることで所有されているこのタイプのオブジェクトかどうかを制御します。投稿タイプが著者をサポートしていない場合、edit_postsのように動作します。
  • publish_posts – この投稿タイプの公開しているオブジェクトを制御します。
  • read_private_posts – プライベートオブジェクトが読み込むことができるかどうかを制御します。
  • edit_post, read_post, and delete_post – These three are meta capabilities, which are then generally mapped to corresponding primitive capabilities depending on the context, for example the post being edited/read/deleted and the user or role being checked. Thus these capabilities would generally not be granted directly to users or roles.
  • edit_posts – Controls whether objects of this post type can be edited.
  • edit_others_posts – Controls whether objects of this type owned by other users can be edited. If the post type does not support an author, then this will behave like edit_posts.
  • publish_posts – Controls publishing objects of this post type.
  • read_private_posts – Controls whether private objects can be read.

注:これらの最後の4つの初期の機能は様々な場所でコアでチェックされます。

Note: those last four primitive capabilities are checked in core in various locations.

コア内で直接参照されていない7つの他の初期の機能もあります。コンテキストに応じて、3つの前述のメタ機能を取得するmap_meta_cap()を除いて、ユーザーや役割に反対してチェックしなければならない1つあるいはそれ以上の初期の機能にそれらを変換します。これらの追加機能はmap_meta_cap()にのみ使用されます。つまり、それらはデフォルトでのみ割り当てられている場合、投稿タイプがtrueに設定している’map_meta_cap’引数で登録されています(デフォルトはfalseです)。

There are also seven other primitive capabilities which are not referenced directly in core, except in map_meta_cap(), which takes the three aforementioned meta capabilities and translates them into one or more primitive capabilities that must then be checked against the user or role, depending on the context. These additional capabilities are only used in map_meta_cap(). Thus, they are only assigned by default if the post type is registered with the ‘map_meta_cap’ argument set to true (default is false).

  • read – この投稿タイプが読み込むことができるオブジェクトかどうかを制御します。
  • delete_posts – この投稿タイプが削除することができるオブジェクトかどうかを制御します。
  • delete_private_posts – プライベートオブジェクトが削除することができるかどうかを制御します。
  • delete_published_posts – 公開されたオブジェクトが削除できるかどうかを制御します。
  • delete_others_posts – 他のユーザーが削除できるすることで所有するオブジェクトを制御します。投稿タイプが著者をサポートしていない場合、delete_postsのように動作します。
  • edit_private_posts – プライベートオブジェクトが編集できるかどうかを制御します。
  • edit_published_posts – 公開されたオブジェクトが編集できるかどうかを制御します。
  • read – Controls whether objects of this post type can be read.
  • delete_posts – Controls whether objects of this post type can be deleted.
  • delete_private_posts – Controls whether private objects can be deleted.
  • delete_published_posts – Controls whether published objects can be deleted.
  • delete_others_posts – Controls whether objects owned by other users can be can be deleted. If the post type does not support an author, then this will behave like delete_posts.
  • edit_private_posts – Controls whether private objects can be edited.
  • edit_published_posts – Controls whether published objects can be edited.

‘capability_type’を割り当てて、$GLOBALS[‘wp_post_types’][‘your_cpt_name’]の配列を調べる場合、次のように表示されます:

If you assign a ‘capability_type’ and then take a look into the $GLOBALS[‘wp_post_types’][‘your_cpt_name’] array, then you’ll see the following:

[cap] => stdClass Object
(
	[edit_post]		 => "edit_{$capability_type}"
	[read_post]		 => "read_{$capability_type}"
	[delete_post]		 => "delete_{$capability_type}"
	[edit_posts]		 => "edit_{$capability_type}s"
	[edit_others_posts]	 => "edit_others_{$capability_type}s"
	[publish_posts]		 => "publish_{$capability_type}s"
	[read_private_posts]	 => "read_private_{$capability_type}s"
        [delete_posts]           => "delete_{$capability_type}s"
        [delete_private_posts]   => "delete_private_{$capability_type}s"
        [delete_published_posts] => "delete_published_{$capability_type}s"
        [delete_others_posts]    => "delete_others_{$capability_type}s"
        [edit_private_posts]     => "edit_private_{$capability_type}s"
        [edit_published_posts]   => "edit_published_{$capability_type}s"
)

複数機能の末尾に”s”を注意してください。

Note the “s” at the end of plural capabilities.

map_meta_cap

(boolean) (optional)内部のデフォルトのメタ機能の対応を使用するかどうか。
デフォルト:false

(boolean) (optional) Whether to use the internal default meta capability handling.
Default: false

hierarchical

(boolean) (optional) 投稿タイプが階層的であるかどうか(例ページ)。親を指定することができます。’supports’パラメーターは、エディタページに親の選択ボックスを表示するために’page-attributes’を含ませるべきです。
デフォルト:false

(boolean) (optional) Whether the post type is hierarchical (e.g. page). Allows Parent to be specified. The ‘supports’ parameter should contain ‘page-attributes’ to show the parent select box on the editor page.
Default: false

supports

(array/boolean) (optional) 直接add_post_type_support()を呼び出す別名。3.5の時点で、booleanのfalseは、デフォルト(タイトルとエディタ)の動作を防ぐために配列の代わりに値として渡すことができます。
デフォルト:タイトルとエディタ。

(array/boolean) (optional) An alias for calling add_post_type_support() directly. As of 3.5, boolean false can be passed as value instead of an array to prevent default (title and editor) behavior.
Default: title and editor

  • ‘title’
  • ‘editor’ (content)
  • ‘author’
  • ‘thumbnail’ (アイキャッチ画像, 現在のテーマにpost-thumbnailsをサポートしている必要があります)
  • ‘excerpt’
  • ‘trackbacks’
  • ‘custom-fields’
  • ‘comments’ (また編集画面上でコメント数のバルーンが表示されてます)
  • ‘revisions’ (リビジョンを保存します)
  • ‘page-attributes’ (メニューの順序、階層は親オプションを表示するためにtrueでなければなりません)
  • ‘post-formats’ 投稿フォーマットを追加し、投稿フォーマットを参照します
  • ‘title’
  • ‘editor’ (content)
  • ‘author’
  • ‘thumbnail’ (featured image, current theme must also support post-thumbnails)
  • ‘excerpt’
  • ‘trackbacks’
  • ‘custom-fields’
  • ‘comments’ (also will see comment count balloon on edit screen)
  • ‘revisions’ (will store revisions)
  • ‘page-attributes’ (menu order, hierarchical must be true to show Parent option)
  • ‘post-formats’ add post formats, see Post Formats

注:テーマにもサムネイルをサポートをしたり、add_theme_support関数を使用することを確認するために記憶するサムネイルを使用するというカスタム投稿タイプを使用する時。

Note: When you use custom post type that use thumbnails remember to check that the theme also supports thumbnails or use add_theme_support function.

register_meta_box_cb

(string) (optional)編集フォームのメタボックスを設定するときに呼び出されるコールバック関数を提供します。remove_meta_box()とadd_meta_box()はコールバックで呼び出します。
デフォルト:なし

(string) (optional) Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback.
Default: None

taxonomies

(array) (optional) この投稿タイプで使用されるカテゴリーやpost_tagのように登録されたタクソノミーの配列です。これは直接register_taxonomy_for_object_type()を呼び出す代わりに使用することができます。カスタムタクソノミーはまだregister_taxonomy()で登録される必要があります・
デフォルト:タクソノミーがない

(array) (optional) An array of registered taxonomies like category or post_tag that will be used with this post type. This can be used in lieu of calling register_taxonomy_for_object_type() directly. Custom taxonomies still need to be registered with register_taxonomy().
Default: no taxonomies

has_archive

(boolean or string) (optional)投稿タイプのアーカイブを有効にします。デフォルトではアーカイブスラッグとして$post_typeを使用します。
デフォルト:false

(boolean or string) (optional) Enables post type archives. Will use $post_type as archive slug by default.
Default: false

注:書き換えが有効になっている場合、適切な書き換えルールを生成します。使用されているスラッグを変更するために書き換えも使用しています。

Note: Will generate the proper rewrite rules if rewrite is enabled. Also use rewrite to change the slug used.

permalink_epmask

(string) (optional)デフォルトのリライト終点はビットマスクです。詳細情報についてはチケット12605を参照してください。エンドポイントのWordPressのプラグインの概要を確認します。
デフォルト:EP_PERMALINK

(string) (optional) The default rewrite endpoint bitmasks. For more info see Trac Ticket 12605 and this Make WordPress Plugins summary of endpoints.
Default: EP_PERMALINK

注:3.4では、この引数は効果的に書き換え下の’ep_mask’の引数で置き換えられます。

Note: In 3.4, this argument is effectively replaced by the ‘ep_mask’ argument under rewrite.

rewrite

(boolean or array) (optional)この投稿タイプの書き換え処理をトリガします。書き換えを防止するには、falseを設定します。
デフォルト:trueとスラッグとして$post_typeを使用します。

(boolean or array) (optional) Triggers the handling of rewrites for this post type. To prevent rewrites, set to false.
Default: true and use $post_type as slug

$args array

  • ‘slug’ => パーマ構造のスラッグをカスタマイズする文字列。デフォルトは$post_typeの値・翻訳可能でなければなりません。
  • ‘with_front’ => ブール値は、フロントベースで先頭に追加されるべきパーマ構造です。(例:パーマリンクの構造が/blog/である場合、リンクは次のようになります:false->/news/, true->/blog/news)。デフォルトはtrue。
  • ‘feeds’ => ブール値は、投稿タイプに構築するfeedのパーマ構造にすべきです。デフォルトはhas_archive値です。
  • ‘pages’ => ブール値はページネーションの為に提供するパーマ構造です。デフォルトはtrue。
  • ‘ep_mask’ => 3.4のように定数がこの投稿タイプのエンドポイントマスクを割り当てます。詳細についてはトラックチケット19275を参照してください。これはエンドポイントのWordPressプラグインの概要を確認します。
    • 指定さずpermalink_epmaskが設定している場合、permalink_epmaskから継承します。
    • 指定せず、permalink_epmaskが設定されていない場合、デフォルトはEP_PERMALINK。
  • ‘slug’ => string Customize the permastruct slug. Defaults to the $post_type value. Should be translatable.
  • ‘with_front’ => bool Should the permastruct be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true
  • ‘feeds’ => bool Should a feed permastruct be built for this post type. Defaults to has_archive value.
  • ‘pages’ => bool Should the permastruct provide for pagination. Defaults to true
  • ‘ep_mask’ => const As of 3.4 Assign an endpoint mask for this post type. For more info see Trac Ticket 19275 and this Make WordPress Plugins summary of endpoints.
    • If not specified and permalink_epmask is set, inherits from permalink_epmask
    • If not specified and permalink_epmask is not set, defaults to EP_PERMALINK

注:プラグインの内部投稿タイプを登録する場合、アクティブ化にflush_rewrite_rules()を呼び出し、フックを非アクティブ化にします(以下のアクティベーションにフラッシュリライトを参照してください)。flush_rewrite_rules()が使用されていない場合、カスタム投稿タイプが正しい構造を表示する前に、手動で設定>パーマリンクに移動して、パーマリンク構造をリフレッシュする必要があります。

Note: If registering a post type inside of a plugin, call flush_rewrite_rules() in your activation and deactivation hook (see Flushing Rewrite on Activation below). If flush_rewrite_rules() is not used, then you will have to manually go to Settings > Permalinks and refresh your permalink structure before your custom post type will show the correct structure.

query_var

(boolean or string) (optional)この投稿タイプにquery_varキーを設定します。
デフォルト:true – $post_typeのために設定します

(boolean or string) (optional) Sets the query_var key for this post type.
Default: true – set to $post_type

  • ‘false’ – query_varキーを使用し無効化します。投稿タイプは/?{query_var}={single_post_slug}で読み込むことができます。
  • ‘string’ – /?{query_var_string}={single_post_slug}は意図した通りに動作します。
  • ‘false’ – Disables query_var key use. A post type cannot be loaded at /?{query_var}={single_post_slug}
  • ‘string’ – /?{query_var_string}={single_post_slug} will work as intended.

注:query_varパラメーターは‘publicly_queryable’パラメーターがfalseに設定されている場合は効果がありません。query_varは、WordPressが認識できるように、組み込みのquery_varsの配列をカスタム投稿タイプのクエリー配列を追加します。WordPressは配列に含まれていない任意のクエリー変数を削除します。

Note: The query_var parameter has no effect if the ‘publicly_queryable’ parameter is set to false. query_var adds the custom post type’s query var to the built-in query_vars array so that WordPress will recognize it. WordPress removes any query var not included in that array.

trueに設定している場合、これを使用しているカスタム投稿タイプ(book)をリクエストするために許可します:example.com/?book=life-of-pi

If set to true it allow you to request a custom posts type (book) using this: example.com/?book=life-of-pi

true(例えば‘publication’)よりがむしろ文字列に設定されている場合、実行することが出来る:example.com/?publication=life-of-pi

If set to a string rather than true (for example ‘publication’), you can do: example.com/?publication=life-of-pi

can_export

(boolean) (optional)このpost_typeはエクスポートすることができます。
デフォルト:true

(boolean) (optional) Can this post_type be exported.
Default: true

_builtin

(boolean) (not for general use)この投稿タイプがネイティブまたは”built-in”post_typeであるかどうか。注:このCodexのエントリーはドキュメンテーション用です。 – コア開発者が独自の投稿タイプを登録する時にこれを使用しないことをお勧めします。
デフォルト:false

(boolean) (not for general use) Whether this post type is a native or “built-in” post_type. Note: this Codex entry is for documentation – core developers recommend you don’t use this when registering your own post type
Default: false

  • ‘false’ – これはカスタム投稿タイプがデフォルトです。
  • ‘true’ – これはbuilt-inネイティブカスタム投稿タイプ(post, page, attachment, revision, nav_menu_item)です。
  • ‘false’ – default this is a custom post type
  • ‘true’ – this is a built-in native post type (post, page, attachment, revision, nav_menu_item)

_edit_link

(boolean) (not for general use)この投稿タイプでエントリーを編集するリンクです。注:このCodexのエントリーはドキュメンテーション用です。 ‘-‘ コア開発者が独自の投稿タイプを登録する時にこれを使用しないことをお勧めします。
デフォルト:

(boolean) (not for general use) Link to edit an entry with this post type. Note: this Codex entry is for documentation ‘-‘ core developers recommend you don’t use this when registering your own post type
Default:

  • ‘post.php?post=%d’

戻り値

(object | WP_Error)

登録された投稿タイプのオブジェクト、またはエラーオブジェクト

The registered post type object, or an error object

“book”を呼び出す投稿タイプを登録する例です。

An example of registering a post type called “book”.

基本:

function codex_custom_init() {
    $args = array( 'public' => true, 'label' => 'Books' );
    register_post_type( 'book', $args );
}
add_action( 'init', 'codex_custom_init' );

緻密:

function codex_custom_init() {
  $labels = array(
    'name' => 'Books',
    'singular_name' => 'Book',
    'add_new' => 'Add New',
    'add_new_item' => 'Add New Book',
    'edit_item' => 'Edit Book',
    'new_item' => 'New Book',
    'all_items' => 'All Books',
    'view_item' => 'View Book',
    'search_items' => 'Search Books',
    'not_found' =>  'No books found',
    'not_found_in_trash' => 'No books found in Trash', 
    'parent_item_colon' => '',
    'menu_name' => 'Books'
  );

  $args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true, 
    'show_in_menu' => true, 
    'query_var' => true,
    'rewrite' => array( 'slug' => 'book' ),
    'capability_type' => 'post',
    'has_archive' => true, 
    'hierarchical' => false,
    'menu_position' => null,
    'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
  ); 

  register_post_type( 'book', $args );
}
add_action( 'init', 'codex_custom_init' );

メッセージをカスタマイズする:

//テキストブックなたが本を確実にするためにフィルターを追加し、ユーザーが本を更新するときに表示します。add filter to ensure the text Book, or book, is displayed when user updates a book 

function codex_book_updated_messages( $messages ) {
  global $post, $post_ID;

  $messages['book'] = array(
    0 => '', // 未使用。メッセージはindex1から始まります。Unused. Messages start at index 1.
    1 => sprintf( __('ブックは更新しました。Book updated. <a href="%s">View book</a>', 'your_text_domain'), esc_url( get_permalink($post_ID) ) ),
    2 => __('カスタムフィールドを更新しました。Custom field updated.', 'your_text_domain'),
    3 => __('カスタムフィールドを削除しました。Custom field deleted.', 'your_text_domain'),
    4 => __('ブックを更新しました。Book updated.', 'your_text_domain'),
    /* 翻訳者: %s:リビジョンの日付と時刻です。translators: %s: date and time of the revision */
    5 => isset($_GET['revision']) ? sprintf( __('ブックは%sからリビジョンに復元しました。Book restored to revision from %s', 'your_text_domain'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
    6 => sprintf( __('ブックを公開しました。Book published. <a href="%s">View book</a>', 'your_text_domain'), esc_url( get_permalink($post_ID) ) ),
    7 => __('ブックを保存しました。Book saved.', 'your_text_domain'),
    8 => sprintf( __('ブックを投稿しました。Book submitted. <a target="_blank" href="%s">Preview book</a>', 'your_text_domain'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
    9 => sprintf( __('ブックを予約しました。Book scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview book</a>', 'your_text_domain'),
      // 翻訳者:記事の日付フォーマットを公開します。http://php.net/dateを参照。translators: Publish box date format, see http://php.net/date
      date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
    10 => sprintf( __('ブックの下書きを更新しました。Book draft updated. <a target="_blank" href="%s">Preview book</a>', 'your_text_domain'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
  );

  return $messages;
}
add_filter( 'post_updated_messages', 'codex_book_updated_messages' );

文脈上のヘルプを追加する:

//ブックに文脈上のヘルプを表示します。display contextual help for Books

function codex_add_help_text( $contextual_help, $screen_id, $screen ) { 
  //$contextual_help .= var_dump( $screen ); // use this to help determine $screen->id
  if ( 'book' == $screen->id ) {
    $contextual_help =
      '<p>' . __('ブックを追加または編集している時に記憶することThings to remember when adding or editing a book:', 'your_text_domain') . '</p>' .
      '<ul>' .
      '<li>' . __('ミステリーまたは歴史のような正しいジャンルを指定します。Specify the correct genre such as Mystery, or Historic.', 'your_text_domain') . '</li>' .
      '<li>' . __('ブックの正しい著者を指定します。著者モジュールはこの書評の著者を参照している事を忘れないでください。Specify the correct writer of the book.  Remember that the Author module refers to you, the author of this book review.', 'your_text_domain') . '</li>' .
      '</ul>' .
      '<p>' . __('今後公開される書評を予約したい場合:If you want to schedule the book review to be published in the future:', 'your_text_domain') . '</p>' .
      '<ul>' .
      '<li>' . __('公開モジュール下で、公開するための次の編集リンクをクリックしてください。Under the Publish module, click on the Edit link next to Publish.', 'your_text_domain') . '</li>' .
      '<li>' . __('実際この記事を公開する日の日付を変更し、OKをクリックします。Change the date to the date to actual publish this article, then click on Ok.', 'your_text_domain') . '</li>' .
      '</ul>' .
      '<p><strong>' . __('詳細については:For more information:', 'your_text_domain') . '</strong></p>' .
      '<p>' . __('<a href="http://codex.wordpress.org/Posts_Edit_SubPanel" target="_blank">Edit Posts Documentation</a>', 'your_text_domain') . '</p>' .
      '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">サポートフォーラム</a>', 'your_text_domain') . '</p>' ;
  } elseif ( 'edit-book' == $screen->id ) {
    $contextual_help = 
      '<p>' . __('これはブックなどのテーブルを表示するヘルプ画面です。This is the help screen displaying the table of books blah blah blah.', 'your_text_domain') . '</p>' ;
  }
  return $contextual_help;
}
add_action( 'contextual_help', 'codex_add_help_text', 10, 3 );

WordPress 3.3以上のヘルプタブを追加する:

function codex_custom_help_tab() {
	global $post_ID;
	$screen = get_current_screen();

	if( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];
	else $post_type = get_post_type( $post_ID );

	if( $post_type == 'book' ) :

		$screen->add_help_tab( array(
			'id' => 'you_custom_id', //タブのユニークID。unique id for the tab
			'title' => 'Custom  Help', //タブの明確なタイトル。unique visible title for the tab
			'content' => '<h3>Help Title</h3><p>Help content</p>',  //実際のヘルプテキスト。actual help text
		));

	endif;

}

add_action('admin_head', 'codex_custom_help_tab');

起動上で書き換えてフラッシュする方法

次の例を使用するプラグインを有効にした時に動作させるためのパーマリンクを取得するには、my_cpt_initは、register_activation_hookのコールバックで呼び出すための注意を払ってください。

To get permalinks to work when you activate the plugin use the following example, paying attention to how my_cpt_init is called in the register_activation_hook callback:

add_action( 'init', 'my_cpt_init' );
function my_cpt_init() {
    register_post_type( ... );
}

function my_rewrite_flush() {
    // 最初に、上記の記述された関数を介してカスタム投稿タイプを”追加”します。First, we "add" the custom post type via the above written function.
    // 注:"add"はDBに追加されないようにCPTsとして、引用符で書かれています。Note: "add" is written with quotes, as CPTs don't get added to the DB,
    // 投稿エントリーでpost_typeカラムで参照されているだけです。They are only referenced in the post_type column with a post entry, 
    // このCPTの投稿を追加する時。when you add a post of this CPT.
    my_cpt_init();

    // 注意:この例ではプラグインのアクティベーションフック中に”のみ”行われます!ATTENTION: This is *only* done during plugin activation hook in this example!
    // すべてのページのロードをすべきではない!!You should *NEVER EVER* do this on every page load!!
    flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'my_rewrite_flush' );

テーマの場合、after_switch_themeフックの代わりに使用するために必要です。このように:

For themes, you’ll need to use the after_switch_theme hook instead. Like so:

add_action( 'init', 'my_cpt_init' );
function my_cpt_init() {
    register_post_type( ... );
}

function my_rewrite_flush() {
    flush_rewrite_rules();
}
add_action( 'after_switch_theme', 'my_rewrite_flush' );

注意

$public属性はオプションではありますが、register_post_type()関数は正確に[get_post_types()]関数で照会されているものに渡されているインプットであることに注意してください。長々とpublicly_queriable, show_ui, show_in_nav_menus, と exclude_from_searchと同等のオプションを設定する場合、これは$public属性を設定していた場合と同じように処理されないでしょう。バグ18950を見てください。

Note that although the $public attribute is optional, the inputs passed to the register_post_type() function are exactly what is queried by the [get_post_types()] function. So if you verbosely set the equivalent options for publicly_queriable, show_ui, show_in_nav_menus, and exclude_from_search, this will not be handled the same as if you had set the $public attribute. See bug 18950.

変更ログ

  • 3.5.0: ‘サポート’引数はデフォルトのタイトルとエディターを無効にするためにBoolean false値を設定する事ができます。’supports’ argument can be set to Boolean false to disable default title and editor.
  • Since 2.9

ソースファイル

register_post_type()は、wp-includes/post.php内に位置しています。

register_post_type() is located in wp-includes/post.php.

リソース

プラグインリソース

関連ファンクションタグ

Post Types: register_post_type(), add_post_type_support(), remove_post_type_support(), post_type_supports(), post_type_exists(), set_post_type(), get_post_type(), get_post_types(), get_post_type_object(), get_post_type_capabilities(), get_post_type_labels(), is_post_type_hierarchical(), is_post_type_archive(), post_type_archive_title()

Sponsored Link