The wp_insert_post_data filter can do that:
add_filter( 'wp_insert_post_data' , 'filter_post_data' , '99', 2 );
function filter_post_data( $data , $postarr ) {
// Change post title
$data['post_title'] .= '_suffix';
return $data;
}
Related Posts:
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How to only hook on Single.php after content?
- Use external link in the add sub menu
- Failed to invoke other hook from the init hook
- do_action and hook methods
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Get Time Taken By Each Action Hook in WordPress
- remove_action not removing add_action from constructor
- Plugin Development – Functions or Hooks?
- Advanced WordPress plugin activation detection
- How to hook into action/filter call
- Edit post image attributes on fly?
- Use action, filter, or hook to append HTML to WordPress plugin function
- Customize plugin templates
- 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
- change output location of plugin function using a custom hook
- add query string to all pages after user logged in
- How wordpress plugin hooks works? [duplicate]
- How to Add Extra Text In WordPress Title Before Post Publish
- Where is the best place to use add_filter
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- When can you get current page ID and initialize hooks right after?
- WordPress admin notice in plugin function
- Using the ‘draft_to_publish’ hook (post status transition)
- Filter Hook on plugin update
- 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]
- How to prepend to the_title for admin-side plugin’s use
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Can a plugin add to header/footer/body content?
- Is it possible to remove this action? (as it’s added just before it’s called)
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- Woocommerce Shipping module available only for type of products [closed]
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- merging an array to an existing array using add_filter
- What is the purpose of $merged_filters?
- template_redirect not being called when using ajax
- How to add rewrite rules and pagination to retrieve attachments files?
- Plugin custom Action Hook not working
- add_action in functions.php, do_action in plugin?
- add action for displaying posts using a shortcode
- Randomize attachment IDs
- ‘wp_login’ action hook not working with wp-login.php file
- Pass info from functions.php to plugin
- Change permalink structure hidden button edit
- WordPress filter that hook after each action/filter hook
- Inserting above the comment template
- Insert new user with form submit ‘init’ hook
- Calling plugin function inside custom plugin for onclick event
- How to check current user before all actions and filters?
- Filtering WooCommerce Orders by Category
- Plugin developer automated documentation
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- How to get post ID with hooks publish_post, new_to_publish, etc
- Redirect to another page using contact form 7? [closed]
- Is there a way to figure out which action/filter invoked a function?
- Add sub menu page in your plugin
- What exactly happens to function argument availability when using a filter?
- the_post hook is not firing for me
- Create a post builder skin in a plugin
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Hook for page Request?
- Editing wp-config.php
- Are there action hooks for comments?
- How to use the pre_option filter before a plugin loads?
- WooCommerce: after install hook
- How to use filter to disable adding a product to wishlist?
- WordPress: Add custom add_filter for custom functions
- Add action to custom Function
- Action on WordPress Install
- What hook can I use to modify custom post data before it is displayed on the page?
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Use a hook or filter, or overwrite this Gamipress function?
- Hook from plugin doesn’t fire up from external PHP script
- update_option_{$option} not working (do function after options are saved)
- Unpublished Pages Failing To Appear On Custom Path
- Callback hooked to post_updated firing on new posts as well
- Randomize post (and page) IDs on generation
- The function called on the wp head hook becomes null
- Making a list that can be filtered by category/tags
- Hooking into the HTML header container
- How to Unhook actions/filters in within Class in plugin
- Plugin function in child theme
- Nested Actions and Filters
- Passing function into add_action always returns the first argument
- Remove action added in plugin class from theme
- {status}_{post_type} does not run correctly?
- What action or filter can I use to change all the html returned from server for a page?
- wp_login_form() ignoring login_form action hook
- Plugin Hook: Get posts
- Which filters or actions involve with index page for plugin?
- OOP Plugin: Where should I place the action hooks in the class?
- Add a filter to a different custom plugin
- Which action/filter can i use for a Member Plugin [closed]
- Change social icon in twenty twenty three theme