bobbingwide / react-SB

React UI for Genesis-SB theme
GNU General Public License v3.0
1 stars 0 forks source link

Cater for inclusion of the REST API to WordPress 4.7 #3

Closed bobbingwide closed 7 years ago

bobbingwide commented 7 years ago

WordPress 4.7 includes some of the logic that was implemented by the WP REST API plugin. But the API has changed. So the code written for WordPress 4.6 and WP REST API may not work. This is true for the react-SB requests that used the filter parameter.

The simplest solution is to change the code client code to use requests that do work. In our case this means changing /wp-json/wp/v2/bigram?filter[s-letter]=sletter-name to /wp-json/wp/v2/bigram?s-letter=sletter-id

The value passed needs to be the term_id rather than the term value. This is already returned to the client so it's not a major problem. The WP REST API plugin can be deactivated.

Same change for b-letter