Created
February 1, 2018 16:42
-
-
Save JeffAspen/f820115088b4cafbc9fc4c930c155c2c 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
/** | |
* Spacer | |
* | |
* @since 1.3.0 | |
* Use the shortcode: [spacer class="css-class-name" height="30px"] | |
* Note: Since the space size uses an inline style your css class may have to use an !important | |
*/ | |
function cmms_spacer_shortcode( $atts ) { | |
// Attributes | |
extract (shortcode_atts( | |
array( | |
'class' => '', | |
'height' => '30px', | |
), | |
$atts)); | |
return '<div class="'.$class.'" style="height: '.$height.'"></div>'; | |
} | |
add_shortcode( 'spacer', 'cmms_spacer_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment