如何使用短代码的回调函数直接使用开始和结束标签?

I have code:

<?php
  $my_linkdownload = get_post_meta( get_the_ID(), 'linkdownload', true);
  if( ! empty( $my_linkdownload ) ) {
echo do_shortcode('[pms-restrict subscription_plans="8"] <a href="' . $my_linkdownload . '" target="_blank"><img src="http://koran.pustakakoran.com/img/etc/pdf.png"> </a>[/pms-restrict]');
}
?>

How I change the code to shortcode's callback function directly?

You can try like this,

 <?php
    add_shortcode('myshortcode', 'shortcode_callback');

function shortcode_callback(){
      $my_linkdownload = get_post_meta( get_the_ID(), 'linkdownload', true);
      if( ! empty( $my_linkdownload ) ) {
           echo do_shortcode('[pms-restrict subscription_plans="8"] <a href="' . $my_linkdownload . '" target="_blank"><img src="http://koran.pustakakoran.com/img/etc/pdf.png"> </a>[/pms-restrict]');
    }
}
    ?>