set_post_format()设置文章的类型格式

目录

描述

Set the post format of a post. This can be called and used anywhere if a post Object and the format is provided.

set_post_format() 描述

用法

<?php set_post_format$post $format); ?>

set_post_format() 用法

参数

$post

(int or object) (必填) ID of the post or Object of the post.

默认值: none

$format

(string or array) (必填) The format of the post. Use an empty string or array to remove all formats from the post.

默认值: none

set_post_format() 参数

源文件

set_post_format() 函数的代码位于 wp-includes/post-formats.php.

set_post_format() 源文件

相关