Created
February 6, 2016 11:23
-
-
Save Dinamiko/3ca6da2fc215e8328831 to your computer and use it in GitHub Desktop.
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 | |
// removes all shortcodes in PDF | |
function dkpdf_remove_all_shortcodes( $content ) { | |
$pdf = get_query_var( 'pdf' ); | |
if( $pdf ) { | |
return strip_shortcodes( $content ); | |
} else { | |
return $content; | |
} | |
} | |
add_filter( 'the_content', 'dkpdf_remove_all_shortcodes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment