Title: Programmatically ignore file
Last modified: January 12, 2022

---

# Programmatically ignore file

 *  Resolved [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/)
 * Hey!
 * Here is Matthew, the developer behind Real Cookie Banner. I want to exclude a
   file programmatically by a WordPress hook. Can you please add the following change
   to your plugin:
 * [https://gist.github.com/matzeeable/be26a908a27efd94c7eb704ae77fcd3c/revisions#diff-cab8487de7b9a0f549e1ae945e18fad0bc01010bbe42ef49c0e0abbb3c4a40ac](https://gist.github.com/matzeeable/be26a908a27efd94c7eb704ae77fcd3c/revisions#diff-cab8487de7b9a0f549e1ae945e18fad0bc01010bbe42ef49c0e0abbb3c4a40ac)
 * Regards
    Matthew 🙂

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

 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15246546)
 * Hi Matthew,
 * Thanks for posting this.
 * For performance reasons I would prefer to add the filter to the ignore list. 
   If we add this filter it would only run once, instead of for every handle. It
   would require you to provide the full url to ignore. Will this work for you?
 *  Thread Starter [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15265004)
 * Hi again!
 * I do not think that the filter on the ignore list makes sense. In our case, at
   the time of reading the ignore-list in your plugin has not yet created our assets.
   Our assets do have dynamically created names. Do you understand what I mean? 
   🙂
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15286791)
 * Yeah, I think I understand what you are talking about. Would the following changes
   work for you?
 * [https://gist.github.com/castles/7d9fcb147b3f9390b46515f216154cb5](https://gist.github.com/castles/7d9fcb147b3f9390b46515f216154cb5)
 * You should be able to hook into mmr_ignored_js_sources and mmr_ignored_css_sources
   (
   I haven’t tested this)
 *  Thread Starter [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15455634)
 * Hi again [@launchinteractive](https://wordpress.org/support/users/launchinteractive/)!
 * Apologies for the delayed response. Yeah, that filter works for me.
 * Do you have any date for the new release? 🙂
 *  Thread Starter [Matthias Günter](https://wordpress.org/support/users/mguenter/)
 * (@mguenter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15577478)
 * Hey [@launchinteractive](https://wordpress.org/support/users/launchinteractive/)!
 * I just wanted to ask nicely when the filter will be released?
 * Regards
    Matthew 😎
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15738050)
 * Hi Matthias,
 * Apologies for the delay. This has now been rolled out in version 1.13

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

The topic ‘Programmatically ignore file’ is closed to new replies.

 * ![](https://ps.w.org/merge-minify-refresh/assets/icon.svg?rev=3414776)
 * [Merge + Minify + Refresh](https://wordpress.org/plugins/merge-minify-refresh/)
 * [Support Threads](https://wordpress.org/support/plugin/merge-minify-refresh/)
 * [Active Topics](https://wordpress.org/support/plugin/merge-minify-refresh/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/merge-minify-refresh/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/merge-minify-refresh/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/programmatically-ignore-file/#post-15738050)
 * Status: resolved