Skip to content

Instantly share code, notes, and snippets.

@chrisdavidmiles
Created September 18, 2018 05:35
Show Gist options
  • Save chrisdavidmiles/ecaddb9ca9a6cf7343b36cc37c04fb6a to your computer and use it in GitHub Desktop.
Save chrisdavidmiles/ecaddb9ca9a6cf7343b36cc37c04fb6a to your computer and use it in GitHub Desktop.
A filter to enable shortcodes in WordPress comments
add_filter( 'comment_text', 'shortcode_unautop');
add_filter( 'comment_text', 'do_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment