Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Last active April 20, 2017 18:09
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 craigsimps/f1d00790a53c3cf9ed1c6a9718547c98 to your computer and use it in GitHub Desktop.
Save craigsimps/f1d00790a53c3cf9ed1c6a9718547c98 to your computer and use it in GitHub Desktop.
<?php
/**
* Create new 'meta_content` filter.
*
* Recreate the default filters applied to `the_content`,
* so content retrieved using `get_post_meta` can be
* formatted in the same way.
*/
add_filter( 'meta_content', 'wptexturize' );
add_filter( 'meta_content', 'convert_smilies' );
add_filter( 'meta_content', 'convert_chars' );
add_filter( 'meta_content', 'wpautop' );
add_filter( 'meta_content', 'shortcode_unautop' );
add_filter( 'meta_content', 'prepend_attachment' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment