diff --git a/includes/shortcodes/shortcodes.php b/includes/shortcodes/shortcodes.php index b8ceddb..b5cbad2 100644 --- a/includes/shortcodes/shortcodes.php +++ b/includes/shortcodes/shortcodes.php @@ -11,8 +11,17 @@ * Shortcodes ===========================================*/ -// Fix for empty
tags around shortcodes -function trestle_shortcode_empty_paragraph_fix($content) +add_filter('the_content', 'trestle_shortcode_empty_paragraph_fix'); +/** + * Fix for empty
tags around shortcodes + * + * @since 1.0.0 + * + * @param string $content HTML content. + * + * @return string Updated content. + */ +function trestle_shortcode_empty_paragraph_fix( $content ) { $array = array ( '
[' => '[', @@ -24,8 +33,8 @@ function trestle_shortcode_empty_paragraph_fix($content) return $content; } -add_filter('the_content', 'trestle_shortcode_empty_paragraph_fix'); +add_shortcode( 'col', 'trestle_column' ); /** * Columns * @@ -36,6 +45,10 @@ add_filter('the_content', 'trestle_shortcode_empty_paragraph_fix'); * - width (one-half, one-third, etc - uses native Genesis column classes in style.css) * - first (used to specify the first column in a row) * - no-list-margin (will cause contained list elements to collapse as one on mobile sizes) + * + * @param array $atts Shortcode attributes. + * + * @return string Shortcode output. */ function trestle_column( $atts, $content = null ) { extract( shortcode_atts( array( @@ -43,13 +56,18 @@ function trestle_column( $atts, $content = null ) { ), $atts ) ); return '
+ + + + + + + - + + ++ +