modules/shortcodes/spotify.php 1 location
|
@@ 30-38 (lines=9) @@
|
| 27 |
|
*/ |
| 28 |
|
function jetpack_spotify_shortcode( $atts = array(), $content = '' ) { |
| 29 |
|
|
| 30 |
|
if ( ! empty( $content ) ) { |
| 31 |
|
$id = $content; |
| 32 |
|
} elseif ( ! empty( $atts['id'] ) ) { |
| 33 |
|
$id = $atts['id']; |
| 34 |
|
} elseif ( ! empty( $atts[0] ) ) { |
| 35 |
|
$id = $atts[0]; |
| 36 |
|
} else { |
| 37 |
|
return '<!-- Missing Spotify ID -->'; |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
if ( empty( $atts['width'] ) ) { |
| 41 |
|
$atts['width'] = 300; |
modules/shortcodes/getty.php 1 location
|
@@ 185-192 (lines=8) @@
|
| 182 |
|
*/ |
| 183 |
|
function jetpack_getty_shortcode( $atts, $content = '' ) { |
| 184 |
|
|
| 185 |
|
if ( ! empty( $content ) ) { |
| 186 |
|
$src = $content; |
| 187 |
|
} elseif ( ! empty( $atts['src'] ) ) { |
| 188 |
|
$src = $atts['src']; |
| 189 |
|
} elseif ( ! empty( $atts[0] ) ) { |
| 190 |
|
$src = $atts[0]; |
| 191 |
|
} else { |
| 192 |
|
return '<!-- Missing Getty Source ID -->'; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
$src = preg_replace( '/^([\da-z-]+(,[\da-z-]+)*).*$/', '$1', $src ); |