Created
February 18, 2017 23:08
-
-
Save mwinckler/f8c61604ae50b08daff498e3aa0fa915 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 | |
// functions.php | |
add_shortcode( 'contentbox', 'mw_shortcode_contentbox' ); | |
function mw_shortcode_contentbox( $attrs, $content = '' ) { | |
$parsed_attrs = shortcode_atts( array( | |
'align' => '' | |
), $attrs ); | |
return "<aside class='content-box " . $parsed_attrs['align'] . "'>" . $content . "</aside>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment