It appears like you can not use upper case like that in a shortcode. Instead of videoUrl
, use video-url
:
function get_youtube_thumb_url_func( $atts ) {
$atts = shortcode_atts(
array(
'video-url' => 'urlHere',
), $atts, 'youtube-thumb-url' );
return $atts['video-url'];
}
add_shortcode( 'youtube-thumb-url', 'get_youtube_thumb_url_func' );
And your shortcode:
[youtube-thumb-url video-url=”test”]
This is the final function that I tested before posting.