説明
現在の投稿情報を保持する。メンバー変数
メンバー変数は次の通りです。| プロパティ名 | データ型 | 意味 |
|---|---|---|
| ID | int | 投稿ID |
| post_author | 投稿者ID | |
| post_date | string | 投稿日時 |
| post_date_gmt | string | 投稿日時(GMT) |
| post_content | string | 投稿内容 |
| post_title | string | 投稿タイトル |
| post_excerpt | string | 投稿内容(抜粋) |
| post_status | string | 投稿状態('publish'、'private'など) |
| comment_status | string | コメント投稿状態('open'など) |
| ping_status | string | トラックバック/ピンバック受付状態('open'など) |
| post_password | string | パスワード(公開状態がパスワード保護時) |
| post_name | string | 投稿名(パーマリンク設定で%postname%使用時) |
| to_ping | string | |
| pinged | string | |
| post_modified | string | 更新日時 |
| post_modified_gmt | string | 更新日時(GMT) |
| post_content_filtered | string | |
| post_parent | int | |
| guid | string | |
| menu_order | int | |
| post_type | string | 投稿情報タイプ('post'、'page'など) |
| post_mime_type | string | |
| comment_count | int | コメント数 |
| ancestors | array | 親やその親ページの投稿IDの配列(固定ページで親ページがある場合など) |
| filter | string | 適用されたフィルター名('raw'など) |
メソッド
メソッドはありません。注意
the_postによって更新される。最終更新 : 2018年05月27日 10:47
関連
お勧め
個人データのエクスポートメール向けに追加された新フィルター(2020年4月2日 更新)
先週「WordPress 5.4 RC3」が公開され、正式リリースまであと1週間。ブロックエディターの機能強化が目立つわけですが、地味な変更点もちらほらと。今回はその中の1つ、「個人データのエクスポート」機能に関連するフィルターを紹介する。
決まった値を返すだけの関数群(2018年5月27日 更新)
WordPressのソースコードを眺めているとフィルター関数名で'__return_○○'が指定されている部分を時々見かけます。それらの関数定義を見てみると、すべて決まった値を単純に返すだけでした。これらの関数がちょっと気になったので、まとめてみました。
サイドバーの初期化はwidgets_initアクションで(2011年7月14日 更新)
ウィジェットを使ってみたくなり新テーマ「Twenty Eleven」を覗いてみると、codexに記載されていた内容と少し違っている。これって「Twenty Ten」ですでに変更されていたんだね。Gutenbergでカスタムフィールドを使う(2018年8月10日 更新)
Gutenbergの新エディターではカスタムフィールドのウィジェットが表示されない。既存のカスタムフィールドのデータはなくなるわけでないので、新エディター上で編集・更新できないか調べてみた。
favicon.icoがWordPressロゴになる!?(2020年2月25日 更新)
先週「WordPress 5.4 Beta2」が公開され、来月末には正式リリース。タイミングよく三連休だったので、1つ前の「ニュース」で紹介されていた変更点から確認してみた。