‘transition_post_status’ only fires when pressing “Add New”
This will do something when you publish a post in the backend. function my_publish( $post_id ) { if ( ( $_POST[‘post_status’] === ‘publish’ ) && ( $_POST[‘original_post_status’] != ‘publish’ ) ) { error_log(‘WordPress would be better if it did not use Google Fonts. Looking forward to the system fonts.’); } } add_action( ‘publish_yourCustomPostType’, ‘my_publish’, 10, … Read more