filter reusable block updates
-
Continuing from https://www.ads-software.com/support/topic/filter-before-save/
I am trying to make changes to a reusable post’s content programmatically while saving it.
I have tried hooking into
content_save_pre
and a bunch of other filters mentioned insanitize_post_field
https://developer.www.ads-software.com/reference/functions/sanitize_post_field/add_filter('edit_post_content', function ($content, $post_id) { error_log('======> edit_content'); return $content; }, 10, 2); add_filter('content_edit_pre', function ($content, $post_id) { error_log('======> edit_content'); return $content; }, 10, 2); add_filter('edit_post_content', function ($content, $post_id) { error_log('======> edit_post_content'); return $content; }, 10, 2); add_filter('pre_post_content', function ($content) { error_log('======> pre_content'); return $content; }); add_filter('post_content_pre', function ($content) { error_log('======> content_pre'); return $content; }); add_filter('post_content', function ($content, $post_id, $context) { error_log('======> edit_content'); return $content; }, 10, 3); add_filter('post_post_content', function ($content) { error_log('======> post_content'); return $content; });
I see nothing in my error log.
I wonder if I am looking at the right place. Is there a HOOK to filter saving reusable blocks at all?
Thanks
Shawn
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘filter reusable block updates’ is closed to new replies.