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

Commit

Permalink
Merge pull request #2008 from WP-API/1167-dynamic-prepare-term
Browse files Browse the repository at this point in the history
Make `rest_prepare_term` dynamic based on taxonomy
  • Loading branch information
rachelbaker committed Jan 12, 2016
2 parents ddd4c89 + 05b98b4 commit 047b8a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/endpoints/class-wp-rest-terms-controller.php
Expand Up @@ -457,7 +457,7 @@ public function prepare_item_for_response( $item, $request ) {
* @param object $item The original term object.
* @param WP_REST_Request $request Request used to generate the response.
*/
return apply_filters( 'rest_prepare_term', $response, $item, $request );
return apply_filters( "rest_prepare_{$this->taxonomy}", $response, $item, $request );
}

/**
Expand Down

0 comments on commit 047b8a7

Please sign in to comment.