首页 WordPress函数大全 get_post_mime_type()

get_post_mime_type()

2020-05-01 / 4500阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_post_mime_type( int|WP_Post $post = null )

Retrieve the mime type of an attachment based>

Contents

  • Description
    • Parameters
    • Return
    • Source
    • Changelog
  • Related
    • Uses
    • Used By
  • User Contributed Notes

描述

This function can be used with any post type, but it makes more sense with attachments.

参数

$post

(int|WP_Post)
(Optional)
Post ID or post object. Defaults to global $post.

Default value: null

返回

(string|false) The mime type on success, false on failure.

大家谈论
    我的见解