Skip to content

Instantly share code, notes, and snippets.

@AladinDridi
Created February 12, 2018 17:10
Show Gist options
  • Save AladinDridi/2d52b0d6287c3484a13e70edf2576d11 to your computer and use it in GitHub Desktop.
Save AladinDridi/2d52b0d6287c3484a13e70edf2576d11 to your computer and use it in GitHub Desktop.
function iframe_loggedout($msg){
$msg = shortcode_atts(
array(
'lien' => '',
), $msg, 'iframe_loggedout_link');
if(wp_is_mobile()){
return '<iframe width="560" height="315" src="'.$msg['lien'].'" frameborder="0" allowfullscreen></iframe>';
}
}
add_shortcode('iframe_loggedout_link','iframe_loggedout');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment