How use shortcode’s callback function directly which uses opening and closing tags?

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?

Read more here: How use shortcode’s callback function directly which uses opening and closing tags?

Leave a Reply

Your email address will not be published. Required fields are marked *