WP-角色和能力

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WP-角色和能力相关的知识,希望对你有一定的参考价值。

Use this plugin:
http://wordpress.org/extend/plugins/members/

Settings are here:
http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types
http://codex.wordpress.org/Function_Reference/register_post_type

Gravity Form - Custom field
http://wpsmith.net/2011/plugins/how-to-create-a-custom-form-field-in-gravity-forms-with-a-terms-of-service-form-field-example/
  1. Add this capabilities for every custom post type.
  2. [edit_post] => "edit_{$capability_type}"
  3. [read_post] => "read_{$capability_type}"
  4. [delete_post] => "delete_{$capability_type}"
  5. [edit_posts] => "edit_{$capability_type}s"
  6. [edit_others_posts] => "edit_others_{$capability_type}s"
  7. [publish_posts] => "publish_{$capability_type}s"
  8. [read_private_posts] => "read_private_{$capability_type}s"
  9. [delete_posts] => "delete_{$capability_type}s"
  10. [delete_private_posts] => "delete_private_{$capability_type}s"
  11. [delete_published_posts] => "delete_published_{$capability_type}s"
  12. [delete_others_posts] => "delete_others_{$capability_type}s"
  13. [edit_private_posts] => "edit_private_{$capability_type}s"
  14. [edit_published_posts] => "edit_published_{$capability_type}s"
  15.  
  16. edit_members
  17. read_members
  18. delete_members
  19. edit_memberss
  20. edit_others_memberss
  21. publish_memberss
  22. read_private_memberss
  23. delete_memberss
  24. delete_private_memberss
  25. delete_published_memberss
  26. delete_others_memberss
  27. edit_private_memberss
  28. edit_published_memberss

以上是关于WP-角色和能力的主要内容,如果未能解决你的问题,请参考以下文章

用户角色 - 添加角色功能 php 片段 - Wordpress

Mecanim 动画系统(第二部分)

Wordpress阻止访问wp admin€“wpsnipp.com网站你博客的Wordpress代码片段

WordPress:具有自定义角色的用户无法访问 wp-admin

php WP片段(HTML,内部主题)

html 社交分享片段(WP)