dusang
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
Thank you very much for your help. I asked our admin to add your code to functions.php. Now REST API returns modified_by, but only for the endpoint wp-json/wp/v2/posts/. modified_by is empty however, but REST API returns only one record where date and modified are the same, so maybe it’s supposed to be empty.
Unfortunately for the endpoint wp-json/wp/v2/ht-kb/ there’s no modified_by value returned by REST API. I guess I have to contact the author of the KnowAll theme.
Once again, thank you very much for your help.
Thanks,
Dusan
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
No I can’t. I will ask our admin to add that Code Snippets plugin.
Thanks.
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
Thanks for your answer.
I’m not admin of our WordPress, so I don’t see functions.php. I will give your code to our admin, so hopefully he will insert it into the right place.Thank you very much for your help.
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
No I haven’t as I’m not using PHP to query REST API.
But maybe I don’t understand you… I haven’t installed your plugin yet. So maybe this is a code to add to your plugin?
If this code is for your plugin, will I be able to querymodified_byby using REST API?Thanks.
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
Thank you once more for your quick answer.
If I understand you correctly, you will implement this in the next release. Is this correct?
I’m not using PHP to get all posts/knowledge bases. I wrote this utility in C#, so unfortunately your code snippet won’t help me. What I would need is an example REST API request how to query this modified_by field. Something like this: https://developer.wordpress.org/rest-api/reference/posts/ (they are querying all posts there).
So is there any REST API call where I can query
modify_by, please?Thanks
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
Yes, you’re right. Even though it’s maybe a custom post type, because of that KnowAll theme we’re using. This is REST API URL for posts: https://COMPANY_URL/wp-json/wp/v2/posts/ and this is REST API URL for knowledge articles (what we use): https://COMPANY_URL/wp-json/wp/v2/ht-kb/
The schema for ht-kb is almost the same as schema for posts.
Thanks,
Dusan
Forum: Plugins
In reply to: [WP Last Modified Info] Access via REST APIHi Sayan,
We are using KnowAll theme (Knowledge base). I created a utility to generate a report of Knowledge Base articled modified in the last week, which contains Subject, Creation Date, Created By and Modified Date. The only information missing here is Modified By. I’m getting this information via WordPress REST API.
So that’s why I’m wondering if we install your plugin to get Modified By (the last person who modified Knowledge Base article), if I’ll be able to get this information via REST API.
Thanks,
Dusan