Title: Issue with closing modal
Last modified: March 15, 2019

---

# Issue with closing modal

 *  Resolved [timdenty](https://wordpress.org/support/users/timdenty/)
 * (@timdenty)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/issue-with-closing-modal/)
 * I’m seeing an issue with the modal close button not functioning.
 * I can see that some attributes are being stripped from the output:
 * Template code:
    <button class=”ttt-pnwc-close” aria-label=”Close modal” data-
   micromodal-close></button>
 * Inspector code:
    <button class=”ttt-pnwc-close”></button>
 * I have tested with other unnecessary plugins deactivated. Also tested without
   JS running.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11318057)
 * Hello,
 * Are you using the free or premium version?
 *  Thread Starter [timdenty](https://wordpress.org/support/users/timdenty/)
 * (@timdenty)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11318189)
 * We’re using the free version
 *  Plugin Author [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11318409)
 * Probably some other plugin has edited your `wp_kses_allowed_html` filter, removing
   these attributes.
 * Please, add this to your **functions.php**
 *     ```
       add_filter( 'wp_kses_allowed_html', function ( $html ) {
       	$html['button'] = array(
       		'disabled'         => true,
       		'name'             => true,
       		'type'             => true,
       		'value'            => true,
       		'aria-describedby' => true,
       		'aria-details'     => true,
       		'aria-label'       => true,
       		'aria-labelledby'  => true,
       		'aria-hidden'      => true,
       		'class'            => true,
       		'id'               => true,
       		'style'            => true,
       		'title'            => true,
       		'role'             => true,
       		'data-*'           => true,
       	);
       	return $html;
       } );
       ```
   
 * and please tell me if it helps
 *  Thread Starter [timdenty](https://wordpress.org/support/users/timdenty/)
 * (@timdenty)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11326941)
 * Thanks for that. Yes it works, but only once I specify the ‘data-micromodal-close’
   attribute explicitly in the array.
 * Many thanks
 *  Plugin Author [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11326959)
 * Great 🙂
    Thanks for letting me know.
 * If you could leave a tiny review I would really appreciate it
 *  [aartikmundrisoft](https://wordpress.org/support/users/aartikmundrisoft/)
 * (@aartikmundrisoft)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11395590)
 * Same issue happen with me also.. and I fixed it using [@timdenty](https://wordpress.org/support/users/timdenty/)
   solution mentioned above.
 *  Plugin Author [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * (@karzin)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11396696)
 * Thanks for letting me know [@aartikmundrisoft](https://wordpress.org/support/users/aartikmundrisoft/),
   
   I’ll try to add it on the plugin FAQ then

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Issue with closing modal’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/popup-notices-for-woocommerce_d7d3f6.
   svg)
 * [Popups for WooCommerce: Add to Cart, Checkout & More](https://wordpress.org/plugins/popup-notices-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-notices-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-notices-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-notices-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-notices-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-notices-for-woocommerce/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Pablo Pacheco](https://wordpress.org/support/users/karzin/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/issue-with-closing-modal/#post-11396696)
 * Status: resolved