When post data is inserted into database it is passed through wp_insert_post_data filter in wp_insert_post() function (source).
According to documentation you can check for set ID argument to distinguish posts being updated from posts being created.
Related Posts:
- How can I edit post data before it is saved?
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- Where is the best place to use add_filter
- How to only hook on Single.php after content?
- How can I limit functionality in one version of a plugin?
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Use external link in the add sub menu
- Failed to invoke other hook from the init hook
- Very stubborn wp_register_script / add_action vs remove
- How to prepend to the_title for admin-side plugin’s use
- do_action and hook methods
- Can a plugin add to header/footer/body content?
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- What is the purpose of $merged_filters?
- How to modify shortcode attributes with data from current post
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- How to check current user before all actions and filters?
- Get Time Taken By Each Action Hook in WordPress
- Plugin developer automated documentation
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- WordPress user account activation
- External Script Using WP – Hooks / Actions Not Working?
- Redirect to another page using contact form 7? [closed]
- Is there a way to figure out which action/filter invoked a function?
- Using add_action before add_filter on a plugin?
- a weird attribute on every html tag
- remove_action not removing add_action from constructor
- Plugin Development – Functions or Hooks?
- Editing wp-config.php
- Advanced WordPress plugin activation detection
- Action on WordPress Install
- How to use add_action for multiple instances of the same class
- How to hook into action/filter call
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Making a list that can be filtered by category/tags
- How to Unhook actions/filters in within Class in plugin
- Nested Actions and Filters
- Use action, filter, or hook to append HTML to WordPress plugin function
- Remove action added in plugin class from theme
- Customize plugin templates
- Help needed with woocommerce (wc stripe) filter
- What action or filter can I use to change all the html returned from server for a page?
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Passing a parameter to filter and action functions
- Am I using an action hook correctly?
- change output location of plugin function using a custom hook
- Filter for modifying image on upload
- Which filters or actions involve with index page for plugin?
- Add a filter to a different custom plugin
- add query string to all pages after user logged in
- How wordpress plugin hooks works? [duplicate]
- Which action/filter can i use for a Member Plugin [closed]
- How to Add Extra Text In WordPress Title Before Post Publish
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- Custom pages with plugin
- How can I see all the actions attached to an “add_action” hook?
- When can you get current page ID and initialize hooks right after?
- How can I show drafts in wp_dropdown_pages list?
- Themes VS Plugins [duplicate]
- How to call bind function in wordpress actions or hooks
- clean wp_options table unused rows
- Delete Associated Media Upon Page / Post Deletion
- ‘wp_login’ action hook not working with wp-login.php file
- When to call add_filter
- Disable woocommerce cookies and delete cart data automatically
- Why can’t I access my Intranet LDAPS with NADI?
- qTranslate remove default directory from link
- add_action in static class [closed]
- Setup page on first login on multisite
- Customize The Events Calendar to Include an Option to Expand for More Events Listings
- changing posts layout in ultimate member profile plugin
- the_post hook is not firing for me
- do_action Nested List
- How can I apply a WP filter on specific plugin version
- How to create Admin Notice from Plugin with argument? [duplicate]
- Add filter on html tags,attributes on specific function in wordpress
- Change Header (Logo) Based on Login
- How to have free shipping for WooCommerce Membership members
- wp_mail – using a custom field value
- Automatic recurring payment using YITH subscription and Dokan Stripe
- apply_filters(woocommerce_get_item_data, …) Causing errors when adding to cart
- Hide fields in woocommerce settings
- post title not changing at post page
- Using OR Condition with facetwp facets
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Redirect to a page while maintaining search query parameters without causing an infinite loop
- How to use custom footer template in a site-plugin?
- Customize a widget position
- trying to create simple plugin to filter categories from all authors
- From a legal perspective, is it okay to customize a plugin’s code?
- WP Members additional fields on user profile [closed]
- WooCommerce Order Status Displays Twice on Order Page
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- FacetWP custom display based on post type [closed]
- How to fix a Wordfence scan that doesn’t finish?
- How can we extent core/group or cover block?
- Customize WP Filter Hook
- Remove 3rd party plugin notices from within own plugin