codebykat / wp-post-by-email

Post By Email plugin for WordPress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add filter for disable strip_tags and trim $content

casepress opened this issue · comments

Hi Kat!
I need a hook off the filter message content.
Here https://github.com/codebykat/wp-post-by-email/blob/master/class-post-by-email.php#L687

Add filter as apply_filters( 'content_filter_disable', false );

Such as filter 'p2be_email_replies_enabled' in https://github.com/humanmade/P2-By-Email/

And swith function as add_filter( 'content_filter_disable', '__return_true' );

Example https://codeo.me/3GM

Maybe something along these lines would work. This would not disable filtering altogether but use the global $allowedposttags.

$allowed_html = wp_kses_allowed_html( 'post' );  
$content = wp_kses( $string, $allowed_html );

Hi there @casepress, can you tell me more about what you're trying to do with this filter?