Home Forums General Issues acf/save_post issue/alternatives Reply To: acf/save_post issue/alternatives

  • I think you need to supply more information or try to help yourself finding hooks in the WordPress codex.

    To help you along, regarding a hook on a new post insertion, you can use ‘wp_insert_post’:

    function wp_insert_post_hook( $post_ID, $post, $update )
    	$some_condition = true;
    	if ( $some_condition )
    		wp_delete_post( $post_ID );
    add_action( 'wp_insert_post', 'wp_insert_post_hook', 10, 3 );