Create new custom post and post category of same name
You are way off, if you say that wp_publish_post() has been renamed to {$new_status}_{$post->post_type}. The latter actually is a hook, while the former is a function. Where the latter is part of the former, because it’s part of wp_insert_post. The hook {$new_status}_{$post->post_type} is part of wp_transition_post_status() – additionally see the source. You might want to … Read more