Self-hosted plugin update problems

Ok, this is a working solution but a hacky one. First, the explanation. After much gnashing of teeth and error logging I’ve discovered that the filter ‘pre_set_site_transient_update_plugins’ is called at least twice during a plugin update check. Sometimes, the passed array has the ‘checked’ array attached to it, sometimes it does not. I have no … Read more

Is there a better way to implement responsive images than what WordPress uses by default?

Unfortunately, I’ve found the images within Gutenberg/block editor a lot left to be desired and the development work with images in 2020 has been primarily focused on adding cropping, rotating images within the block editor. The limitations of responsive images in the block editor is one of my biggest criticisms of the block editor. What … Read more

How to allow core Gutenberg blocks selection only when you are inside a custom inner block

You will need to filter the template for the post type: add_action( ‘init’, ‘setup_template’ ); function setup_template() { $post_object = get_post_type_object( ‘post’ ); $post_object->template = [ [ ‘your/custom/block’ ] ]; $post_object->template_lock = ‘all’; } This will pre-populate the post with a single instance of your custom block and lock it from being changed. By locking … Read more

wordpress 3.0 json issue

When I comment out the line: @header(‘Content-type: application/json; charset=UTF-8’); it works for me p.s. there is also a closing php opening tag in it without the word php there is a closing php tag at the bottom which can be gone there is a notice on an undefined index. better would be to use $charset … Read more