首页 WordPress函数大全 add_post_type_support()

add_post_type_support()

2020-05-01 / 4820阅 / 悠然

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

add_post_type_support( string $post_type, string|array $feature, mixed $args )

Registers support of certain features for a post type.

描述

All core features are directly associated with a functional area of the edit screen, such as the editor or a meta box. Features include: ‘title’, ‘editor’, ‘comments’, ‘revisions’, ‘trackbacks’, ‘author’, ‘excerpt’, ‘page-attributes’, ‘thumbnail’, ‘custom-fields’, and ‘post-formats’.

Additionally, the ‘revisions’ feature dictates whether the post type will store revisions, and the ‘comments’ feature dictates whether the comments count will show>

参数

$post_type

(string)
(Required)
The post type for which to add the feature.

$feature

(string|array)
(Required)
The feature being added, accepts an array of feature strings or a single string.

$args

(mixed)
(Optional)
extra arguments to pass along with certain features.

大家谈论
    我的见解