Title: do it without a plugin
Last modified: April 19, 2021

---

# do it without a plugin

 *  [georg](https://wordpress.org/support/users/georgp/)
 * (@georgp)
 * [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/)
 * If you do not want to use a plugin, just add the following lines to your function.
   php
 *     ```
       function disable_floc($headers) {
           $headers['Permissions-Policy'] = 'interest-cohort=()';
           return $headers;
         }
   
       add_filter('wp_headers', 'disable_floc');
       ```
   

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

 *  [Roy Tanck](https://wordpress.org/support/users/roytanck/)
 * (@roytanck)
 * [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/#post-14336560)
 * Thank you for suggesting this. Unfortunately, the snippet you posted does not
   preserve any (non-FLoC-related) values the header may have. This could lead to
   issues on sites where the Permissions-Policy header is already in use to control
   other permissions.
 * My plugin preserves those values if present, and then adds the “interest-cohort
   =()”.
 * Also, functions.php gets overwritten when your theme is updated, so in general
   it’s not the best option to add your own code there.
 *  Thread Starter [georg](https://wordpress.org/support/users/georgp/)
 * (@georgp)
 * [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/#post-14336594)
 * Right, thanks for the remarks.
    However, many WordPress Websites do not have 
   a Permission-Policy header at all (and even no Security header), so overwrite
   might not apply.
 *  [Roy Tanck](https://wordpress.org/support/users/roytanck/)
 * (@roytanck)
 * [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/#post-14336616)
 * Fair enough. Still, the best way to add the code you suggested would be to roll
   your own little plugin. Basically, mine exists to save you the trouble :).
 * It contains a slightly fancier version of the approach in the snippet, and does
   nothing else.
 *  Thread Starter [georg](https://wordpress.org/support/users/georgp/)
 * (@georgp)
 * [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/#post-14336623)
 * Well, I put it in my nginx conf 🙂 Thank you for providing this plugin for everybody.

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

The topic ‘do it without a plugin’ is closed to new replies.

 * ![](https://ps.w.org/disable-floc/assets/icon-256x256.png?rev=2515344)
 * [Disable Topics API](https://wordpress.org/plugins/disable-floc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/disable-floc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/disable-floc/)
 * [Active Topics](https://wordpress.org/support/plugin/disable-floc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disable-floc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disable-floc/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [georg](https://wordpress.org/support/users/georgp/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/do-it-without-a-plugin/#post-14336623)