WordPress filter hook · part of WordPress core
content_save_pre
A WordPress core filter that 20 plugins also fire themselves, running on 3.6M+ sites between them.
“This filter is already documented in core/wp-includes/default-filters.php”
How to use content_save_pre
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'content_save_pre', function( $post_data ) {
// Change $post_data here.
return $post_data;
}, 10, 1 );Argument names come from Jetpack's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
20 plugins that fire content_save_pre
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Jetpack3+ million installs
apply_filters( 'content_save_pre', $post_data['post_content'] )modules/markdown/easy-markdown.php:571 -
Page Builder by SiteOrigin400,000+ installs
apply_filters( 'content_save_pre', $content )compat/layout-block.php:536 -
BuddyPress90,000+ installs
apply_filters( 'content_save_pre', $output )cli/src/email.php:237 -
Hustle80,000+ installs
apply_filters( 'content_save_pre', wp_slash( $value ) )inc/hustle-module-model.php:567 -
Easy MCP AI40,000+ installs
apply_filters( 'content_save_pre', $filtered )includes/builders/class-shortcode-adapter.php:19 -
LifterLMS10,000+ installs
apply_filters( 'content_save_pre', addslashes( $val ) )includes/abstracts/abstract.llms.post.model.php:1433 -
WP Publication Archive400+ installs
apply_filters( 'content_save_pre', $content )lib/class.wp-publication-archive.php:39 -
Fleet Agent Site Manager200+ installs
apply_filters( 'content_save_pre', wp_slash($content) )includes/commands/class-ability-run-command.php:1689 -
Markdown Editor100+ installs
apply_filters( 'content_save_pre', $post_data['post_content'] )includes/class-easy-markdown.php:462 -
WP HyperMD10+ installs
apply_filters( 'content_save_pre', $post_data['post_content'] )src/App/WPComMarkdown.php:483 -
bbSigPress10+ installs
apply_filters( 'content_save_pre', htmlspecialchars_decode($_POST['bbsigBB' . $i . '_usr']) )bbSigPress.php:284 -
Resource Booking and Availability Calendar10+ installs
apply_filters( 'content_save_pre', $_POST['cs_RBA_content'] )cstart-Resource-booking-and-availability-calendar.php:182 -
Multiple Rich Editors10+ installs
apply_filters( 'content_save_pre', $editor_content )multiple-rich-editors.php:83 -
WXSIM Forecast10+ installs
apply_filters( 'content_save_pre', $_POST['WXSIManimatedimage'] )WXSIMforecast.php:120 -
plus twit like10+ installs
apply_filters( 'content_save_pre', $_POST['pltpluginContent'] )plustwitlike.php:169 -
HeadJS Loader10+ installs
apply_filters( 'content_save_pre', $_POST['custom_location'] )headjs-loader.php:312 -
Mark It Down WordPress!Fewer than 10 installs
apply_filters( 'content_save_pre', $post_data['post_content'] )markdown/easy-markdown.php:463 -
Paloose XML ProcessorFewer than 10 installs
apply_filters( 'content_save_pre', $_POST[ 'palooseDirectory' ] )paloose-admin/options.php:148 -
LumteraFewer than 10 installs
apply_filters( 'content_save_pre', $value )includes/Remediation/class-applier.php:1323 -
Practice Radar ConnectorFewer than 10 installs
apply_filters( 'content_save_pre', apply_filters( 'pre_post_content', wp_slash( (string) $content ) ) )practice-radar-connector.php:452
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.