Last active
August 29, 2015 14:04
-
-
Save R3V1Z3/b63c0820b30802035110 to your computer and use it in GitHub Desktop.
Shortcode to easily display unrendered shortcodes in WordPress content. It just wraps the specified shortcode parameter with the shortcode tags like [shortcode].
This file contains hidden or 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 | |
// [unrendered shortcode="shortcode"] | |
function unrendered_function( $atts ) { | |
$a = shortcode_atts( array( | |
'shortcode' => 'shortcode' | |
), $atts ); | |
return '[' . esc_attr($a['shortcode']) . ']'; | |
} | |
add_shortcode( 'unrendered', 'unrendered_function' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment