Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created September 20, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/86c00753280038c3fa5a347fa089f66f to your computer and use it in GitHub Desktop.
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
<?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