Unanswered Questions
2,491 questions with no answers
6
votes
0
answers
611
views
How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
If I want to extend the core block I can use Block Filters where I found a filter like editor.BlockEdit.
Example from doc:
const { createHigherOrderComponent } = wp.compose;
const { Fragment } = wp....
6
votes
0
answers
521
views
Gutenberg Blocks doesn't render correctly when using do_blocks
I'm trying to render a post_content with blocks using the do_blocks function, that takes a gutenberg content, parses every block, and returns an HTML string.
The problem is that some blocks aren't ...
6
votes
0
answers
1k
views
WordPress REST API call generates nonce twice on every call
I'm trying to login a user via the REST API, and then retrieve the current user on subsequent requests. As per the documentation, in my plugin, I am creating and retrieving a nonce after a successful ...
6
votes
0
answers
636
views
How to load paginated post pages via ajax
Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
4
votes
0
answers
1k
views
Developing the save function in Gutenberg blocks
I am editing the save function on my local wordpress instance. Every time I make a change, I need to manually click the "Attempt Block Recovery" button to see the updated change when I go to ...
4
votes
0
answers
331
views
How to disable "Transform to" option in Gutenberg custom blocks
I prepared some non-standard Gutenberg blocks.
They have a very specific purpose. Therefore, I do not want them to have the Transform to option available.
What I found is the ability to use support: {}...
4
votes
0
answers
76
views
Using Primary Color in Plugin Block
I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to ...
4
votes
0
answers
194
views
permalinks with get variables
I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows
add_filter( 'query_vars','driver_vars' );
function driver_vars( $vars ) {
...
3
votes
0
answers
77
views
Block Editor: Filter getSaveElement and innerBlocks
I'm the author of the Falang multilanguage plugin for wordpress (https://wordpress.org/plugins/falang/), trying to add a feature allowing site admins to translate their site from inside the gutenberg ...
3
votes
0
answers
695
views
Gutenberg text field validation
I have been searching for ages but can't seem to find an exact method on how to perform text input validation when building custom blocks. I saw that for TextControl inputs you can just pass the ...
3
votes
0
answers
210
views
Gutenberg is there a way to know if the current block is reusable?
So I have developed some blocks using React, I save my css generated in the post meta, that's works fine. In the case of reusable blocks:
Whene we set a block as reusable this block will saved as ...
3
votes
0
answers
572
views
Solve cors problem using rest api or ajax
I'm building an app with nuxt using WP as a CMS, so I have this code in my functions.php to allow any origin (temporary) using the rest api and admin-ajax urls
function add_cors_http_header(){
// ...
3
votes
0
answers
1k
views
Is it possible to intercept all ajax requests and get the parameters and the returns?
Is there any hook that always goes through it, where I can see all the requests, and also the returns after the "action" that is executed?
I need to intercept all requests, including requests from ...
3
votes
0
answers
259
views
Gutenberg - What is the best way to save/update post meta?
What would be the best way in Gutenberg to save/update post meta (not from a block). I can't find an API for it.
I was thinking of doing some ajax in componentDidMount using wp.ajax.post
Any advice ...
3
votes
0
answers
449
views
Wordpress password reset - why post rp_key?
I'm developing a plugin and after reading through wp-login.php, I can't seem to work out why some things are done the way they are.
Why does WordPress hide the reset password key from the URL?
After ...