Remove redundant filters #42

wants to merge 1 commit into


None yet
3 participants

thenbrent commented Dec 4, 2013

The JSON REST API plugin hooks WP_JSON_Pages::registerRoutes() to the 'json_endpoints' filter and WP_JSON_Pages::type_archive_link() to the 'json_post_type_data' filter.

This is unnecessary as WP_JSON_CustomPostType already hooks these functions to those filters in its constructor and WP_JSON_Pages extends WP_JSON_CustomPostType.


rmccue commented Dec 5, 2013

I'd actually really like to move those out of the class constructor, since it forces the classes to contain global state. That said, it's a bit annoying to have to do this in plugins all the time, so maybe we need a helper method to register it. Both require docs changes.


rmccue commented Dec 14, 2013

Bumping to 0.9 to do this properly.

rachelbaker self-assigned this Feb 17, 2014

@rachelbaker rachelbaker assigned rmccue and unassigned rachelbaker Mar 10, 2014


rachelbaker commented Mar 10, 2014

Assigning to @rmccue

rmccue closed this in #126 Apr 6, 2014

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