Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • why do you think that $GLOBALS['wp_post_types'] is a good way to debug capabilities? Commented Sep 3, 2015 at 14:11
  • Since it shows the Capabilities added to the CPT? Added using 'capability_type' => array('pms','pmss'), 'map_meta_cap' => true in the register_post_type. As explained in codex.wordpress.org/Function_Reference/register_post_type. --- From your question, I guess I am doing something wrong. Please share your thoughts. Commented Sep 3, 2015 at 15:24
  • I am not sure that you are doing anything wrong, it is just the first time I heard of anybody trying to debug things that way. It is just that capabilities can be overridden by the usage of filter therefor what you see in the DB do not have to be the value returned by the function (disclaimer, I am not familiar enough with the relevant code paths, so not going to guess what are the chances it might or might not work in default no plugin enviroment) Commented Sep 3, 2015 at 15:45
  • Thank you for taking the time and replying to my question. Any suggestion for how to find the reason for the above behavior and to solve it? Commented Sep 3, 2015 at 16:08
  • frankly if I ran into such an "obviously should work but doesn't" problem I just debug the core. I don't see a reason it should not work so maybe you have something else going on as well. Commented Sep 3, 2015 at 17:42