Initial help with official “create a block” tutorial

Glad that you managed to fix the 3rd issue (block validation failed), and as for the first and second issues, you can fix them by using useBlockProps in your block’s edit callback: // In src/index.js import { TextControl } from ‘@wordpress/components’; import { useBlockProps } from ‘@wordpress/block-editor’; export default function Edit( { attributes, className, setAttributes … Read more

Which are the hooks run before/after when a category’s deletion?

wp_delete_category() is a small wrapper around wp_delete_term() ( source ). It has number of hooks, the one that comes right before delete is: do_action( ‘delete_term_taxonomy’, $tt_id ); Hooks after delete: do_action( ‘deleted_term_taxonomy’, $tt_id ); do_action(‘delete_term’, $term, $tt_id, $taxonomy); do_action(“delete_$taxonomy”, $term, $tt_id); There are also few earlier hooks that deal with remapping children terms.

Plugin Upgrade Strategy

This was recently discussed at length on the wp-hackers list. Here’s the thread: Will Activation Hook Be Executed During Plugin Upgradation? Quoting Otto from the list: The simplest method that would work everywhere would be simply to store the version number of the plugin somewhere (like in your options entry in the database), then compare … Read more