How can I enforce user to use Application password to generate JWT token? [closed]
How can I enforce user to use Application password to generate JWT token? [closed]
How can I enforce user to use Application password to generate JWT token? [closed]
What you are trying to do is not something that endpoint is capable of. You can create attachments, you can even rotate and crop the file, but you cannot replace the attached file. When cropping/scaling/rotating an image, a new attachment and ID are created for the newly edited image. However, sending an UPDATE/PUT/POST request to …
You were on the right track with the second try. Put this is functions.php, or wherever: if (!wp_next_scheduled(‘fetch_webcategories_hook’)) { wp_schedule_event( time(), ‘hourly’, ‘fetch_webcategories_hook’ ); } add_action ( ‘fetch_webcategories_hook’, ‘fetch_webcategories’ ); It’s not quite a real hourly schedule because somebody has to visit the site to trigger it, so if you have VERY low traffic it …
Because what you’re trying to do boils down to the fundamental question: How do I log in to WordPress using only the REST API? The answer: You can’t in stock/vanilla WordPress. /wp-json/wp/v2/users/me/application-passwords/ “message”: “You are not currently logged in.”, and /wp-json/wp/v2/users/1/application-passwords/ “message”: “Sorry, you are not allowed to create application passwords for this user.”, Are …
For all REST API routes, the rest_api_init action hook fires when preparing to serve a REST API request. The request URI ($_SERVER[‘REQUEST_URI’]) can be inspected with a regular expression to detect the root (e.g. wp-json) and the route (e.g. /wp/v2/posts) of the request. You can then decide what to return to the client (e.g. WP_Error, …
How to boost WP custom post REST API GET queries by custom taxonomies
I managed to solve the issue, as the SEARCH EVERYTHING plugin has this exact functionality. The issue was not related to WP-REST, but to the standard WordPress Search.
You can look into queues e.g. create a custom database table, and write to it within the rest_post_dispatch or rest_pre_serve_request filter just before it is dispatched. Then you can bulk process the queue (first record in is the first record out) via e.g. wp-cron and the user will not be affected by that potentially heavy …
It turns out this is due to SiteGround caching data, in particular its Dynamic Cache. According to their docs on Dynamic Cache, they will “… monitor whether your browser has these cookies and bypass the cache if they are present”. One of the cookies they check against is wordpress_logged_in_, which explains the behaviour I described. …
Hide custom posts from certain taxonomy in rest api