Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

rest-api

Identical wp_rest nonce returned from rest_api

August 5, 2022 by Magenaut

Immediately update the $_COOKIE array once you’ve called wp_signon() (which calls wp_set_auth_cookie()). And you can do that using the set_logged_in_cookie hook.

Categories Q&A, Wordpress Tags ajax, nonce, rest-api Leave a comment

apiFetch security

August 5, 2022 by Magenaut

I’m writing some code that updates options using update_option using the REST API and apiFetch.

Categories Q&A, Wordpress Tags rest-api Leave a comment

Creating a custom endpoint for rest, I see the endpoint exists in the wp-json, but the request is returning 404

August 5, 2022 by Magenaut

I have attempted to register the route, tried all sorts of different parameters, feel my code looks like many of the examples on this site, but can’t figure out why it doesn’t work.

Categories Q&A, Wordpress Tags rest-api Leave a comment

Custom endpoint that returns an xml

August 5, 2022 by Magenaut

I need to create an endpoint that when called returns an XML with the products of the store. I have the XML generated, but I don’t know how to make the endpoint return it in XML format, because now it returns it in JSON format, and being an XML, it does not return it well.

Categories Q&A, Wordpress Tags endpoints, plugin-development, rest-api Leave a comment

Wrong encoding of dynamic block properties problem when loggen in as editor

August 4, 2022 by Magenaut

German umlauts in dynamic block properties ( strings ) are incorrectly encoded/saved in the database, when it’s an editor, but correct if edited by an admin.

Categories Q&A, Wordpress Tags rest-api Leave a comment

Setting ?context=edit results in rest_forbidden_context, even for an Administrator user

August 4, 2022 by Magenaut

I’m an Administrator role user. When I’m using the REST API, if I attempt to call

Categories Q&A, Wordpress Tags rest-api Leave a comment

Error invalid parameters with REST API

August 4, 2022 by Magenaut

Trying to use the WordPress API to create a blog post with tags/categories, etc. but running into some errors. I am running the PHP code below outside of my WordPress instance and get the following:

Categories Q&A, Wordpress Tags rest-api Leave a comment

Adding post fields in wp-json/wp/v2/search

August 4, 2022 by Magenaut

I am trying to add the post (pages, posts) excerpt in the wp-json/wp/v2/search get endpoint but this endpoint seems to not take into account the register_rest_field method.

Categories Q&A, Wordpress Tags rest-api Leave a comment

REST filters only firing when I have a param set

August 4, 2022 by Magenaut

I’m trying to use a REST filter to require a certain parameter is set.

Categories Q&A, Wordpress Tags custom-post-types, custom-taxonomy, filters, rest-api Leave a comment

Filter DELETE REST API calls

August 4, 2022 by Magenaut

I have a custom post type, that can be editable by more than one user.
Each post of that type has a field with the user ids who can edit it (kinda like co-authors).
But since many users have permissions to the post, I am not sure how to prevent deletion by other users (not in the co-authors’ list).

Categories Q&A, Wordpress Tags permissions, rest-api, wp-delete-post Leave a comment
Older posts
Newer posts
← Previous Page1 … Page5 Page6 Page7 … Page10 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress