Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Remove redundant filters #42

Closed
wants to merge 1 commit into from
Closed

Remove redundant filters #42

wants to merge 1 commit into from

Conversation

thenbrent
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

rmccue commented Dec 14, 2013

Bumping to 0.9 to do this properly.

@rachelbaker
Copy link
Member

Assigning to @rmccue

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

Successfully merging this pull request may close these issues.

3 participants