WordPress filter hook · part of WordPress core

the_content_export

A WordPress core filter that 34 plugins also fire themselves, running on 11.9M+ sites between them.

“Filters the post content used for WXR exports.”

How to use the_content_export

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:

functions.php
add_filter( 'the_content_export', function( $post_content ) {
	// Change $post_content here.
	return $post_content;
}, 10, 1 );

Argument names come from Elementor Agent Ready Website Builder'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 →

34 plugins that fire the_content_export

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Elementor Agent Ready Website Builder icon Elementor Agent Ready Website Builder10+ million installs apply_filters( 'the_content_export', $post->post_content ) core/utils/import-export/wp-exporter.php:484
  2. WPvivid icon WPvivid900,000+ installs apply_filters( 'the_content_export', $post->post_content ) includes/class-wpvivid-exporter.php:1570
  3. Blocksy Companion icon Blocksy Companion300,000+ installs apply_filters( 'the_content_export', $post->post_content ) framework/features/demo-install/export/content-export.php:550
  4. Formidable Forms icon Formidable Forms300,000+ installs apply_filters( 'the_content_export', $post->post_content ) classes/views/xml/posts_xml.php:36
  5. Modula Image Gallery icon Modula Image Gallery100,000+ installs apply_filters( 'the_content_export', $post->post_content ) includes/admin/importer/class-modula-importer-exporter.php:72
  6. Beaver Builder Page Builder icon Beaver Builder Page Builder100,000+ installs apply_filters( 'the_content_export', $post->post_content ) includes/export.php:360
  7. Kubio AI Page Builder icon Kubio AI Page Builder80,000+ installs apply_filters( 'the_content_export', $post->post_content ) lib/src/DemoSites/WXRExporter.php:226
  8. BetterDocs icon BetterDocs30,000+ installs apply_filters( 'the_content_export', $post->post_content ) includes/Admin/XMLExporter.php:497
  9. Timetable and Event Schedule by MotoPress icon Timetable and Event Schedule by MotoPress30,000+ installs apply_filters( 'the_content_export', $post->post_content ) classes/models/class-export.php:215
  10. Disqus Comment System icon Disqus Comment System30,000+ installs apply_filters( 'the_content_export', $post->post_content ) rest-api/class-disqus-rest-api.php:1101
  11. WPS Menu Exporter icon WPS Menu Exporter10,000+ installs apply_filters( 'the_content_export', $post->post_content ) classes/plugin.php:279
  12. LearnPress icon LearnPress5,000+ installs apply_filters( 'the_content_export', $post->post_content ) inc/admin/providers/learnpress/xml/lp-export-item.php:18
  13. Restaurant Menu and Food Ordering icon Restaurant Menu and Food Ordering2,000+ installs apply_filters( 'the_content_export', $post->post_content ) classes/models/class-export.php:209
  14. Export Featured Images icon Export Featured Images1,000+ installs apply_filters( 'the_content_export', $post->post_content ) admin/wpefi-admin.php:365
  15. Export WordPress Menus icon Export WordPress Menus1,000+ installs apply_filters( 'the_content_export', $post->post_content ) wp-export-menus.php:240
  16. Advanced Export for WP & WPMU icon Advanced Export for WP & WPMU700+ installs apply_filters( 'the_content_export', $post->post_content ) ra-export.php:193
  17. Export Custom Pages icon Export Custom Pages700+ installs apply_filters( 'the_content_export', $post->post_content ) wp-export-custom-pages.php:225
  18. Select Post Export icon Select Post Export400+ installs apply_filters( 'the_content_export', $post->post_content ) includes/select-post-export-class.php:39
  19. Kata Plus icon Kata Plus300+ installs apply_filters( 'the_content_export', $post->post_content ) includes/backend/wp-export.php:556
  20. RSVPMaker icon RSVPMaker300+ installs apply_filters( 'the_content_export', $post->post_content ) export.php:611
  21. BZOTech Theme Core icon BZOTech Theme Core100+ installs apply_filters( 'the_content_export', $post->post_content ) libs/menu.exporter.php:146
  22. Easy Admin Color Schemes icon Easy Admin Color Schemes100+ installs apply_filters( 'the_content_export', $string ) easy-admin-color-schemes.php:776
  23. WPGeared Better Export icon WPGeared Better Export90+ installs apply_filters( 'the_content_export', $post->post_content ) includes/class-wpgeared-wxr-writer.php:216
  24. Mattytap Sermons icon Mattytap Sermons70+ installs apply_filters( 'the_content_export', $post->post_content ) includes/admin/export/class-sm-export-sm.php:486
  25. Scientific and Interactive Blocks icon Scientific and Interactive Blocks70+ installs apply_filters( 'the_content_export', $post->post_content ) includes/export.php:616
  26. Livewords Flow icon Livewords Flow10+ installs apply_filters( 'the_content_export', $post->post_content ) admin/xml.php:485
  27. T2 Export icon T2 Export10+ installs apply_filters( 'the_content_export', $post->post_content ) includes/export_wp.php:395
  28. New Post Automatic XML Backup by Email icon New Post Automatic XML Backup by Email10+ installs apply_filters( 'the_content_export', $post->post_content ) new-post-automatic-xml-backup-by-email.php:59
  29. cm4all-wp-impex icon cm4all-wp-impex10+ installs apply_filters( 'the_content_export', $post->post_content ) inc/impex-export-extension-content.php:441
  30. Social Traffic Commando icon Social Traffic Commando10+ installs apply_filters( 'the_content_export', $post->post_content ) oo/external/nxs_functions.php:582
  31. Simple Export Page icon Simple Export Page10+ installs apply_filters( 'the_content_export', $post->post_content ) class-duosep-export.php:84
  32. Bubok Publisher icon Bubok Publisher10+ installs apply_filters( 'the_content_export', $post->post_content ) export.php:300
  33. BPOTech Export Specific Post icon BPOTech Export Specific PostFewer than 10 installs apply_filters( 'the_content_export', $post->post_content ) includes/export-specific-post.php:647
  34. OpenLab Module Builder icon OpenLab Module BuilderFewer than 10 installs apply_filters( 'the_content_export', $post->post_content ) classes/Export/WXP.php:429

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.