| @@ -9,8 +9,12 @@ | ||
| 9 | 9 | * |
| 10 | 10 | * @package automattic/jetpack |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit( 0 ); | |
| 15 | +} | |
| 16 | + | |
| 13 | 17 | /** |
| 14 | 18 | * Display the Bandcamp shortcode. |
| 15 | 19 | * |
| 16 | 20 | * @param array $atts Shortcode attributes. |
| @@ -15,8 +19,10 @@ | ||
| 15 | 19 | * |
| 16 | 20 | * @param array $atts Shortcode attributes. |
| 17 | 21 | */ |
| 18 | 22 | function shortcode_handler_bandcamp( $atts ) { |
| 23 | + $csswidth = null; | |
| 24 | + $cssheight = null; | |
| 19 | 25 | // there are no default values, but specify here anyway to explicitly list supported atts. |
| 20 | 26 | $attributes = shortcode_atts( |
| 21 | 27 | array( |
| 22 | 28 | 'album' => null, // integer album id. |
| @@ -35,9 +41,9 @@ | ||
| 35 | 41 | 'minimal' => null, // may be string "true" (defaults false). |
| 36 | 42 | 'theme' => null, // may be theme identifier string ("light"|"dark" so far). |
| 37 | 43 | 'package' => null, // integer package id. |
| 38 | 44 | 't' => null, // integer track number. |
| 39 | - 'tracks' => null, // comma separated list of allowed tracks. | |
| 45 | + 'tracks' => null, // comma-separated list of allowed tracks. | |
| 40 | 46 | 'esig' => null, // hex, no '#' prefix. |
| 41 | 47 | ), |
| 42 | 48 | $atts, |
| 43 | 49 | 'bandcamp' |
| @@ -227,12 +233,12 @@ | ||
| 227 | 233 | } |
| 228 | 234 | } |
| 229 | 235 | |
| 230 | 236 | if ( $is_video ) { |
| 231 | - $url = '//bandcamp.com/VideoEmbed?' . join( '&', $argparts ); | |
| 237 | + $url = '//bandcamp.com/VideoEmbed?' . implode( '&', $argparts ); | |
| 232 | 238 | $extra_attrs = " mozallowfullscreen='1' webkitallowfullscreen='1' allowfullscreen='1'"; |
| 233 | 239 | } else { |
| 234 | - $url = '//bandcamp.com/EmbeddedPlayer/v=2/' . join( '/', $argparts ) . '/'; | |
| 240 | + $url = '//bandcamp.com/EmbeddedPlayer/v=2/' . implode( '/', $argparts ) . '/'; | |
| 235 | 241 | $extra_attrs = ''; |
| 236 | 242 | } |
| 237 | 243 | |
| 238 | 244 | $iframe = '<iframe width="%s" height="%s" style="position: relative; display: block; width: %s; height: %s;" src="%s" allowtransparency="true" frameborder="0"%s></iframe>'; |