By default, the ThickBox script offers a close button in the top-right corner of the pop-up dialog that can be used to close it at any time. This may not be desirable if you expect visitors to provide feedback or perform a specific action before dismissing the dialog. By adding the modal keyword to the content URL--set to the value of true--ThickBox will remove the dialog title bar, including the close button:
tb_show( 'Pop-Up Message', '<?php echo plugins_url(
'content.html?width=420&height=220&modal=true', __FILE__ ); ?>',
null );
Once the close button is gone, we can call the tb_remove JavaScript function to close the dialog. The following is an example of a simple link that could be added in content.html that will close the dialog:
<div><a href="#" onclick="tb_remove();">Close Dialog</a></div>