- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
関数リファレンス/has post format
Description
Returns a boolean if the specified post format is assigned (true) or not (false) to the post. This will usually be called in the the loop, but can be used anywhere if a post ID is provided.
Usage
%%%<?php $format = has_post_format($format,$post_id); ?>%%%
Parameters
- $format
- (string|array) (Required) name of the post format or array of names of post formats.
- 初期値: none
- $post_id
- (integer) (Optional) ID of the post.
- 初期値: current loop post
Changelog
- Since: 3.1
Source File
has_post_format() is located in wp-includes/post-formats.php
.
最新英語版: WordPress Codex » Function Reference/has post format (最新版との差分)
投稿フォーマット: set_post_format(), get_post_format(), has_post_format(), the_post_format_audio() /en, get_the_post_format_media() /en, get_content_audio() /en, the_post_format_chat() /en, get_the_post_format_chat() /en, get_content_chat() /en, add_chat_detection_format() /en, the_post_format_gallery() /en, get_content_galleries() /en, get_post_gallery_images(), the_post_format_image() /en, get_the_post_format_image() /en, get_content_images() /en, the_post_format_quote() /en, get_the_post_format_quote() /en, get_content_quote() /en, the_post_format_url() /en, get_the_post_format_url() /en, get_content_url() /en, the_post_format_video() /en, get_content_video() /en, the_remaining_content() /en, get_the_remaining_content() /en, get_post_format_meta() /en, post_format_content_class() /en, get_post_format_content_class() /en, post_formats_compat() /en