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
|
@@ 121-128 (lines=8) @@
|
118 |
|
*/ |
119 |
|
function jetpack_getty_shortcode( $atts, $content = '' ) { |
120 |
|
|
121 |
|
if ( ! empty( $content ) ) { |
122 |
|
$src = $content; |
123 |
|
} elseif ( ! empty( $atts['src'] ) ) { |
124 |
|
$src = $atts['src']; |
125 |
|
} elseif ( ! empty( $atts[0] ) ) { |
126 |
|
$src = $atts[0]; |
127 |
|
} else { |
128 |
|
return '<!-- Missing Getty Source ID -->'; |
129 |
|
} |
130 |
|
|
131 |
|
$src = preg_replace( '/^(\d+(,\d+)*).*$/', '$1', $src ); |