Last active
July 22, 2017 21:32
-
-
Save kjohnson/9911a255421552c7ad3479e5a4aa5ca9 to your computer and use it in GitHub Desktop.
Adds a shortcode wrapper for wpautop.
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 | |
// ... | |
/* | |
* [wpautop]Your text/shortcode here[/wpautop] | |
*/ | |
add_shortcode( 'wpautop', 'my_wpautop_shortcode' ); | |
function my_wpautop_shortcode( $atts, $content ){ | |
return wpautop( do_shortcode( $content ) ); | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment