Skip to content

Commit

Permalink
Add filters for post type and post status data
Browse files Browse the repository at this point in the history
See WP-API#380

git-svn-id: http://gsoc.svn.wordpress.org/2013/rmccue/trunk@2345 f69abe3c-2ee2-4550-9a6d-17bd458115be
  • Loading branch information
rmccue committed Sep 21, 2013
1 parent 69952e5 commit ae5f121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/class-wp-json-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public function getPostType( $type, $_in_collection = false ) {
$data['meta']['links']['archives'] = json_url( add_query_arg( 'type', $type->name, '/posts' ) );
}

return $data;
return apply_filters( 'json_post_type_data', $data, $type );
}

/**
Expand Down Expand Up @@ -464,7 +464,7 @@ public function getPostStatuses() {
}
}

return $data;
return apply_filters( 'json_post_statuses', $data, $statuses );
}

/**
Expand Down

0 comments on commit ae5f121

Please sign in to comment.