也就是说,当邮件注册时,如下所示:
$args= [
'supports' => ['thumbnail', 'title', 'post-formats' ...]
]如果以后,我想获得特定post类型的所有supports属性,我应该使用哪个函数?例如,类似get_supports('post');的东西
发布于 2018-12-15 10:06:03
我选择使用$GLOBALS['_wp_post_type_features'],返回如下所示:
Array
(
[post] => Array
(
[title] => 1
[editor] => 1
[author] => 1
[thumbnail] => 1
[excerpt] => 1
[trackbacks] => 1
[custom-fields] => 1
[comments] => 1
[revisions] => 1
[post-formats] => 1
)
[page] => Array
(
[title] => 1
[editor] => 1
[author] => 1
[thumbnail] => 1
[page-attributes] => 1
[custom-fields] => 1
[comments] => 1
[revisions] => 1
)
...https://wordpress.stackexchange.com/questions/322005
复制相似问题