WP-API / rest-filter

Restores the `filter` param to post enpdpoints.
GNU General Public License v2.0
189 stars 48 forks source link

Does this plugin still work? #26

Open jigsawsoul opened 6 years ago

jigsawsoul commented 6 years ago

Does this plugin still work, it has seemed to break on my site.

danielgcnett commented 6 years ago

Yes, but use this fork: https://github.com/SK8-PTY-LTD/wp-rest-filter/blob/master/wp-rest-filter.php

ronnieserr commented 5 years ago

Hi, I used the https://github.com/SK8-PTY-LTD/wp-rest-filter/blob/master/wp-rest-filter.php but it doesn't seem to work.

Please advise.

Here's the API log

Date: 2018-11-21 16:24:23 Source: WP REST API Method: GET Status: 200 Elapsed Time: 42ms Response Length: 145 User: api IP Address: 75.46.144.108 Download | Copy

{ "user_agent": "Paw\/3.1.8 (Macintosh; OS X\/10.14.1) GCDHTTPRequest", "connection": "close", "host": "wp.inbox.fm", "authorization": "Basic YXBpOlBQYiR4SXBMeDI3d1hIdjRrbFI3TkRCSQ==" } Download | Copy

{ "filter": { "meta_key": "id", "meta_value": "320", "meta_compare": "=" } } Download | Copy

[] Download | Copy

{ "Content-Type": "application\/json; charset=UTF-8", "X-Robots-Tag": "noindex", "Link": "<http\/\/www.wp.inbox.fm\/wp-json\/>; rel="https\/\/api.w.org\/"", "X-Content-Type-Options": "nosniff", "Access-Control-Expose-Headers": "X-WP-Total, X-WP-TotalPages", "Access-Control-Allow-Headers": "Authorization, Content-Type", "Expires": "Wed, 11 Jan 1984 050000 GMT", "Cache-Control": "no-cache, must-revalidate, max-age=0", "Allow": "GET, POST" } Download | Copy

{ "data": [], "headers": { "X-WP-Total": 0, "X-WP-TotalPages": 0, "Allow": "GET, POST" }, "status": 200 }


Route: /wp/v2/posts Date: 2018-11-21 16:20:40 Source: WP REST API Method: GET Status: 200 Elapsed Time: 56ms Response Length: 145 User: api IP Address: 75.46.144.108 Download | Copy

{ "user_agent": "Paw\/3.1.8 (Macintosh; OS X\/10.14.1) GCDHTTPRequest", "connection": "close", "host": "wp.inbox.fm", "authorization": "Basic YXBpOlBQYiR4SXBMeDI3d1hIdjRrbFI3TkRCSQ==" } Download | Copy

{ "filter": { "meta_key": "modified", "meta_value": "2018-11-20T18:57:26", "meta_compare": "<" } } Download | Copy

[] Download | Copy

{ "Content-Type": "application\/json; charset=UTF-8", "X-Robots-Tag": "noindex", "Link": "<http\/\/www.wp.inbox.fm\/wp-json\/>; rel="https\/\/api.w.org\/"", "X-Content-Type-Options": "nosniff", "Access-Control-Expose-Headers": "X-WP-Total, X-WP-TotalPages", "Access-Control-Allow-Headers": "Authorization, Content-Type", "Expires": "Wed, 11 Jan 1984 050000 GMT", "Cache-Control": "no-cache, must-revalidate, max-age=0", "Allow": "GET, POST" } Download | Copy

{ "data": [], "headers": { "X-WP-Total": 0, "X-WP-TotalPages": 0, "Allow": "GET, POST" }, "status": 200 }