Skip to content

Instantly share code, notes, and snippets.

@johnalarcon
Last active April 12, 2019 21:39
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 johnalarcon/baff3a7ee5acddc1eae944235f6f8965 to your computer and use it in GitHub Desktop.
Save johnalarcon/baff3a7ee5acddc1eae944235f6f8965 to your computer and use it in GitHub Desktop.
Filter examples for the Shortcodes Everywhere plugin for ClassicPress. These code snips can be added to a functionality plugin or the functions.php file.
<?php
// Disable shortcodes in widgets? Use this filter!
add_filter('codepotent_shortcodes_everywhere_widgets', '__return_false');
// Disable shortcodes in excerpts? Use this filter!
add_filter('codepotent_shortcodes_everywhere_excerpts', '__return_false');
// Disable shortcodes in category descriptions? Use this filter!
add_filter('codepotent_shortcodes_everywhere_terms', '__return_false');
// Disable shortcodes in comments? Use this filter!
add_filter('codepotent_shortcodes_everywhere_comments', '__return_false');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment