This repository has been archived by the owner. It is now read-only.

Remove redundant filters #42

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@thenbrent
Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Member

rmccue commented Dec 14, 2013

Bumping to 0.9 to do this properly.

@rachelbaker rachelbaker self-assigned this Feb 17, 2014

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

@rachelbaker

This comment has been minimized.

Member

rachelbaker commented Mar 10, 2014

Assigning to @rmccue

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