Slight change to category processing
-
Thanks for this plugin! I came across one issue while testing.
The code that checks whether or not a category is an integer works if the input is JSON. It does not work with form data as everything comes through as a string and is_int checks variable type.
I changed this line:
if(!is_int($data['x-categories'][$x])) {
to this:
if (!ctype_digit($data['x-categories'][$x])) {
and the category code now works correctly for me.
https://www.ads-software.com/plugins/json-rest-api-wp-api-categories-and-tags/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Slight change to category processing’ is closed to new replies.