summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/embedded/templates/shortcodes/instagram.html
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-20 20:00:29 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-21 00:41:42 +0200
commit6789207347fc2df186741644a6fe968d41ea9077 (patch)
tree38399eaf5ba718f7c995accf54ea26da66f7bfe0 /tpl/tplimpl/embedded/templates/shortcodes/instagram.html
parent0bbdef986d8eecf4fabe9a372e33626dbdfeb36b (diff)
tpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy disable check
See #4616
Diffstat (limited to 'tpl/tplimpl/embedded/templates/shortcodes/instagram.html')
-rwxr-xr-xtpl/tplimpl/embedded/templates/shortcodes/instagram.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/instagram.html b/tpl/tplimpl/embedded/templates/shortcodes/instagram.html
index 9f012cf3a..471dcc77d 100755
--- a/tpl/tplimpl/embedded/templates/shortcodes/instagram.html
+++ b/tpl/tplimpl/embedded/templates/shortcodes/instagram.html
@@ -1 +1,4 @@
-{{ if len .Params | eq 2 }}{{ if eq (.Get 1) "hidecaption" }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=1" }}{{ .html | safeHTML }}{{ end }}{{ end }}{{ else }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=0" }}{{ .html | safeHTML }}{{ end }}{{ end }} \ No newline at end of file
+{{- $pc := .Page.Site.PrivacyConfig.Instagram -}}
+{{- if not $pc.Disable -}}
+{{ if len .Params | eq 2 }}{{ if eq (.Get 1) "hidecaption" }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=1" }}{{ .html | safeHTML }}{{ end }}{{ end }}{{ else }}{{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" (index .Params 0) "/&hidecaption=0" }}{{ .html | safeHTML }}{{ end }}{{ end }}
+{{- end -}} \ No newline at end of file