is_mobile as shortcode

You’ve got an extra “;” after if ( !is_mobile( ) ); Your code should look like this:

add_shortcode( 'is_mobile', 'is_mobile_shortcode' );

function is_mobile_shortcode( $atts, $content = null) {
     if ( !is_mobile( ) )
        return $content;
    return '';
}

And you’ll use it in this way (just for to be sure you’re using it right:

[is_mobile]My Caption[/is_mobidle]