modules/shortcodes/getty.php 1 location
|
@@ 201-208 (lines=8) @@
|
| 198 |
|
*/ |
| 199 |
|
function jetpack_getty_shortcode( $atts, $content = '' ) { |
| 200 |
|
|
| 201 |
|
if ( ! empty( $content ) ) { |
| 202 |
|
$src = $content; |
| 203 |
|
} elseif ( ! empty( $atts['src'] ) ) { |
| 204 |
|
$src = $atts['src']; |
| 205 |
|
} elseif ( ! empty( $atts[0] ) ) { |
| 206 |
|
$src = $atts[0]; |
| 207 |
|
} else { |
| 208 |
|
return '<!-- Missing Getty Source ID -->'; |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
$src = preg_replace( '/^([\da-z-]+(,[\da-z-]+)*).*$/', '$1', $src ); |
modules/shortcodes/spotify.php 1 location
|
@@ 27-35 (lines=9) @@
|
| 24 |
|
*/ |
| 25 |
|
function jetpack_spotify_shortcode( $atts = array(), $content = '' ) { |
| 26 |
|
|
| 27 |
|
if ( ! empty( $content ) ) { |
| 28 |
|
$id = $content; |
| 29 |
|
} elseif ( ! empty( $atts['id'] ) ) { |
| 30 |
|
$id = $atts['id']; |
| 31 |
|
} elseif ( ! empty( $atts[0] ) ) { |
| 32 |
|
$id = $atts[0]; |
| 33 |
|
} else { |
| 34 |
|
return '<!-- Missing Spotify ID -->'; |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
if ( empty( $atts['width'] ) ) { |
| 38 |
|
$atts['width'] = 300; |