We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
从 WP 3.0 开始,您可以使用 register_post_status() 函数 ( http://hitchhackerguide.com/2011 /02/12/register_post_status/ )向帖子类型添加新状态。
WP 本身使用 register_post_status() 在 init 上使用 wp-includes/post.php 中的 create_initial_post_types() 函数注册默认的“已发布”、“草稿”等状态( http://hitchhackerguide.com/2011/02/11/create_initial_post_types/ )。
查看这些链接中的代码,您可以了解如何使用该函数。
我希望这可以帮助您入门!
Since WP 3.0, you can use the register_post_status() function ( http://hitchhackerguide.com/2011/02/12/register_post_status/ ) to add new statuses to a post type.
WP itself uses register_post_status() to register the default "published", "draft", etc. statuses on init using the create_initial_post_types() function in wp-includes/post.php ( http://hitchhackerguide.com/2011/02/11/create_initial_post_types/ ).
Look at the code in those links, and you can get an idea of how to use the function.
I hope that helps you get started!
如果你知道怎么写,你可以写一个插件。您必须深入研究文档或类似的插件,例如 http://wordpress.org/extend /plugins/edit-flow/ 或这个 http:// wordpress.org/extend/plugins/custom-post-type-ui/
通过“挂钩、操作和过滤器”,您可以更改管理界面,请参阅此处 http://codex.wordpress.org/Plugin_API
到目前为止,我只编写了一个简单的插件,我不知道要完成的具体步骤这……
祝你好运!
You could write a plugin if you know how. You have to dig into the documentation or similar plugins like this one http://wordpress.org/extend/plugins/edit-flow/ or this one http://wordpress.org/extend/plugins/custom-post-type-ui/
With "Hooks, Actions and Filters" you can change the admin interface, see here http://codex.wordpress.org/Plugin_API
So far I've write just one simple plugin and I don't know the exact steps you have to follow to accomplish this...
Good luck!
您可以使用 register_post_status 函数添加自定义帖子状态。请参阅 http://core 中的 create_initial_post_types() .trac.wordpress.org/browser/tags/3.2.1/wp-includes/post.php
但请注意,这并未集成到 Wordpress 后端 UI 中。
You can add custom post status' using the register_post_status function. Refer to create_initial_post_types() in http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/post.php
Be warned however, that this is not integrated into the Wordpress backend UI.