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

Respond to the 'register_post_type_args' filter function in WordPress 4.4 #3

Open
bobbingwide opened this issue Apr 4, 2016 · 1 comment
Assignees

Comments

@bobbingwide
Copy link
Owner

In WordPress TRAC 17447 (see https://core.trac.wordpress.org/ticket/17447#comment:60 ) a new filter called register_post_type_args was added to the register_post_type API. We should take advantage of this filter to apply the oik-types overrides to the post type before it's registered.

This will allow post type overrides, such as setting has_archive to true, to be effective. Before WP 4.4, switching the has_archive flag wasn't easy... if done after the post type registration it would have required changing rewrite rules. So we didn't actually implement it. Now it should be a cinch.

@bobbingwide
Copy link
Owner Author

There may be two parts to this.

  1. Respond to the filter when invoked
  2. When updating posts types there may be no need to re-apply overrides

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

1 participant