How to create notification on frontend using heartbeat api for multiple custom post types
How can I get correct action hook on publish_posts for multiple custom types ?
I have a following problem, I can use this hook for posts or single custom post_type, but I don't know correct hook for multiple custom post types:
// Post publication for posts
add_filter ( 'publish_post', 'notify_published_post' );
function notify_published_post( $post_id ) {
I would like to publish to all even future custom post_types, so I would like to get something like this:
// Post publication hook for all custom posts
add_filter ( 'publish_anypost', 'notify_published_post' );
function notify_published_post( $post_id ) {
Topic heartbeat-api hooks custom-post-types Wordpress
Category Web