How to pass parameters in wordpress shortcode?

Everything is working fine and it’s displaying the comments of the current page with this shortcode [wpdiscuz_comments] using the code below.

function my_wpdiscuz_shortcode() { $  html = ""; if (file_exists(ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php")) { ob_start(); include_once ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php"; $  html = ob_get_clean(); } return $  html; } add_shortcode("wpdiscuz_comments", "my_wpdiscuz_shortcode"); 

I’m trying to pass id parameter using the shortcode below. But it’s not working.

[wpdiscuz_comments post_id="22"] 

Where "post_id" parameter fetching the comments of only post id 22. So I can fetch the comments of a specific post.

Can anyone please help me with this or let me know how can I pass the parameters with shortcode using the above code? Thanks!