get_post_mime_type

Sponsored Link

IDに基づいて添付ファイルのMIMEタイプを取得します。

この関数は任意の投稿タイプで使用できますが、それは添付ファイルを持つ方が理にかなっています。

Sponsored Link

Retrieve the mime type of an attachment based on the ID.

This function can be used with any Post Type, but it makes more sense with Attachments.

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

<?php get_post_mime_type( $ID ) ?>

get_post_mime_typeのパラメーター

$ID

(integer) (optional) 投稿IDです。
デフォルト:”

(integer) (optional) Post ID.
Default: ”

戻り値

MIMEタイプ(boolean|string)
失敗した場合にFALSE、またはMIMEタイプを返します。

Mime Type (boolean|string)
False on failure or returns the mime type.

変更ログ

Since: 2.0.0

ソースファイル

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

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

Sponsored Link