Skip to content

Instantly share code, notes, and snippets.

@gicolek
Created December 12, 2012 00:16
Show Gist options
  • Save gicolek/4263675 to your computer and use it in GitHub Desktop.
Save gicolek/4263675 to your computer and use it in GitHub Desktop.
Sample Shortcode
<?php
function wp_light_advanced_text($atts, $content = null) {
extract( shortcode_atts( array(
'foo' => 'WPized Light by X-Team All Rights Reserved',
), $atts ) );
return "<div id='{$foo}'>" . do_shortcode( $content ) . '</div>';
}
add_shortcode( 'wp_light_advanced_text', 'wp_light_advanced_text' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment