When does a function assigned to the content_filtered_edit_pre filter hook fire?

I added a function to the filter hook tag 'content_filtered_edit_pre', but it doesn’t seem to fire no matter what I do. I am also aware of 'content_edit_pre', but I am curious as to when this filter hook is called. The following does not result in ‘filtered ‘ being added to the front of my post when I open it in the edit screen, even after another filter has been run:

function test_of_content_filtered_edit_pre( $content, $post_id ) {
    return "filtered ".$content;
}
add_filter( 'content_filtered_edit_pre', 'test_of_content_filtered_edit_pre', 10, 2 );

The only documentation I can find on the Internet seems to be from the wordpress codex or copies of it.

Related posts

1 comment

  1. This is activated within the sanitize_post_field() function:

    Calls ‘edit_{$field}’ and ‘{$field_no_prefix}_edit_pre’ passing $value
    and $post_id if $context is ‘edit’ and field name prefix is ‘post_’.

    So in the case of the post_content_filtered field, the filters are

    edit_post_content_filtered
    

    and

    content_filtered_edit_pre
    

Comments are closed.