WordPress.org

Support

Support » Plugins and Hacks » Custom Post Type UI » [Resolved] Issues with map_meta_cap and 0.8.1beta

[Resolved] Issues with map_meta_cap and 0.8.1beta

  • Since 0.8.1beta the setting map_meta_cap is used in CPT UI and set to false as default value (which is documented as default value in the documentation of register_post_type()).

    But setting map_meta_cap to false caused issues with the setting capability_type like e.g. non editable posts of a custom post type post if the post owner is e.g. an editor-role and the current user an admin-role or similar.

    If the map_meta_cap setting in CPT UI was removed from the register_post_type() call, the issues disappeared, which lead to the conclusion that the default value for map_meta_cap is actually true and not false.

    An annotation in the register_post_type() documentation also points in this direction:

    … It seems that map_meta_cap needs to be set to true, to make this work.

    Would suggest to use true as default for map_meta_cap in CPT UI or omit the setting from register_post_type() if user has set it to false.

    The use of map_meta_cap might also need more investigation…

    http://wordpress.org/plugins/custom-post-type-ui/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Beckwith

    @tw2113

    Ov3rfly, if you could contribute your thoughts over at this issue, that’d be greatly appreciated.

    https://github.com/WebDevStudios/custom-post-type-ui/issues/82

    I’m not super familiar with this part myself, so I’m kind of relying on those who are to offer suggestions/pointers.

    Honestly, this is one that I was originally leaving out, but it got requested so I did some initial work on it.

    I’m not against reversing what work I did do, and offer a hook around the post type arguments right before registering, so that those who know what they’re doing with it could add it themselves as necessary.

    As aebs has explained exactly the same above problem already, you could add a link to this thread to github, that should be sufficient.

    More important would be a fix of this serious bug posted by aebs and also found by myself yesterday in the beta version to avoid future annoyance of other developers.

    Plugin Author Michael Beckwith

    @tw2113

    Just making sure i have enough information to do it right

    Plugin Author Michael Beckwith

    @tw2113

    Should be all fixed in the latest version. I’m close to 8.1 😀

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Issues with map_meta_cap and 0.8.1beta’ is closed to new replies.
Skip to toolbar