Skip to content

Instantly share code, notes, and snippets.

@henshaw
Last active September 29, 2021 03:51

Revisions

  1. henshaw revised this gist Apr 18, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion block-floc-wordpress.php
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # functions.php
    // Disable FLoC

    function disable_floc($headers) {
    $headers['Permissions-Policy'] = 'interest-cohort=()';
  2. henshaw created this gist Apr 18, 2021.
    8 changes: 8 additions & 0 deletions block-floc-wordpress.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # functions.php

    function disable_floc($headers) {
    $headers['Permissions-Policy'] = 'interest-cohort=()';
    return $headers;
    }

    add_filter('wp_headers', 'disable_floc');