最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - Custom User Role Preview Function Not Working

programmeradmin1浏览0评论

maybe I need some suggestions how to fix my current problem. I've created a custom user role with the following capabilities:

array(
                'read' => true,  // true allows this capability
                'edit_posts' => true,
                'edit_published_posts' => true,
                //'edit_others_posts' => true,
                'publish_posts' => true,
                'upload_files' => true,
                'edit_others_pending_posts' => true,

                'edit_aotm' => true,  //
                'read_aotm' => true,  //
                'read_aotms' => true,  //
                'delete_aotm' => false,  //
                'delete_aotms' => false,  //
                'edit_aotms' => true,  //
                'edit_others_aotms' => false,  //
                'publish_aotms' => false,  //
                'read_private_aotms' => false,  //
                'create_aotms' => false,  //
            )

This user role can publish all posts. All other user or user roles (except the admin) only can set the post status to a custom one. So the above user role can publish them. The problem now is that the custom user role should can view the preview of this post. At the moment they can only see the preview link. But when they click this preview link (generated from wordpress) they get a 404 error.

With the capability edit_others_posts it works, or when the post is published.

Does anyone have a suggestion how to fix this problem?

发布评论

评论列表(0)

  1. 暂无评论