As @Pieter said, you can use transition_post_status
:
function wpse_187997_job_status( $new_status, $old_status, $post ) {
if ( $post->post_type === 'job' && $new_status !== $old_status ) {
// Post type "job" and status has changed
}
}
add_action( 'transition_post_status', 'wpse_187997_job_status', 10, 3 );
Related Posts:
- Why The Init Hook For Custom Post Types
- How to register custom post types in a plugin?
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- Types plugin custom post add_action hooks
- How do I change the author of a custom post type?
- How to correctly get post type in a the_title filter
- How to add a button to custom post type’s posts-page
- How to intercept publish post for a custom post type “event”
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Creating a custom public user page
- Is flush_rewrite_rules necessary when creating a custom post type? Why?
- Remove Slug from Custom Post Type results in 404
- Insert slider (Custom Post Type) into pages
- How do I create a custom post type for a training CMS in WordPress?
- WP Query group/order by category name
- Save or update data when custom post published
- Uploaded image not appearing in custom post type
- Row actions not showing? Why?
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- How to add multiple featured image in meta box in post editor?
- How to add notification in the sidebar of the administration panel when a Custom post type is created? [duplicate]
- Using pre_get_posts to Filter Posts
- Remove “Get Shortlink” button in admin of custom post type
- update_post_meta() whenever custom post type is updated
- How to get Custom Post ID by adding filter to child theme’s function
- Custom Post Type get_post_type_archive_link( $post_type ) returns false
- How do I set the link in the Custom Post Type admin menu?
- How to List Thumbnails based on Custom Categories
- Adding Meta Boxes while Registering a Post Type in a Class
- How to have the right design for a custom post type without accessing themes
- Dynamic Custom Post Type Plugin
- Custom Taxonomy Not Showing in Menu
- Set object terms not working on plugin activation
- Using custom page templates with plugin [duplicate]
- Get all of user’s custom post types in WP Admin for plugin
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Custom Post Type: Upload Multiple Images
- How to add a custom taxonomy to show up in a custom post type menu?
- Give a permalink to Custom Post Types without title
- Getting template_include to work when allow_url_include is off?
- WordPress post_where & posts_join not working only for custom post type
- Custom Permalink to remove category word , keeping posts permalink with date?
- Form action/link to render a plugin in WordPress front-end
- How to Create a WordPress Plugin With Custom Post Type/Custom Field Features?
- Adding a metabox on a CPT’s submenu page
- Create new custom post and post category of same name
- Use remove_meta_box conditionally on custom post type
- ACF in wordpress
- Theme independent plugin by using default page template
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- post_parent in custom post type
- How do I amend form data before it is saved for a custom post type
- Dynamically insert code to custom post type loop
- How do I add custom HTML to the content of an archive page’s posts?
- Unable to format dates to put in event calendar
- How to add query args to links to CPT admin submenu
- Dynamic assign a custom template to custom post type posts
- How to add and display custom content that is not a post
- Custom post type in Custom widget – $listItem
- Problem with adding custom post type meta to header by plugin
- Creating alternate meta box context locations
- Generating and downloading files with WP API
- Convert Custom Table Data Based Plugin To Be Searchable
- add_action ‘init’ from inside a class for custom post types
- Limiting Amount of Posts in a Custom Post Type again
- Limit Amount of Pages users can create in Custom Post Types
- Wp Meta Query does not work while simple Query Works
- Auto update publish date of CPT Post if default post custom field value match to cpt post CF Value
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- How to add a default predefined thumbnail when creating a brand new post?
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Plugin Development using classes – Public & Private Callbacks
- URL issue retrieving Custom Post Types using Backbone JS API
- WordPress Custom Post Loop
- Create a post automatically if search result has zero results
- Correct way adding External classes to Custom Post type and output their methods to template
- ‘Simple’ Reservation System
- Post Click Redirect to Custom URL instead of Single Post Page
- Custom Post Type Front Page Gives 404
- Show Post columns to specific users on condition
- Custom Post type plugin is using theme single.php and style.css
- get_permalink() of page the enclosing page not posts
- Run query on specific admin options page and send results to select field in another function
- Not able to get all the actions (View, Edit, Quick Edit, Trash), and not able to delete post in custom post type
- call a function when insert and update a custom post type
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- WP_Query doesn’t accept Category ID
- Error in WP Query. If variable is empty it is displaying previous post value
- do action inside a class is not working
- Custom post type not being pulled in widget
- Registering an optional custom post type from a plugin
- Filter wp_dropdown_categories Per Post Type
- Generate custom RSS from a plugin
- Issue on Counting CPT’s Under Taxonomy Term
- Add Excerpt On Quicksand Plugin
- Inserting into WP DB
- Create settings page to enable or disable CPT
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- Custom Post Type urls not working
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs