Created
September 20, 2018 14:40
-
-
Save tripflex/86c00753280038c3fa5a347fa089f66f to your computer and use it in GitHub Desktop.
Apply the_content filter to any field value before output when using WP Job Manager Field Editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// You MUST replace "META_KEY" below with the meta key you want to apply the_content filter to before it's output | |
// This is useful for things like auto embedding, auto paragraphs, etc | |
add_filter( 'field_editor_output_as_value_META_KEY', 'smyles_apply_the_content_filter' ); | |
function smyles_apply_the_content_filter( $value ){ | |
if( empty( $value ) ) return $value; | |
return apply_filters( 'the_content', $value ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment