modules/shortcodes/gist.php 1 location
|
@@ 113-119 (lines=7) @@
|
110 |
|
*/ |
111 |
|
function github_gist_shortcode( $atts, $content = '' ) { |
112 |
|
|
113 |
|
if ( empty( $atts[0] ) && empty( $content ) ) { |
114 |
|
if ( current_user_can( 'edit_posts' ) ) { |
115 |
|
return esc_html__( 'Please specify a Gist URL or ID.', 'jetpack' ); |
116 |
|
} else { |
117 |
|
return '<!-- Missing Gist ID -->'; |
118 |
|
} |
119 |
|
} |
120 |
|
|
121 |
|
$id = ( ! empty( $content ) ) ? $content : $atts[0]; |
122 |
|
|
modules/shortcodes/soundcloud.php 1 location
|
@@ 41-47 (lines=7) @@
|
38 |
|
); |
39 |
|
|
40 |
|
// The "url" option is required. |
41 |
|
if ( empty( $shortcode_options['url'] ) ) { |
42 |
|
if ( current_user_can( 'edit_posts' ) ) { |
43 |
|
return esc_html__( 'Please specify a Soundcloud URL.', 'jetpack' ); |
44 |
|
} else { |
45 |
|
return '<!-- Missing Soundcloud URL -->'; |
46 |
|
} |
47 |
|
} |
48 |
|
|
49 |
|
// Turn shortcode option "param" (param=value¶m2=value) into array of params. |
50 |
|
$shortcode_params = array(); |