Commit 45dffa6e authored by Jakob Moser's avatar Jakob Moser
Browse files

Add filter draft for the privacy protector

parent 430964c3
Loading
Loading
Loading
Loading
+10 −0
Changes for functions.php: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -54,4 +54,14 @@ function fscoli_embed_umap($regex_matches, $embed_attrs, $url, $raw_embed_attrs)
    HTML;
}
wp_embed_register_handler('umap', '#^https://umap.openstreetmap.de/[a-z]{2}/map/[^/]*#', 'fscoli_embed_umap');

/*
 * Add privacy protection for embed elements: You have to click a button before the
 * content is loaded.
 */
function fscoli_protect_embed_privacy($embed_html) {
    return $embed_html;  // TODO Wrap this in the code that displays the button before loading anything
}

add_filter('embed_handler_html', 'fscoli_protect_embed_privacy');
?>