From b8f10c6a0cef0ce0c90c225f0df601ab1f83af93 Mon Sep 17 00:00:00 2001 From: jeiseman Date: Sun, 26 Jul 2015 12:44:44 -0400 Subject: [PATCH] Update soundcloud.php Allow percent as a legal value for the width and the height. --- modules/shortcodes/soundcloud.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shortcodes/soundcloud.php b/modules/shortcodes/soundcloud.php index fe98c3346b812..48f82fd967869 100644 --- a/modules/shortcodes/soundcloud.php +++ b/modules/shortcodes/soundcloud.php @@ -98,11 +98,11 @@ function soundcloud_shortcode( $atts, $content = null ) { } // Both "width" and "height" need to be integers - if (isset( $options['width'] ) && ! preg_match( '/^\d+$/', $options['width'] ) ) { + if (isset( $options['width'] ) && ! preg_match( '/^(\d+)(%)?$/', $options['width'] ) ) { // set to 0 so oEmbed will use the default 100% and WordPress themes will leave it alone $options['width'] = 0; } - if ( isset( $options['height'] ) && ! preg_match( '/^\d+$/', $options['height'] ) ) { + if ( isset( $options['height'] ) && ! preg_match( '/^(\d+)(%)?$/', $options['height'] ) ) { unset( $options['height'] ); }