Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom post types in settings page #26

Open
robertknight opened this issue Aug 2, 2017 · 1 comment
Open

Support custom post types in settings page #26

robertknight opened this issue Aug 2, 2017 · 1 comment

Comments

@robertknight
Copy link
Member

robertknight commented Aug 2, 2017

The list of post types which users can enable Hypothesis on is limited to Posts and Pages, with a not-well-documented "hypothesis_supported_posttypes" hook which can be used to override this. This means that custom post types added using tools such as Custom Post Types UI will not appear automatically.

It looks to me like it should be possible for the plugin to enumerate all registered post types automatically using get_post_types.

Context: https://hypothesis.zendesk.com/agent/tickets/1314

@greatislander
Copy link

@robertknight Hi Robert! I contributed the hypothesis_supported_posttypes hook (to facilitate an integration with https://github.com/pressbooks/pressbooks). I assume that if you switch to get_post_types() you will make this change backwards-compatible (e.g. that hook would still work). There are clear use cases for not including all post types so it would still be good to have access to that filter so that some of the registered post types can be excluded 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants